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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpGr237=zQb58Zd6E-NmpBfvq-6_LQ58nsiwgx9S1KE0pQ@mail.gmail.com>
Date: Tue, 2 Jul 2024 15:16:18 +0000
From: Suren Baghdasaryan <surenb@...gle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: akpm@...ux-foundation.org, kent.overstreet@...ux.dev, 
	pasha.tatashin@...een.com, souravpanda@...gle.com, keescook@...omium.org, 
	linux-mm@...ck.org, linux-kernel@...r.kernel.org, 
	kernel test robot <lkp@...el.com>
Subject: Re: [PATCH 1/1] mm/slab: fix 'variable obj_exts set but not used' warning

On Tue, Jul 2, 2024 at 9:31 AM Vlastimil Babka <vbabka@...e.cz> wrote:
>
> On 6/30/24 9:20 PM, Suren Baghdasaryan wrote:
> > On Mon, Jun 17, 2024 at 3:04 AM Vlastimil Babka <vbabka@...e.cz> wrote:
> >>
> >> On 6/15/24 12:59 AM, Suren Baghdasaryan wrote:
> >> > slab_post_alloc_hook() uses prepare_slab_obj_exts_hook() to obtain
> >> > slabobj_ext object. Currently the only user of slabobj_ext object in
> >> > this path is memory allocation profiling, therefore when it's not enabled
> >> > this object is not needed. This also generates a warning when compiling
> >> > with CONFIG_MEM_ALLOC_PROFILING=n. Move the code under this configuration
> >> > to fix the warning. If more slabobj_ext users appear in the future, the
> >> > code will have to be changed back to call prepare_slab_obj_exts_hook().
> >> >
> >> > Fixes: 4b8736964640 ("mm/slab: add allocation accounting into slab allocation and free paths")
> >> > Reported-by: kernel test robot <lkp@...el.com>
> >> > Closes: https://lore.kernel.org/oe-kbuild-all/202406150444.F6neSaiy-lkp@intel.com/
> >> > Signed-off-by: Suren Baghdasaryan <surenb@...gle.com>
> >>
> >> Acked-by: Vlastimil Babka <vbabka@...e.cz>
> >>
> >> But it seems to me we could remove the whole #ifdef if current->alloc_tag
> >> (which doesn't exist with !MEM_ALLOC_PROFILING) had an access helper, or
> >> there was a alloc_tag_add_current() variant?
> >
> > Hmm. I'll check if current->alloc_tag is the only reason for this
> > ifdef. If so then you are correct and we can simplify this code.
>
> The fix is now in mm-hotfixes-stable but we can cleanup for the future as a
> non-hotfix.

Yes, it's on my TODO list now. Thanks!

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ