<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/um/kernel, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'uml-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux</title>
<updated>2026-10-22T18:12:31+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-22T18:12:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7cd80b8168c9269e4b11788ce815c0f446ab5b34'/>
<id>7cd80b8168c9269e4b11788ce815c0f446ab5b34</id>
<content type='text'>
Pull UML updates from Johannes Berg:

 - NOMMU support, mostly for mm/ testing

   The only bigger change, we added support for building with
   !CONFIG_MMU, mostly for testing, e.g. via kunit. Some new
   selftests targetted to NOMMU are moving elsewhere, but are
   runnable on ARCH=um without MMU.

 - Tighter page permissions

   Tighten page permissions to catch more bugs (ARCH=um is,
   after all, often used for testing), and also mark __init
   memory inaccessible for the same reason.

 - Various maintenance/cleanups

   Fix build on really old hosts, fix leaks, make the code a
   bit more robust, header cleanups, typo fixes, the usual.

* tag 'uml-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (38 commits)
  um: place large BSS inputs in an output section
  um: fix shutdown __inittext access
  um: time-travel: fix sched_yield() behaviour
  um: require MMU for UML PCI support
  um: vector: avoid NULL queue dereference in legacy RX mode
  um: use %pB to print functions in stack traces
  um: mprotect() __init memory
  um: move init text between __init_begin/end
  um: improve checking for --no-warn-rwx-segments
  um: make stub compilation more robust
  um: link .lbss/.ldata/.lrodata correctly
  um: add perf-event support
  x86/um: remove unused &lt;asm/required-features.h&gt; header
  um: fix typo "hander" in comment
  um: Add definition of __NR_close_range for older host OSs
  um: virtio_uml: switch to dynamic root device
  um: Tighten exec permissions on page mappings
  Documentation: um: document nommu UML
  um: allow deselecting CONFIG_MMU
  um: nommu: add userspace runner processes
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull UML updates from Johannes Berg:

 - NOMMU support, mostly for mm/ testing

   The only bigger change, we added support for building with
   !CONFIG_MMU, mostly for testing, e.g. via kunit. Some new
   selftests targetted to NOMMU are moving elsewhere, but are
   runnable on ARCH=um without MMU.

 - Tighter page permissions

   Tighten page permissions to catch more bugs (ARCH=um is,
   after all, often used for testing), and also mark __init
   memory inaccessible for the same reason.

 - Various maintenance/cleanups

   Fix build on really old hosts, fix leaks, make the code a
   bit more robust, header cleanups, typo fixes, the usual.

* tag 'uml-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (38 commits)
  um: place large BSS inputs in an output section
  um: fix shutdown __inittext access
  um: time-travel: fix sched_yield() behaviour
  um: require MMU for UML PCI support
  um: vector: avoid NULL queue dereference in legacy RX mode
  um: use %pB to print functions in stack traces
  um: mprotect() __init memory
  um: move init text between __init_begin/end
  um: improve checking for --no-warn-rwx-segments
  um: make stub compilation more robust
  um: link .lbss/.ldata/.lrodata correctly
  um: add perf-event support
  x86/um: remove unused &lt;asm/required-features.h&gt; header
  um: fix typo "hander" in comment
  um: Add definition of __NR_close_range for older host OSs
  um: virtio_uml: switch to dynamic root device
  um: Tighten exec permissions on page mappings
  Documentation: um: document nommu UML
  um: allow deselecting CONFIG_MMU
  um: nommu: add userspace runner processes
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>um: place large BSS inputs in an output section</title>
<updated>2026-10-12T15:03:17+00:00</updated>
<author>
<name>Hajime Tazaki</name>
<email>thehajime@gmail.com</email>
</author>
<published>2026-10-09T05:28:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ad423aa2108485f8bc5dde51fdf9c1ed979ee4b'/>
<id>4ad423aa2108485f8bc5dde51fdf9c1ed979ee4b</id>
<content type='text'>
GNU ld requires input sections matched by a linker script to be
assigned to an output section. Place UML's .lbss inputs in a named
output section so the linker accepts the static UML linker script.

The .ldata inputs are already collected inside the .data output
section, so they do not need the same change.

Fixes: 779c65ede680 ("um: link .lbss/.ldata/.lrodata correctly")
Signed-off-by: Hajime Tazaki &lt;thehajime@gmail.com&gt;
Link: https://patch.msgid.link/20261009052826.179995-1-thehajime@gmail.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GNU ld requires input sections matched by a linker script to be
assigned to an output section. Place UML's .lbss inputs in a named
output section so the linker accepts the static UML linker script.

The .ldata inputs are already collected inside the .data output
section, so they do not need the same change.

Fixes: 779c65ede680 ("um: link .lbss/.ldata/.lrodata correctly")
Signed-off-by: Hajime Tazaki &lt;thehajime@gmail.com&gt;
Link: https://patch.msgid.link/20261009052826.179995-1-thehajime@gmail.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>um: fix shutdown __inittext access</title>
<updated>2026-09-30T06:28:02+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-09-28T07:39:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f88f5689de1a039764d00f466209acf0c010eaf'/>
<id>2f88f5689de1a039764d00f466209acf0c010eaf</id>
<content type='text'>
Since first moving __init text into the right place in commit
8966ed0b2d48 ("um: move init text between __init_begin/end")
and then making all init sections inaccessible, shutdown and
reboot crash instead of working correctly, for the obvious
reason that the functions are __init but run on the way out.

Removing the __init markers would work in some way, but that
would bubble through a lot of functions.

Instead, mark the relevant functions __noreturn (including
longjmp() since that's now needed so start_idle_thread() can
be __noreturn), and split out the part of main() that's done
on the way out into a new os_exit() function that's called
directly.

Reported-by: Hajime Tazaki &lt;thehajime@gmail.com&gt;
Closes: https://lore.kernel.org/linux-um/m24ifc4v6m.wl-thehajime@gmail.com/
Fixes: a418ab8fddea ("um: mprotect() __init memory")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Tested-by: Hajime Tazaki &lt;thehajime@gmail.com&gt;
Link: https://patch.msgid.link/20260928093934.ca7af44c59ca.I470ece16d176ea704aa6e5767b755055d106da35@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since first moving __init text into the right place in commit
8966ed0b2d48 ("um: move init text between __init_begin/end")
and then making all init sections inaccessible, shutdown and
reboot crash instead of working correctly, for the obvious
reason that the functions are __init but run on the way out.

Removing the __init markers would work in some way, but that
would bubble through a lot of functions.

Instead, mark the relevant functions __noreturn (including
longjmp() since that's now needed so start_idle_thread() can
be __noreturn), and split out the part of main() that's done
on the way out into a new os_exit() function that's called
directly.

Reported-by: Hajime Tazaki &lt;thehajime@gmail.com&gt;
Closes: https://lore.kernel.org/linux-um/m24ifc4v6m.wl-thehajime@gmail.com/
Fixes: a418ab8fddea ("um: mprotect() __init memory")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Tested-by: Hajime Tazaki &lt;thehajime@gmail.com&gt;
Link: https://patch.msgid.link/20260928093934.ca7af44c59ca.I470ece16d176ea704aa6e5767b755055d106da35@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>um: time-travel: fix sched_yield() behaviour</title>
<updated>2026-09-28T06:50:51+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-09-24T13:42:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0e70b1de88ef1973cf752ae27930683eb2acd338'/>
<id>0e70b1de88ef1973cf752ae27930683eb2acd338</id>
<content type='text'>
Just incrementing tt_extra_sched_jiffies can make this
drift enough to hit the softlockup detector, e.g. with
ping using sched_yield() in a loop to measure short
intervals. Make the simulation actually pass time, this
requires going to the external scheduler but actually
makes this sort of thing behave much better and avoids
the soft lockup.

Fixes: 887c5c12e80c ("um: work around sched_yield not yielding in time-travel mode")
Link: https://patch.msgid.link/20260924134223.1672004-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just incrementing tt_extra_sched_jiffies can make this
drift enough to hit the softlockup detector, e.g. with
ping using sched_yield() in a loop to measure short
intervals. Make the simulation actually pass time, this
requires going to the external scheduler but actually
makes this sort of thing behave much better and avoids
the soft lockup.

Fixes: 887c5c12e80c ("um: work around sched_yield not yielding in time-travel mode")
Link: https://patch.msgid.link/20260924134223.1672004-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>um: use %pB to print functions in stack traces</title>
<updated>2026-09-24T14:45:54+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-09-24T06:50:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ca6b181232d7d76d40075c80959c6a2cbed4b353'/>
<id>ca6b181232d7d76d40075c80959c6a2cbed4b353</id>
<content type='text'>
In a stack trace we get the return address, so if the call is at
the end of a function, it can get printed as the next function,
e.g.

  vpanic+0x1d3/0x435
  abort+0x0/0x4e
  do_exit+0x29c/0xcb7
  sys_exit_group+0x0/0x16
  pid_child_should_wake+0x0/0x83

Use %pB like on x86, which resolves the name with address - 1,
in the same example I get:

  vpanic+0x1d3/0x435
  panic+0x55/0x55
  do_exit+0x29c/0xcb7
  do_group_exit+0xbe/0xbe
  sys_exit_group+0x16/0x16

Link: https://patch.msgid.link/20260924085002.3ff9ca1de60a.I5ff299b6f3196ad3c51c3032a90c7158c1bbccda@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a stack trace we get the return address, so if the call is at
the end of a function, it can get printed as the next function,
e.g.

  vpanic+0x1d3/0x435
  abort+0x0/0x4e
  do_exit+0x29c/0xcb7
  sys_exit_group+0x0/0x16
  pid_child_should_wake+0x0/0x83

Use %pB like on x86, which resolves the name with address - 1,
in the same example I get:

  vpanic+0x1d3/0x435
  panic+0x55/0x55
  do_exit+0x29c/0xcb7
  do_group_exit+0xbe/0xbe
  sys_exit_group+0x16/0x16

Link: https://patch.msgid.link/20260924085002.3ff9ca1de60a.I5ff299b6f3196ad3c51c3032a90c7158c1bbccda@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>um: mprotect() __init memory</title>
<updated>2026-09-24T14:45:54+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-09-24T06:49:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a418ab8fddea49f937f50ac860314ce5d3d9398a'/>
<id>a418ab8fddea49f937f50ac860314ce5d3d9398a</id>
<content type='text'>
Unlike what the comment says, we could munmap() this (but
not reuse it for guest allocations), but then stray libc
allocations could technically conflict, so mprotect() it
to catch access bugs. Align it in the linker scripts too
so that all of it can be covered, not just some.

Link: https://patch.msgid.link/20260924084946.d118ec78e604.I993b671566a4e842dcc290b78f1c0004050362ba@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unlike what the comment says, we could munmap() this (but
not reuse it for guest allocations), but then stray libc
allocations could technically conflict, so mprotect() it
to catch access bugs. Align it in the linker scripts too
so that all of it can be covered, not just some.

Link: https://patch.msgid.link/20260924084946.d118ec78e604.I993b671566a4e842dcc290b78f1c0004050362ba@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>um: move init text between __init_begin/end</title>
<updated>2026-09-24T14:45:54+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-09-24T06:49:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8966ed0b2d48f93016379e74f6b884b1003a9023'/>
<id>8966ed0b2d48f93016379e74f6b884b1003a9023</id>
<content type='text'>
Today only the init data is there, which means any
backtrace (or other pointer printing) involving an
__init function can't print its name.

Move the initdata and include the init text between
the markers so this works.

This also enables unmapping the initdata since it's
no longer part of the overall data (which kmemleak
scans, so it would crash otherwise).

Link: https://patch.msgid.link/20260924084946.2bfe0f25e6e2.I021d3a909687794eb2c3435fdfcb7f67e3ec4ba1@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Today only the init data is there, which means any
backtrace (or other pointer printing) involving an
__init function can't print its name.

Move the initdata and include the init text between
the markers so this works.

This also enables unmapping the initdata since it's
no longer part of the overall data (which kmemleak
scans, so it would crash otherwise).

Link: https://patch.msgid.link/20260924084946.2bfe0f25e6e2.I021d3a909687794eb2c3435fdfcb7f67e3ec4ba1@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>um: make stub compilation more robust</title>
<updated>2026-09-24T14:45:53+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-09-23T15:34:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d5f40f0b4bd185bf477c4a579774d2eafd302da7'/>
<id>d5f40f0b4bd185bf477c4a579774d2eafd302da7</id>
<content type='text'>
With clang, stub compilation could result in getting stack
frames where none are allowed, or ways of making it be not
relocatable. Set -ftrivial-auto-var-init=uninitialized for
more code, and -fomit-frame-pointer as well to avoid these
issues.

Link: https://patch.msgid.link/20260923173523.9cb03214335b.Ie1487657bc0f464f4911e95f532ab010b32864b8@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With clang, stub compilation could result in getting stack
frames where none are allowed, or ways of making it be not
relocatable. Set -ftrivial-auto-var-init=uninitialized for
more code, and -fomit-frame-pointer as well to avoid these
issues.

Link: https://patch.msgid.link/20260923173523.9cb03214335b.Ie1487657bc0f464f4911e95f532ab010b32864b8@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>um: link .lbss/.ldata/.lrodata correctly</title>
<updated>2026-09-24T14:45:53+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2026-09-23T15:34:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=779c65ede6800595ec620b0b10aae7d5a5469cbd'/>
<id>779c65ede6800595ec620b0b10aae7d5a5469cbd</id>
<content type='text'>
clang 23 for me seems to put a bunch of data into these
"large" sections, causing said data to not be considered
kernel data by the kernel, in turn causing all kinds of
strange bugs. Link the data from these sections in the
right place rather than leaving them separate.

Link: https://patch.msgid.link/20260923173523.3675aee4f2fc.Id8b553b971d1428abb1bd1222016758314af3098@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clang 23 for me seems to put a bunch of data into these
"large" sections, causing said data to not be considered
kernel data by the kernel, in turn causing all kinds of
strange bugs. Link the data from these sections in the
right place rather than leaving them separate.

Link: https://patch.msgid.link/20260923173523.3675aee4f2fc.Id8b553b971d1428abb1bd1222016758314af3098@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>um: Tighten exec permissions on page mappings</title>
<updated>2026-09-24T14:45:52+00:00</updated>
<author>
<name>Tiwei Bie</name>
<email>tiwei.btw@antgroup.com</email>
</author>
<published>2026-05-17T23:36:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f42c8879ebb6dbad07a7af74b02b0ee1c15b42d4'/>
<id>f42c8879ebb6dbad07a7af74b02b0ee1c15b42d4</id>
<content type='text'>
In UML, page mappings are backed by mmap, which allows us to
effectively manage exec permissions. Introduce a _PAGE_EXEC
bit so that pages can be mapped without granting unnecessary
exec permissions.

Signed-off-by: Tiwei Bie &lt;tiwei.btw@antgroup.com&gt;
Link: https://patch.msgid.link/20260517233641.127433-1-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In UML, page mappings are backed by mmap, which allows us to
effectively manage exec permissions. Introduce a _PAGE_EXEC
bit so that pages can be mapped without granting unnecessary
exec permissions.

Signed-off-by: Tiwei Bie &lt;tiwei.btw@antgroup.com&gt;
Link: https://patch.msgid.link/20260517233641.127433-1-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
