mbox series

[v1,0/2] Change CIFS_FULL_KEY_DUMP ioctl to return variable size keys

Message ID 20210521151928.17730-1-aaptel@suse.com
Headers show
Series Change CIFS_FULL_KEY_DUMP ioctl to return variable size keys | expand

Message

Aurélien Aptel May 21, 2021, 3:19 p.m. UTC
From: Aurelien Aptel <aaptel@suse.com>

This patchset changes the CIFS_FULL_KEY_DUMP ioctl to return variable
size keys to userspace while keeping the same ioctl number.

This version of the ioctl should be future proof if we ever add more
cipher types or bigger keys.

This also fixes the build error for ARM related to get_user() being
undefined.

I have tested this for AES-128 and AES-256.

I have a separate patch for the smbinfo utility to make use of this
new ioctl that I will send in a separate thread.

Aurelien Aptel (2):
  cifs: set server->cipher_type to AES-128-CCM for SMB3.0
  cifs: change format of CIFS_FULL_KEY_DUMP ioctl

 fs/cifs/cifs_ioctl.h |  25 ++++++--
 fs/cifs/cifspdu.h    |   3 +-
 fs/cifs/ioctl.c      | 143 +++++++++++++++++++++++++++++++------------
 fs/cifs/smb2pdu.c    |   7 +++
 4 files changed, 133 insertions(+), 45 deletions(-)

Comments

Paulo Alcantara May 21, 2021, 3:42 p.m. UTC | #1
Aurélien Aptel <aaptel@suse.com> writes:

> From: Aurelien Aptel <aaptel@suse.com>
>
> This patchset changes the CIFS_FULL_KEY_DUMP ioctl to return variable
> size keys to userspace while keeping the same ioctl number.
>
> This version of the ioctl should be future proof if we ever add more
> cipher types or bigger keys.
>
> This also fixes the build error for ARM related to get_user() being
> undefined.
>
> I have tested this for AES-128 and AES-256.
>
> I have a separate patch for the smbinfo utility to make use of this
> new ioctl that I will send in a separate thread.
>
> Aurelien Aptel (2):
>   cifs: set server->cipher_type to AES-128-CCM for SMB3.0
>   cifs: change format of CIFS_FULL_KEY_DUMP ioctl
>
>  fs/cifs/cifs_ioctl.h |  25 ++++++--
>  fs/cifs/cifspdu.h    |   3 +-
>  fs/cifs/ioctl.c      | 143 +++++++++++++++++++++++++++++++------------
>  fs/cifs/smb2pdu.c    |   7 +++
>  4 files changed, 133 insertions(+), 45 deletions(-)

Looks good.

Acked-by: Paulo Alcantara (SUSE) <pc@cjr.nz>