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: <20160706024830.GG13566@bbox>
Date:	Wed, 6 Jul 2016 11:48:30 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
CC:	Ganesh Mahendran <opensource.ganesh@...il.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Linux-MM <linux-mm@...ck.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Nitin Gupta <ngupta@...are.org>, <rostedt@...dmis.org>,
	<mingo@...hat.com>
Subject: Re: [PATCH v2 7/8] mm/zsmalloc: add __init,__exit attribute

On Tue, Jul 05, 2016 at 10:00:28AM +0900, Sergey Senozhatsky wrote:
> Hello Ganesh,
> 
> On (07/04/16 17:21), Ganesh Mahendran wrote:
> > > On (07/04/16 14:49), Ganesh Mahendran wrote:
> > > [..]
> > >> -static void zs_unregister_cpu_notifier(void)
> > >> +static void __exit zs_unregister_cpu_notifier(void)
> > >>  {
> > >
> > > this __exit symbol is called from `__init zs_init()' and thus is
> > > free to crash.
> > 
> > I change code to force the code goto notifier_fail where the
> > zs_unregister_cpu_notifier will be called.
> > I tested with zsmalloc module buildin and built as a module.
> 
> sorry, not sure I understand what do you mean by this.

It seems he tested it both builtin and module with simulating to fail
zs_register_cpu_notifier so that finally called zs_unergister_cpu_notifier.
With that, he cannot find any problem.
> 

> 
> > Please correct me, if I miss something.
> 
> you have an __exit section function being called from
> __init section:
> 
> static void __exit zs_unregister_cpu_notifier(void)
> {
> }
> 
> static int __init zs_init(void)
> {
> 	zs_unregister_cpu_notifier();
> }
> 
> it's no good.

Agree.

I didn't look at linker script how to handle it. Although it works well,
it would be not desirable to mark __exit to the function we already
know it would be called from non-exit functions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ