You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
cifs: teach signing routines how to deal with arrays of pages in a smb_rqst
Use the smb_send_rqst helper function to kmap each page in the array and update the hash for that chunk. Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:
committed by
Steve French
parent
97bc00b394
commit
fb308a6f22
@@ -30,6 +30,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/processor.h>
|
||||
#include <linux/mempool.h>
|
||||
#include <linux/highmem.h>
|
||||
#include "smb2pdu.h"
|
||||
#include "cifsglob.h"
|
||||
#include "cifsproto.h"
|
||||
@@ -95,6 +96,16 @@ smb2_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server)
|
||||
}
|
||||
}
|
||||
|
||||
/* now hash over the rq_pages array */
|
||||
for (i = 0; i < rqst->rq_npages; i++) {
|
||||
struct kvec p_iov;
|
||||
|
||||
cifs_rqst_page_to_kvec(rqst, i, &p_iov);
|
||||
crypto_shash_update(&server->secmech.sdeschmacsha256->shash,
|
||||
p_iov.iov_base, p_iov.iov_len);
|
||||
kunmap(rqst->rq_pages[i]);
|
||||
}
|
||||
|
||||
rc = crypto_shash_final(&server->secmech.sdeschmacsha256->shash,
|
||||
sigptr);
|
||||
if (rc)
|
||||
|
||||
Reference in New Issue
Block a user