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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 21, 2011 at 11:07 AM, Stefan (metze) Metzmacher
<metze@xxxxxxxxx> wrote:
> Hi Shirish,
>
>>>> From: Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx>
>>>>
>>>> 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 <shirishpargaonkar@xxxxxxxxx>
>>>> ---
>>>>  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.
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux