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:	Mon, 5 Feb 2007 13:09:17 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
cc:	Zach Brown <zach.brown@...cle.com>, Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-aio@...ck.org, Suparna Bhattacharya <suparna@...ibm.com>,
	Benjamin LaHaise <bcrl@...ck.org>
Subject: Re: [PATCH 2 of 4] Introduce i386 fibril scheduling

On Mon, 5 Feb 2007, Linus Torvalds wrote:

> Indeed. One word is *exactly* what a normal system call returns too.
> 
> That said, normally we have a user-space library layer to turn that into 
> the "errno + return value" thing, and in the case of async() calls we 
> very basically wouldn't have that. So either:
> 
>  - we'd need to do it in the kernel (which is actually nasty, since 
>    different system calls have slightly different semantics - some don't 
>    return any error value at all, and negative numbers are real numbers)
> 
>  - we'd have to teach user space about the "negative errno" mechanism, in 
>    which case one word really is alwats enough.
> 
> Quite frankly, I much prefer the second alternative. The "negative errno" 
> thing has not only worked really really well inside the kernel, it's so 
> obviously 100% superior to the standard UNIX "-1 + errno" approach that 
> it's not even funny. 

Currently it's in the syscall wrapper. Couldn't we have it in the 
asys_teardown_stack() stub?



> HOWEVER, they get returned differently. The cookie gets returned 
> immediately, the system call result gets returned in-memory only after the 
> async thing has actually completed.
> 
> I would actually argue that it's not the kernel that should generate any 
> cookie, but that user-space should *pass*in* the cookie it wants to, and 
> the kernel should consider it a pointer to a 64-bit entity which is the 
> return code.

Yes. Let's have the userspace to "mark" the async operation. IMO the 
cookie should be something transparent to the kernel.
Like you said though, that'd require compat-code (unless we fix the size).



- 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