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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0702151159410.20368@woody.linux-foundation.org>
Date:	Thu, 15 Feb 2007 12:07:38 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Evgeniy Polyakov <johnpol@....mipt.ru>
cc:	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Christoph Hellwig <hch@...radead.org>,
	Andrew Morton <akpm@....com.au>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Ulrich Drepper <drepper@...hat.com>,
	Zach Brown <zach.brown@...cle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Benjamin LaHaise <bcrl@...ck.org>,
	Suparna Bhattacharya <suparna@...ibm.com>,
	Davide Libenzi <davidel@...ilserver.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch 05/11] syslets: core code



On Thu, 15 Feb 2007, Linus Torvalds wrote:
> 
> So I think that a good implementation just does everything up-front, and 
> doesn't _need_ a user buffer that is live over longer periods, except for 
> the actual results. Exactly because the whole alloc/teardown is nasty.

Btw, this doesn't necessarily mean "not supporting multiple atoms at all".

I think the batching of async things is potentially a great idea. I think 
it's quite workable for "open+fstat" kind of things, and I agree that it 
can solve other things too (the "socket+bind+connect+sendmsg+rcv" kind of 
complex setup things).

But I suspect that if we just said:
 - we limit these atom sequences to just linear sequences of max "n" ops
 - we read them all in in a single go at startup

we actually avoid several nasty issues. Not just the memory allocation 
issue in user space (now it's perfectly ok to build up a sequence of ops 
in temporary memory and throw it away once it's been submitted), but also 
issues like the 32-bit vs 64-bit compatibility stuff (the compat handlers 
would just convert it when they do the initial copying, and then the 
actual run-time wouldn't care about user-level pointers having different 
sizes etc).

Would it make the interface less cool? Yeah. Would it limit it to just a 
few linked system calls (to avoid memory allocation issues in the kernel)? 
Yes again. But it would simplify a lot of the interface issues.

It would _also_ allow the "sys_aio_read()" function to build up its 
*own* set of atoms in kernel space to actually do the read, and there 
would be no impact of the actual run-time wanting to read stuff from user 
space. Again - it's actually the same issue as with the compat system 
call: by making the interfaces do things up-front rather than dynamically, 
it becomes more static, but also easier to do interface translations. You 
can translate into any arbitrary internal format _once_, and be done with 
it.

I dunno. 

		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