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-next>] [day] [month] [year] [list]
Message-ID: <e055ac0c-312d-78cd-dcc9-7c2e80ea3d3d@infradead.org>
Date:   Thu, 11 Aug 2022 11:33:04 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Anup Parikh <parikhanupk.foss@...il.com>
Cc:     skhan@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Doc fix for dget_dlock

Hi--

On 8/11/22 07:48, Anup Parikh wrote:
> Hello Mr. Randy Dunlap,
> 
> I checked include/linux/dcache.h (dget() and dget_dlock()), include/linux/lockref.h and linux/lib/lockref.c.
> My current knowledge is limited but I think:
> 1) dget_dlock() directly increments the count variable without any atomicity guards.
> 2) dget() does the same but with atomicity guarantee - even across multiple-cores on a multi-core system (according to https://stackoverflow.com/questions/36964478/understanding-synchronization-with-multiple-processors <https://stackoverflow.com/questions/36964478/understanding-synchronization-with-multiple-processors> and code in linux/lib/lockref.c).
> 
> Please let me know if I should write the corresponding documentation and send a new patch.

Yes, please.
Thanks.

> Thanks and Regards,
> Anup K Parikh.
> 
> 
> On Tue, Aug 9, 2022 at 11:58 PM Randy Dunlap <rdunlap@...radead.org <mailto:rdunlap@...radead.org>> wrote:
> 
>     Hi--
> 
>     On 8/5/22 09:39, Anup K Parikh wrote:
>     > Removes the warning for dget_dlock in include/linux/dcache.h and
>     > enables generation of its API documentation
>     >
>     > Signed-off-by: Anup K Parikh <parikhanupk.foss@...il.com <mailto:parikhanupk.foss@...il.com>>
>     > ---
>     >  include/linux/dcache.h | 2 +-
>     >  1 file changed, 1 insertion(+), 1 deletion(-)
>     >
>     > diff --git a/include/linux/dcache.h b/include/linux/dcache.h
>     > index f5bba5148..ce0b36f72 100644
>     > --- a/include/linux/dcache.h
>     > +++ b/include/linux/dcache.h
>     > @@ -297,7 +297,7 @@ extern char *dentry_path(const struct dentry *, char *, int);
>     >  /* Allocation counts.. */
>     > 
>     >  /**
>     > - *   dget, dget_dlock -      get a reference to a dentry
>     > + *   dget_dlock -    get a reference to a dentry
>     >   *   @dentry: dentry to get a reference to
>     >   *
>     >   *   Given a dentry or %NULL pointer increment the reference count
> 
>     Someone was trying to document both dget() and get_dlock() with the same
>     kernel-doc comment block.
>     I suppose that you could duplicate the comments for dget() also.
> 
>     It would be nice to know the difference(s) in the functions as well.
> 
>     thanks.
>     -- 
>     ~Randy
> 

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ