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  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, 26 Nov 2007 17:23:01 -0800
From:	"H. Peter Anvin" <>
To:	Ulrich Drepper <>
CC:	Linus Torvalds <>,
	David Miller <>,,,,
Subject: Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

Ulrich Drepper wrote:
> Hash: SHA1
> H. Peter Anvin wrote:
>> No.
>> I already said I'm not looking at changing the calling convention for
>> existing syscalls.
> I did not suggest or ask for that at all.
> I was asking you to consider the real implementation details for a new
> syscall mechanism.
> We do not want to abandon the use of syscall/sysenter and go back to int
> (on x86/x86-64).  This means that you have to come up with a mechanism
> which hooks into the current syscall/sysenter path while preserving full
> backward compatibility.
> Now it's your turn.  How do you do this without additional costs?

- Add sys_new_call to the syscall table
- Create a stub thunk:

asmlinkage long sys_old_call(long parm1, long parm2, long parm3)
	return sys_new_call(parm1, parm2, parm3, 0);

We have 2^n examples on this in the kernel already.

Or, if the new syscall requires more than 6 parameters (with the current 

asmlinkage long sys_new_call6(long parm1, long parm2, long parm3,
			      long parm4, long parm5,
			      long __user *additional)
	long xparm[3];	/* 8 parameters, total */

	if (copy_from_user(xparm, additional, sizeof xparm)
	    != sizeof xparm)
		return -EFAULT;

	return sys_new_call(parm1, parm2, parm3, parm4, parm5,
			    xparm[0], xparm[1], xparm[2]);

This is a fixed-size copy from userspace, which obviously cannot be avoided.

The C version isn't optimal, obviously, hence my mentioning the 
possibility of doing it in the arch layer.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists