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]
Message-ID: <CAJuCfpG039-8q_nK2D20VfZSY6c4Ya-AA9Keh9mE7EoebDJ68Q@mail.gmail.com>
Date:   Thu, 24 Feb 2022 15:22:50 -0800
From:   Suren Baghdasaryan <surenb@...gle.com>
To:     Michal Hocko <mhocko@...e.com>
Cc:     akpm@...ux-foundation.org, ccross@...gle.com,
        sumit.semwal@...aro.org, dave.hansen@...el.com,
        keescook@...omium.org, willy@...radead.org,
        kirill.shutemov@...ux.intel.com, vbabka@...e.cz,
        hannes@...xchg.org, ebiederm@...ssion.com, brauner@...nel.org,
        legion@...nel.org, ran.xiaokai@....com.cn, sashal@...nel.org,
        chris.hyser@...cle.com, dave@...olabs.net, pcc@...gle.com,
        caoxiaofeng@...ong.com, david@...hat.com, gorcunov@...il.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        kernel-team@...roid.com
Subject: Re: [PATCH v2 1/3] mm: refactor vm_area_struct::anon_vma_name usage code

On Thu, Feb 24, 2022 at 12:36 AM Michal Hocko <mhocko@...e.com> wrote:
>
> On Wed 23-02-22 07:36:11, Suren Baghdasaryan wrote:
> > Avoid mixing strings and their anon_vma_name referenced pointers
> > by using struct anon_vma_name whenever possible. This simplifies
> > the code and allows easier sharing of anon_vma_name structures when
> > they represent the same name.
> >
> > Suggested-by: Matthew Wilcox <willy@...radead.org>
> > Suggested-by: Michal Hocko <mhocko@...e.com>
> > Signed-off-by: Suren Baghdasaryan <surenb@...gle.com>
>
> LGTM
> Acked-by: Michal Hocko <mhocko@...e.com>
>
> Thanks and one minor nit below

Addressed all the nits in the next version:
https://lore.kernel.org/all/20220224231834.1481408-1-surenb@google.com/
Thanks!

>
> [...]
> > +static inline void free_anon_vma_name(struct vm_area_struct *vma)
> >  {
> > -     const char *vma_name = vma_anon_name(vma);
> > +     /*
> > +      * Not using anon_vma_name because it generates a warning if vma->vm_mm
> > +      * is not held, which might be the case here.
>
> s@...->vm_mm@...p_lock@
>
> > +      */
> > +     if (!vma->vm_file)
> > +             anon_vma_name_put(vma->anon_name);
> > +}
> >
> > -     /* either both NULL, or pointers to same string */
> > -     if (vma_name == name)
>
> --
> Michal Hocko
> SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ