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]
Date:	Mon, 23 Jul 2007 16:42:24 -0700
From:	"Dan Williams" <dan.j.williams@...il.com>
To:	"Rusty Russell" <rusty@...tcorp.com.au>
Cc:	"Adrian Bunk" <bunk@...sta.de>,
	"Nelson, Shannon" <shannon.nelson@...el.com>,
	"Gabriel C" <nix.or.die@...glemail.com>,
	lkml <linux-kernel@...r.kernel.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	lksctp-developers@...ts.sourceforge.net
Subject: Re: __unsafe() usage

On 7/23/07, Rusty Russell <rusty@...tcorp.com.au> wrote:
> On Mon, 2007-07-23 at 19:59 +0200, Adrian Bunk wrote:
> > On Mon, Jul 23, 2007 at 09:05:54AM -0700, Nelson, Shannon wrote:
> > > Gabriel C [mailto:nix.or.die@...glemail.com]
> > > >
> > > >Hi,
> > > >
> > > >I got this warning on current git using gcc 4.2.1 :
> > > >
> > > >...
> > > >
> > > >drivers/dma/ioatdma.c: In function 'ioat_init_module':
> > > >drivers/dma/ioatdma.c:816: warning: the address of
> > > >'__this_module' will always evaluate as 'true'
> > >...
> >
> > I'm less interested in why this gives a warning, more interesting is the
> > code:
> >         __unsafe(THIS_MODULE);
> >
> > @Rusty:
> > As far as I understand it, __unsafe() wasn't intended for such a usage,
> > and simply not providing an exit function would be the right solution?
> > If this is true, and since the MOD_INC_USE_COUNT compat code is long
> > gone, shouldn't we be able to completely remove __unsafe() and the
> > struct member "unsafe"?
>
> Yes, indeed, something like this:
> ==
> Remove "unsafe" from module struct
>
> Adrian Bunk points out that "unsafe" was used to mark modules touched by
> the deprecated MOD_INC_USE_COUNT interface, which has long gone.  It's
> time to remove the member from the module structure, as well.
>
> If you want a module which can't unload, don't register an exit
> function.
>
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>

Acked-by: Dan Williams <dan.j.williams@...el.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ