<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/futex/syscalls.c, branch v6.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-09-29T08:37:05Z</updated>
<entry>
<title>futex: make futex_parse_waitv() available as a helper</title>
<updated>2023-09-29T08:37:05Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2023-06-13T14:31:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5177c0cb306a8628bafbf1e6b7aa7e1b7436b8dc'/>
<id>urn:sha1:5177c0cb306a8628bafbf1e6b7aa7e1b7436b8dc</id>
<content type='text'>
To make it more generically useful, augment it with allowing the caller
to pass in the wake handler and wake data. Convert the futex_waitv()
syscall, passing in the default handlers.

Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>futex: move FUTEX2_VALID_MASK to futex.h</title>
<updated>2023-09-29T08:36:16Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2023-07-21T14:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b0781595431acafe3db6596e12deb46975d91dd'/>
<id>urn:sha1:3b0781595431acafe3db6596e12deb46975d91dd</id>
<content type='text'>
We need this for validating the futex2 flags outside of the normal
futex syscalls.

Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>futex: Add sys_futex_requeue()</title>
<updated>2023-09-21T17:22:10Z</updated>
<author>
<name>peterz@infradead.org</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-09-21T10:45:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f4b5f972216782a4acb1ae00dcb55173847c2ff'/>
<id>urn:sha1:0f4b5f972216782a4acb1ae00dcb55173847c2ff</id>
<content type='text'>
Finish off the 'simple' futex2 syscall group by adding
sys_futex_requeue(). Unlike sys_futex_{wait,wake}() its arguments are
too numerous to fit into a regular syscall. As such, use struct
futex_waitv to pass the 'source' and 'destination' futexes to the
syscall.

This syscall implements what was previously known as FUTEX_CMP_REQUEUE
and uses {val, uaddr, flags} for source and {uaddr, flags} for
destination.

This design explicitly allows requeueing between different types of
futex by having a different flags word per uaddr.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20230921105248.511860556@noisy.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>futex: Add flags2 argument to futex_requeue()</title>
<updated>2023-09-21T17:22:09Z</updated>
<author>
<name>peterz@infradead.org</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-09-21T10:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27b88f3519e72d71c8cead6b835a26c171109c9b'/>
<id>urn:sha1:27b88f3519e72d71c8cead6b835a26c171109c9b</id>
<content type='text'>
In order to support mixed size requeue, add a second flags argument to
the internal futex_requeue() function.

No functional change intended.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20230921105248.396780136@noisy.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>futex: Add sys_futex_wait()</title>
<updated>2023-09-21T17:22:08Z</updated>
<author>
<name>peterz@infradead.org</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-09-21T10:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb8c4312afca1b2dc64107e7e7cea81911055612'/>
<id>urn:sha1:cb8c4312afca1b2dc64107e7e7cea81911055612</id>
<content type='text'>
To complement sys_futex_waitv()/wake(), add sys_futex_wait(). This
syscall implements what was previously known as FUTEX_WAIT_BITSET
except it uses 'unsigned long' for the value and bitmask arguments,
takes timespec and clockid_t arguments for the absolute timeout and
uses FUTEX2 flags.

The 'unsigned long' allows FUTEX2_SIZE_U64 on 64bit platforms.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20230921105248.164324363@noisy.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>futex: FLAGS_STRICT</title>
<updated>2023-09-21T17:22:07Z</updated>
<author>
<name>peterz@infradead.org</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-09-21T10:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43adf844951084c266f172561f84c5f8120dd60b'/>
<id>urn:sha1:43adf844951084c266f172561f84c5f8120dd60b</id>
<content type='text'>
The current semantics for futex_wake() are a bit loose, specifically
asking for 0 futexes to be woken actually gets you 1.

Adding a !nr check to sys_futex_wake() makes that it would return 0
for unaligned futex words, because that check comes in the shared
futex_wake() function. Adding the !nr check there, would affect the
legacy sys_futex() semantics.

Hence frob a flag :-(

Suggested-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20230921105248.048643656@noisy.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>futex: Add sys_futex_wake()</title>
<updated>2023-09-21T17:22:07Z</updated>
<author>
<name>peterz@infradead.org</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-09-21T10:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f6c532f59b20580acf8ede9409c9b8dce6e74e1'/>
<id>urn:sha1:9f6c532f59b20580acf8ede9409c9b8dce6e74e1</id>
<content type='text'>
To complement sys_futex_waitv() add sys_futex_wake(). This syscall
implements what was previously known as FUTEX_WAKE_BITSET except it
uses 'unsigned long' for the bitmask and takes FUTEX2 flags.

The 'unsigned long' allows FUTEX2_SIZE_U64 on 64bit platforms.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20230921105247.936205525@noisy.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>futex: Validate futex value against futex size</title>
<updated>2023-09-21T17:22:06Z</updated>
<author>
<name>peterz@infradead.org</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-09-21T10:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=698eb826383616ce0e817d2384da6413d1439fb6'/>
<id>urn:sha1:698eb826383616ce0e817d2384da6413d1439fb6</id>
<content type='text'>
Ensure the futex value fits in the given futex size. Since this adds a
constraint to an existing syscall, it might possibly change behaviour.

Currently the value would be truncated to a u32 and any high bits
would get silently lost.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20230921105247.828934099@noisy.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>futex: Flag conversion</title>
<updated>2023-09-21T17:22:05Z</updated>
<author>
<name>peterz@infradead.org</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-09-21T10:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5694289ce183bc3336407a78c8c722a0b9208f9b'/>
<id>urn:sha1:5694289ce183bc3336407a78c8c722a0b9208f9b</id>
<content type='text'>
Futex has 3 sets of flags:

 - legacy futex op bits
 - futex2 flags
 - internal flags

Add a few helpers to convert from the API flags into the internal
flags.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Link: https://lore.kernel.org/r/20230921105247.722140574@noisy.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>futex: Extend the FUTEX2 flags</title>
<updated>2023-09-21T17:22:05Z</updated>
<author>
<name>peterz@infradead.org</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-09-21T10:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6d08d24790e82c69a46ef78ae44fe1b1ed30775'/>
<id>urn:sha1:d6d08d24790e82c69a46ef78ae44fe1b1ed30775</id>
<content type='text'>
Add the definition for the missing but always intended extra sizes,
and add a NUMA flag for the planned numa extention.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Link: https://lore.kernel.org/r/20230921105247.617057368@noisy.programming.kicks-ass.net
</content>
</entry>
</feed>
