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:	Tue, 10 Jan 2012 09:14:14 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	Jon Masters <jcm@...hat.com>, linux-kernel@...r.kernel.org,
	Lucas De Marchi <lucas.demarchi@...fusion.mobi>
Subject: Re: [PATCH] modules: sysfs - export: taint, address, size

On Mon, 9 Jan 2012 13:44:52 +0100, Kay Sievers <kay.sievers@...y.org> wrote:
> On Mon, Jan 9, 2012 at 08:27, Rusty Russell <rusty@...tcorp.com.au> wrote:
> > The else here is weird.  Shouldn't we leave the exclusion elsewhere?
> 
> You mean the 'else if ... TAINT_OOT_MODULE'?  It's a one-to-one copy
> of the current code, which just moved up a bit.
> 
> Disconnect the two flags form each other?

Yes, I think so.

> > This copies a past mistake, and is definitely wrong.  Either expose both
> > pointers and sizes, or don't include init_size here.  Sure, it'll
> > normally be 0, but if not it's confusing...
> 
> Ah, good to know, mod->init_size is 0 for all modules here, so we
> should just drop mod->init_size and maybe name the 'size' attribute to
> 'coresize'?

If a module is still initializing, mod->init_size may well be non-zero.
Let's rename it to coresize, and add initsize.

> > But the bigger question is: Why are we exposing these sizes?
> > /proc/modules did since 2.2, or before, but that doesn't make it the
> > best option...
> 
> Good question, I doubt it is too useful, it's just that 'lsmod' shows
> it, so we wanted to show too.

And breaking lsmod output might kill some scripts.  So it stays.

Let's drop the address stuff though.

We can actually do something more radical: we could change the kernel to
call modprobe to resolve unresolved symbols.  We already support
symbol:<symbol> for symbol_request().

This means that modprobe still needs to maintain a sym->mod mapping
(though I would argue depmod should be moved into the kernel source),
but not any dependency mapping.

Thanks,
Rusty.
--
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