lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 15 Apr 2021 19:52:09 +0500
From:   Muhammad Usama Anjum <musamaanjum@...il.com>
To:     Aurélien Aptel <aaptel@...e.com>,
        Steve French <sfrench@...ba.org>,
        Ronnie Sahlberg <lsahlber@...hat.com>,
        "open list:COMMON INTERNET FILE SYSTEM CLIENT (CIFS)" 
        <linux-cifs@...r.kernel.org>,
        "moderated list:COMMON INTERNET FILE SYSTEM CLIENT (CIFS)" 
        <samba-technical@...ts.samba.org>,
        open list <linux-kernel@...r.kernel.org>
Cc:     musamaanjum@...il.com, kernel-janitors@...r.kernel.org,
        dan.carpenter@...cle.com, colin.king@...onical.com
Subject: Re: [PATCH] cifs: remove unnecessary copies of tcon->crfid.fid

On Wed, 2021-04-14 at 14:00 +0200, Aurélien Aptel wrote:
> Muhammad Usama Anjum <musamaanjum@...il.com> writes:
> > pfid is being set to tcon->crfid.fid and they are copied in each other
> > multiple times. Remove the memcopy between same pointers.
> > 
> > Addresses-Coverity: ("Overlapped copy")
> > Fixes: 9e81e8ff74b9 ("cifs: return cached_fid from open_shroot")
> > Signed-off-by: Muhammad Usama Anjum <musamaanjum@...il.com>
> > ---
> > I'm not sure why refcount was being incremented here. This file has been
> > evoloved so much. Any ideas?
> 
> The fact that pfid is the same as the cache is very weird... Probably
> due to recent change.
> 
> This function returns a cached dir entry for the root of the share which
> can be accessed/shared by multiple task.
> 
Aurélien Aptel,

Thank you so much for awesome explanation. The whole function makes
sense now. We need to remove the memcpy calls only. We need to
increment the refcount (it was removed in this patch). I'll send a V2.

Regards,
Usama

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ