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: <alpine.LFD.2.00.1003211128520.18017@i5.linux-foundation.org>
Date:	Sun, 21 Mar 2010 11:38:08 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Alexey Dobriyan <adobriyan@...il.com>
cc:	Jiri Slaby <jirislaby@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Neil Horman <nhorman@...driver.com>,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: [git pull] pull request for writable limits for 2.6.34-rc0



On Sun, 21 Mar 2010, Alexey Dobriyan wrote:
> 
> It's a perfect opportunity to introduce getrlimit64(2), setrlimit64(2)
> _without_ involving /proc, without all bugs in setrlimit(2), without
> compat code, with all resources equal across arches, and, optionally,
> with infinity setting clearly separate from value (useful for C/R).

Yeah, the infinity setting should be cleaned up. I also wonder if we 
should clean up the odd file limit rules, and make them all be about 
bytes. Correct me if I'm wrong, but don't we do that whole file size thing 
in kilobytes right now?

I do also agree that maybe we could/should skip the whole "writable /proc" 
thing.

So introducing it as just two system calls:

	int getprlimit64(pid, limit, struct rlimit64 *);
	int setprlimit64(pid, limit, const struct rlimit64 *);

and having perhaps something like 'pid=0 means current' would look a lot 
prettier to me.

Or even just _one_ system call that takes two pointers, and can do an 
atomic replace-and-return-the-old-value, like 'sigaction()' does, ie 
something like

	int prlimit64(pid, limit, const struct rlimit64 *new, struct rlimit64 *old);

wouldn't that be a nice generic interface?

(Somebody should really check me on the whole "limit in kilobytes" thing - 
I may be _totally_ off there. I am too lazy to check the actual source 
code)

			Linus
--
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