Thread (1 message) 1 message, 1 author, 2011-01-21

Re: [PATCH] cifs: Replace cifs md5 hashing functions with kernel crypto APIs

From: Shirish Pargaonkar <hidden>
Date: 2011-01-21 18:13:41
Also in: linux-cifs

On Fri, Jan 21, 2011 at 11:07 AM, Stefan (metze) Metzmacher
[off-list ref] wrote:
Hi Shirish,
quoted
quoted
quoted
From: Shirish Pargaonkar <redacted>

Replace remaining use of md5 hash functions local to cifs module
with kernel crypto APIs.
Remove header and source file containing those local functions.


Signed-off-by: Shirish Pargaonkar <redacted>
---
 fs/cifs/Makefile      |    2 +-
 fs/cifs/cifsencrypt.c |    1 -
 fs/cifs/link.c        |   59 +++++++--
 fs/cifs/md5.c         |  366 -------------------------------------------------
 fs/cifs/md5.h         |   38 -----
 fs/cifs/smbencrypt.c  |    1 -
 6 files changed, 51 insertions(+), 416 deletions(-)
 delete mode 100644 fs/cifs/md5.c
 delete mode 100644 fs/cifs/md5.h
Very nice. The CIFS parts look good to me, and I'm always fond of
reducing the code we need to support as well as the cifs.ko footprint.
Assuming that mfsymlink support still works after this patch...
I did test briefly, e.g. creating symlinks and deleting them.
Hoping Stefan Metzmacher will comment.
I did verify that the (md5) hash value was different for different actualpaths
Just test with and without your changes, create symlinks with both
versions which point to
the same target. And verify you can use them with both.
Then you can mount without mfsymlink support and verify that the
lowlevel file
has the same md5sum.

metze
metze, Thanks. I think the patch is working.

cifsa.nopatch and cifsa.patch were created as symlinks using mount
option mfsymlinks
without and with this patch respectively.

 # mount -t cifs //<server_name>/<share_name> /mnt/smb_c -o
user=<user>,pass=<password>

# md5sum /mnt/smb_c/cifsa.nopatch
d1077212b3a759439645e1fee8d6a268  /mnt/smb_c/cifsa.nopatch

# md5sum /mnt/smb_c/cifsa.patch
d1077212b3a759439645e1fee8d6a268  /mnt/smb_c/cifsa.patch

I tried this with another actualpath file and md5sum of both the
created symlinks (with
and without the patch) is same.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help