From: "H. Peter Anvin" <hpa@zytor.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
David Miller <davem@davemloft.net>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
mingo@elte.hu, tglx@linutronix.de
Subject: Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets
Date: Mon, 26 Nov 2007 17:23:01 -0800 [thread overview]
Message-ID: <474B7175.3030002@zytor.com> (raw)
In-Reply-To: <474B6810.6070703@redhat.com>
Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 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
convention):
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.
-hpa
next prev parent reply other threads:[~2007-11-27 1:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 6:53 [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets Ulrich Drepper
2007-11-20 7:59 ` David Miller
2007-11-20 16:04 ` Ulrich Drepper
2007-11-20 18:13 ` H. Peter Anvin
2007-11-20 18:24 ` Zach Brown
2007-11-20 19:12 ` H. Peter Anvin
2007-11-20 22:22 ` Ingo Molnar
2007-11-20 22:33 ` Davide Libenzi
2007-11-20 22:42 ` Ingo Molnar
2007-11-20 23:25 ` H. Peter Anvin
2007-11-20 23:41 ` Ingo Molnar
2007-11-20 23:57 ` H. Peter Anvin
2007-11-26 18:17 ` Linus Torvalds
2007-11-26 18:45 ` Ingo Molnar
2007-11-26 19:07 ` H. Peter Anvin
2007-11-26 19:55 ` Davide Libenzi
2007-11-26 19:20 ` H. Peter Anvin
2007-11-26 23:25 ` Ulrich Drepper
2007-11-27 0:14 ` H. Peter Anvin
2007-11-27 0:42 ` Ulrich Drepper
2007-11-27 1:23 ` H. Peter Anvin [this message]
2007-11-27 2:14 ` Linus Torvalds
2007-11-27 2:38 ` H. Peter Anvin
2007-11-20 21:48 ` David Miller
2007-11-20 21:55 ` Zach Brown
2007-11-20 22:36 ` David Miller
2007-11-20 17:54 ` Zach Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=474B7175.3030002@zytor.com \
--to=hpa@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox