public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] smb: client: Use AES-CMAC library
@ 2026-04-18 22:13 Eric Biggers
  2026-04-18 22:13 ` [PATCH v2 1/4] smb: client: Use AES-CMAC library for SMB3 signature calculation Eric Biggers
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Eric Biggers @ 2026-04-18 22:13 UTC (permalink / raw)
  To: linux-cifs, Steve French
  Cc: linux-crypto, samba-technical, linux-kernel, Ard Biesheuvel,
	Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
	Bharath SM, Eric Biggers

This series updates the SMB client to use the AES-CMAC library functions
that were recently added, instead of a "cmac(aes)" crypto_shash.  As
usual, this simplifies the code considerably and is much more efficient.

These patches were originally sent as patches 8-11 of the series
https://lore.kernel.org/r/20260218213501.136844-1-ebiggers@kernel.org/
The only change from that version was adding tags and rebasing.
I also added some microbenchmark results below.

This is intended to be taken through the smb tree, either 7.1 or 7.2
depending on maintainer preference.

A few microbenchmarks that demonstrate improved performance:

 - Total cycles spent in generate_key() during SMB3 mount
   decreased from 20640 to 10780 (3 calls total).

 - Total cycles spent in smb3_calc_signature() during SMB3 mount
   decreased from 177620 to 73180 (32 calls & 4255 bytes total).

 - Total cycles spent in smb3_calc_signature() while writing 10MB file
   decreased from 27551180 to 26628360 (10 calls & 10001392 bytes total)

 - Total cycles spent in smb3_calc_signature() while reading 10MB file
   decreased from 28390900 to 27879340 (14 calls & 10001781 bytes total)

Note that my "before" numbers were taken from current mainline which has
my changes that made the "cmac(aes)" crypto_shash a bit faster as well.
So the speedup vs v7.0 is actually even greater.

Eric Biggers (4):
  smb: client: Use AES-CMAC library for SMB3 signature calculation
  smb: client: Remove obsolete cmac(aes) allocation
  smb: client: Make generate_key() return void
  smb: client: Drop 'allocate_crypto' arg from smb*_calc_signature()

 fs/smb/client/Kconfig         |   2 +-
 fs/smb/client/cifs_unicode.c  |   1 +
 fs/smb/client/cifsencrypt.c   |  62 ++++++-------------
 fs/smb/client/cifsfs.c        |   1 -
 fs/smb/client/cifsglob.h      |   7 +--
 fs/smb/client/cifsproto.h     |   3 -
 fs/smb/client/misc.c          |  57 -----------------
 fs/smb/client/sess.c          |  11 ----
 fs/smb/client/smb2proto.h     |   1 -
 fs/smb/client/smb2transport.c | 113 +++++++++-------------------------
 10 files changed, 53 insertions(+), 205 deletions(-)


base-commit: 8541d8f725c673db3bd741947f27974358b2e163
-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-19  1:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-18 22:13 [PATCH v2 0/4] smb: client: Use AES-CMAC library Eric Biggers
2026-04-18 22:13 ` [PATCH v2 1/4] smb: client: Use AES-CMAC library for SMB3 signature calculation Eric Biggers
2026-04-18 22:13 ` [PATCH v2 2/4] smb: client: Remove obsolete cmac(aes) allocation Eric Biggers
2026-04-18 22:13 ` [PATCH v2 3/4] smb: client: Make generate_key() return void Eric Biggers
2026-04-18 22:13 ` [PATCH v2 4/4] smb: client: Drop 'allocate_crypto' arg from smb*_calc_signature() Eric Biggers
2026-04-19  1:36 ` [PATCH v2 0/4] smb: client: Use AES-CMAC library Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox