All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Metzmacher <metze@samba.org>
To: Enzo Matsumiya <ematsumiya@suse.de>
Cc: linux-cifs@vger.kernel.org, smfrench@gmail.com, pc@cjr.nz,
	ronniesahlberg@gmail.com, nspmangalore@gmail.com
Subject: Re: [RFC PATCH v2 1/3] cifs: introduce AES-GMAC signing support for SMB 3.1.1
Date: Wed, 14 Sep 2022 16:47:59 +0200	[thread overview]
Message-ID: <59df1da8-a40e-3dfd-c071-e06c517972d4@samba.org> (raw)
In-Reply-To: <20220914143214.nsrssywog7xwtfv5@suse.de>


Hi Enzo,

> You mean as copying crypt_message() and adapt for AES-GMAC signing,
> instead of having the common parts in a separate function? I'll change
> that on v3, I just thought it'd be better to have less duplicate code.
> 
..

>> Why wasting time to allocate/free a 12 byte buffer for every pdu?
>>
>> Can't we have a named structure and pass in a reference from the
>> caller, which has it on the stack?

> Got it. I'll fix this for v3.
For both just see this from line 624 up to 963.

> https://git.samba.org/sfrench/cifs-2.6.git/?p=sfrench/cifs-2.6.git;a=blob;f=fs/cifs/smb2transport.c;h=4b912c75caa32d8f66a21286c5c28b982ea8efa1;hb=4b912c75caa32d8f66a21286c5c28b982ea8efa1#l624

I think smb2_sg_set_buf() should be moved to a header in order to avoid having it twice.

The verify argument to smb311_calc_aes_gmac should be renamed to allocate_crypto
in order match smb3_calc_aes_cmac(), and the logic related to allocate_crypto
if most likely the fix, as you mentioned in the other mail.

And all the huge comments should be removed, as it's now no longer mixed with signing and
is relatively simple to follow...

metze

  reply	other threads:[~2022-09-14 14:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 21:33 [RFC PATCH v2 0/3] cifs: introduce support for AES-GMAC signing Enzo Matsumiya
2022-08-29 21:33 ` [RFC PATCH v2 1/3] cifs: introduce AES-GMAC signing support for SMB 3.1.1 Enzo Matsumiya
2022-08-30 15:49   ` kernel test robot
2022-09-14  4:07   ` Stefan Metzmacher
2022-09-14 14:32     ` Enzo Matsumiya
2022-09-14 14:47       ` Stefan Metzmacher [this message]
2022-08-29 21:33 ` [RFC PATCH v2 2/3] cifs: deprecate 'enable_negotiate_signing' module param Enzo Matsumiya
2022-08-29 21:33 ` [RFC PATCH v2 3/3] cifs: show signing algorithm name in DebugData Enzo Matsumiya
2022-08-30 21:27 [RFC PATCH v2 1/3] cifs: introduce AES-GMAC signing support for SMB 3.1.1 kernel test robot
2022-08-31  5:58 ` Dan Carpenter

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=59df1da8-a40e-3dfd-c071-e06c517972d4@samba.org \
    --to=metze@samba.org \
    --cc=ematsumiya@suse.de \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=pc@cjr.nz \
    --cc=ronniesahlberg@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.