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]
Date:	Sun, 17 Apr 2016 20:00:54 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Josh Triplett <josh@...htriplett.org>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	"Theodore Ts'o" <tytso@....edu>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	"Richard W.M. Jones" <rjones@...hat.com>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	mingo@...hat.com, Andrew Morton <akpm@...ux-foundation.org>,
	luto@...nel.org, viro@...iv.linux.org.uk, zab <zab@...hat.com>,
	emunson@...mai.com,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Pavel Emelyanov <xemul@...allels.com>, sfr@...b.auug.org.au,
	Milosz Tanski <milosz@...in.com>,
	rostedt <rostedt@...dmis.org>, arnd@...db.de,
	ebiederm@...ssion.com, gorcunov <gorcunov@...nvz.org>,
	iulia manda21 <iulia.manda21@...il.com>,
	dave hansen <dave.hansen@...ux.intel.com>,
	mguzik <mguzik@...hat.com>, adobriyan@...il.com,
	Davidlohr Bueso <dave@...olabs.net>,
	linux-api <linux-api@...r.kernel.org>, gorcunov@...il.com,
	fw@...eb.enyo.de, Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v2 0/2] vfs: Define new syscall getumask.

On 04/17/16 19:37, Josh Triplett wrote:
> 
> It seems like one of the main problems with syscall() is that it forces
> userspace to handle weird ABI issues, such as syscall numbers varying by
> architecture, encoding of 64-bit arguments on 32-bit platforms (see the
> example in the syscall manpage), and other subtleties that will break on
> architectures other than the one the developer is most likely to be
> running.  libinux bindings would eliminate those issues.
> 
> What cases do you have in mind where the libinux binding should look
> different than the C API of the SYSCALL_DEFINE'd function in the kernel?
> 
> Users can still call the libc syscall when they want libc's behavior;
> for syscalls that have a libc binding, most users will want that
> version.  But I've often needed to call the underlying syscall even for
> syscalls that *do* have a libc binding, for various purposes, and having
> a standard way to do that while still having safe type signatures seems
> helpful.
> 
> This would also make it much easier to write an alternative libc, or a
> language standard library that doesn't want to depend on libc.
> 

The main problem has to do with types, and the fact that the C library
may want to intersperse itself around system calls.  If people start
writing programs that call, say, __linux_umask() then it would make it
hard for libc to do something special with umask().

There are other things like it, e.g. where dev_t and __kernel_dev_t are
concerned.

Now, we could of course have __linux_getrandom() and make a weak alias
for getrandom(), but I really don't understand the use case for
exporting all the system calls.

	-hpa


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ