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: <Pine.LNX.4.64.0702140919200.7480@alien.or.mcafeemobile.com>
Date:	Wed, 14 Feb 2007 09:52:20 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Russell King <rmk+lkml@....linux.org.uk>
cc:	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.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>,
	Evgeniy Polyakov <johnpol@....mipt.ru>,
	"David S. Miller" <davem@...emloft.net>,
	Benjamin LaHaise <bcrl@...ck.org>,
	Suparna Bhattacharya <suparna@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch 06/11] syslets: core, documentation

On Wed, 14 Feb 2007, Russell King wrote:

> Let me spell it out, since you appear to have completely missed my point.
> 
> At the moment, SKIP_TO_NEXT_ON_STOP is specified to jump a "jump a full
> syslet_uatom number of bytes".
> 
> If we end up with a system call being added which requires more than
> the currently allowed number of arguments (and it _has_ happened before)
> then either those syscalls are not accessible to syslets, or you need
> to increase the arg_ptr array.

I was thinking about this yesterday, since I honestly thought that this 
whole chaining, and conditions, and parameter lists, and argoument passed 
by pointers, etc... was at the end a little clumsy IMO.
Wouldn't a syslet look better like:

long syslet(void *ctx) {
	struct sctx *c = ctx;

	if (open(c->file, ...) == -1)
		return -1;
	read();
	send();
	blah();
	...
	return 0;
}

That'd be, instead of passing a chain of atoms, with the kernel 
interpreting conditions, and parameter lists, etc..., we let gcc 
do this stuff for us, and we pass the "clet" :) pointer to sys_async_exec, 
that exec the above under the same schedule-trapped environment, but in 
userspace. We setup a special userspace ad-hoc frame (ala signal), and we 
trap underneath task schedule attempt in the same way we do now.
We setup the frame and when we return from sys_async_exec, we basically 
enter the "clet", that will return to a ret_from_async, that will return 
to userspace. Or, maybe we can support both. A simple single-syscall exec 
in the way we do now, and a clet way for the ones that requires chains and 
conditions. Hmmm?



- Davide


-
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