From 4f5c10f1ad45ae453822113dd0fe39ed757037fb Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 3 Sep 2019 21:18:49 -0500 Subject: smb3: allow skipping signature verification for perf sensitive configurations Add new mount option "signloosely" which enables signing but skips the sometimes expensive signing checks in the responses (signatures are calculated and sent correctly in the SMB2/SMB3 requests even with this mount option but skipped in the responses). Although weaker for security (and also data integrity in case a packet were corrupted), this can provide enough of a performance benefit (calculating the signature to verify a packet can be expensive especially for large packets) to be useful in some cases. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg --- fs/cifs/smb2transport.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/cifs/smb2transport.c') diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c index b02242eacb55..148d7942c796 100644 --- a/fs/cifs/smb2transport.c +++ b/fs/cifs/smb2transport.c @@ -522,6 +522,7 @@ smb2_verify_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server) if ((shdr->Command == SMB2_NEGOTIATE) || (shdr->Command == SMB2_SESSION_SETUP) || (shdr->Command == SMB2_OPLOCK_BREAK) || + server->ignore_signature || (!server->session_estab)) return 0; -- cgit v1.2.3