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: <CA+kNDJ+WKR=5zDhwpqf_yr+Z1HRtMPnACRyDGmDhZo45eKagVw@mail.gmail.com>
Date: Wed, 25 Sep 2024 20:45:03 +0800
From: zhang fangzheng <fangzheng.zhang1003@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: Fangzheng Zhang <fangzheng.zhang@...soc.com>, Christoph Lameter <cl@...ux.com>, 
	Pekka Enberg <penberg@...nel.org>, David Rientjes <rientjes@...gle.com>, 
	Joonsoo Kim <iamjoonsoo.kim@....com>, Andrew Morton <akpm@...ux-foundation.org>, 
	Vlastimil Babka <vbabka@...e.cz>, Roman Gushchin <roman.gushchin@...ux.dev>, 
	Hyeonggon Yoo <42.hyeyoo@...il.com>, linux-mm@...ck.org, linux-kernel@...r.kernel.org, 
	tkjos@...gle.com, Yuming Han <yuming.han@...soc.com>
Subject: Re: [PATCH 1/2] mm/slub: Add panic function when slub leaks

On Wed, Sep 25, 2024 at 4:10 PM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Wed, Sep 25, 2024 at 11:22:55AM +0800, Fangzheng Zhang wrote:
> > Perform real-time memory usage monitoring on the slub page
> > allocation paths, ie, kmalloc_large_alloced and alloc_slab_page.
> > When the usage exceeds the set threshole value, the panic function
> > will be triggered.
> >
> > Signed-off-by: Fangzheng Zhang <fangzheng.zhang@...soc.com>
> > ---
> >  mm/Kconfig | 11 ++++++++
> >  mm/slub.c  | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 87 insertions(+)
> >
> > diff --git a/mm/Kconfig b/mm/Kconfig
> > index 09aebca1cae3..60cf72d4f0da 100644
> > --- a/mm/Kconfig
> > +++ b/mm/Kconfig
> > @@ -255,6 +255,17 @@ config SLUB_TINY
> >
> >          If unsure, say N.
> >
> > +config SLUB_LEAK_PANIC
> > +     bool "Trigger panic when slub leaks"
> > +     default y
>
> "default y" is only there if the feature is required to boot the machine
> properly.  That's not the case here, sorry.
>
> thanks,
>
> greg k-h

Hi Greg,

The reason why the "default y" is set here is that config is only valid for
the functional code that works. To truly implement slub_leak_panic, the
parameters must be set effectively. And, the current parameters are all
in the default n.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ