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] [day] [month] [year] [list]
Date:	Mon, 10 Feb 2014 11:43:39 -0800
From:	Linus Torvalds <>
To:	Andy Lutomirski <>
Cc:	Richard Yao <>, Mel Gorman <>,
	Andrew Morton <>,
	Rik van Riel <>,
	Eric Van Hensbergen <>,
	Ron Minnich <>,
	Latchesar Ionkov <>,
	"David S. Miller" <>,
	V9FS Develooper Mailing List 
	Linux Netdev Mailing List <>,
	Linux Kernel Mailing List <>,
	"Aneesh Kumar K.V" <>,
	Will Deacon <>,
	Christopher Covington <>,
	Matthew Thode <>
Subject: Re: [PATCH 1/2] mm/vmalloc: export is_vmalloc_or_module_addr

On Mon, Feb 10, 2014 at 11:33 AM, Andy Lutomirski <> wrote:
> I agree that reading to module space is awful, but is it obviously
> terrible for a module to do this:
> static const char header[] = {...};
> kernel_write(file, header, sizeof(header), 0);

Yes, it is terrible. Don't do it. It shouldn't work.

Now, whether it is "obvious" or not is immaterial. It might be hard to
notice, but let's face it, we are kernel programmers. Our interfaces
aren't designed for convenience, they are for working well and
efficiently.  And if that happens to mean that you shouldn't do IO on
kmap'ed pages, or use random static data in your modules, that is what
it means.

We have lots of other rules too. People should deal with it, and
realize that in the kernel we absolutely *have* to try to minimize the
problem space as much as possible.

The usual computer sciencey approach of "make things as generic as
possible so that you can reuse the code" stuff is generally bullshit
even in other contexts (example: STL), but it's _particularly_ bad for
the kernel. It's much better to have strict rules about what is

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists