Thread (11 messages) 11 messages, 7 authors, 2020-11-19

Re: Is adding an argument to an existing syscall okay?

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: 2020-11-17 14:29:04

----- On Nov 16, 2020, at 6:57 PM, Andy Lutomirski luto@kernel.org wrote:
Linux 5.10 contains this patch:

commit 2a36ab717e8fe678d98f81c14a0b124712719840
Author: Peter Oskolkov [off-list ref]
Date:   Wed Sep 23 16:36:16 2020 -0700

   rseq/membarrier: Add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ

This adds an argument to an existing syscall.  Before the patch,
membarrier had 2 parameters; now it has 3.  Is this really okay?  At
least the patch is careful and ignores the third parameter unless a
previously unused flag bit is set.
Hi Andy,

I wondered about exactly this on August 12 2020:

https://lore.kernel.org/r/1477195446.6156.1597261492255.JavaMail.zimbra@efficios.com (local)

And then on August 25, after receiving no feedback, I told Peter to try this approach:

https://lore.kernel.org/r/1336467655.17779.1598374701401.JavaMail.zimbra@efficios.com (local)

and nobody complained until now. As you note, the extra argument is only used when
previously unused flag bits are set.

So your question is very relevant, and I still look forward to receiving feedback
on this matter.

Thanks,

Mathieu
--Andy
-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help