public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aurélien Aptel" <aaptel@suse.com>
To: Stefan Metzmacher <metze@samba.org>,
	Steve French <smfrench@gmail.com>,
	CIFS <linux-cifs@vger.kernel.org>
Cc: samba-technical <samba-technical@lists.samba.org>,
	linux-cifsd-devel@lists.sourceforge.net
Subject: Re: [PATCH] smb3.1.1: allow dumping GCM256 keys to improve debugging of encrypted shares
Date: Fri, 07 May 2021 17:37:02 +0200	[thread overview]
Message-ID: <87im3utv1d.fsf@suse.com> (raw)
In-Reply-To: <1780584e-d602-00c4-6f4b-c112f158148c@samba.org>

Stefan Metzmacher <metze@samba.org> writes:
> If you ever change it just use another struct and another ioctl opcode.
> also the ioctl macros encode the struct size into the id, the the ioctl opcode would
> change anyway.

Ah I didn't realize the sizeof() was used to generate the code, good catch.

If we have a different code per struct size then the code name should
have the key size in it and there's no need to encode the key length in
the struct itself.

So something like:

// rename current one
#define CIFS_DUMP_KEY_128 _IOWR(CIFS_IOCTL_MAGIC, 8, struct smb3_key_debug_info_128)
// add 256 one
#define CIFS_DUMP_KEY_256 _IOWR(CIFS_IOCTL_MAGIC, 10, struct smb3_key_debug_info_256)

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)


      reply	other threads:[~2021-05-07 15:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 22:19 [PATCH] smb3.1.1: allow dumping GCM256 keys to improve debugging of encrypted shares Steve French
2021-05-01  4:00 ` ronnie sahlberg
2021-05-01  4:17   ` Steve French
2021-05-01 10:53     ` Shyam Prasad N
2021-05-01 20:49       ` ronnie sahlberg
2021-05-02  4:05         ` Steve French
2021-05-02 23:02           ` Steve French
2021-05-07 13:48             ` Aurélien Aptel
2021-05-07  0:17 ` Stefan Metzmacher
2021-05-07  3:18   ` Steve French
2021-05-07 10:28   ` Aurélien Aptel
2021-05-07 12:43     ` Stefan Metzmacher
2021-05-07 13:23       ` Aurélien Aptel
2021-05-07 13:33         ` Aurélien Aptel
2021-05-07 14:16         ` Stefan Metzmacher
2021-05-07 15:37           ` Aurélien Aptel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87im3utv1d.fsf@suse.com \
    --to=aaptel@suse.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-cifsd-devel@lists.sourceforge.net \
    --cc=metze@samba.org \
    --cc=samba-technical@lists.samba.org \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox