<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/um/include/shared/os.h, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-03-20T08:28:44Z</updated>
<entry>
<title>um: Rewrite the sigio workaround based on epoll and tgkill</title>
<updated>2025-03-20T08:28:44Z</updated>
<author>
<name>Tiwei Bie</name>
</author>
<published>2025-03-15T16:19:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc'/>
<id>urn:sha1:33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc</id>
<content type='text'>
The existing sigio workaround implementation removes FDs from the
poll when events are triggered, requiring users to re-add them via
add_sigio_fd() after processing. This introduces a potential race
condition between FD removal in write_sigio_thread() and next_poll
update in __add_sigio_fd(), and is inefficient due to frequent FD
removal and re-addition. Rewrite the implementation based on epoll
and tgkill for improved efficiency and reliability.

Signed-off-by: Tiwei Bie &lt;tiwei.btw@antgroup.com&gt;
Link: https://patch.msgid.link/20250315161910.4082396-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: Add pthread-based helper support</title>
<updated>2025-03-20T08:26:38Z</updated>
<author>
<name>Tiwei Bie</name>
</author>
<published>2025-03-19T13:55:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f087eafdcef24b7160b097ddb9704084767b77a'/>
<id>urn:sha1:4f087eafdcef24b7160b097ddb9704084767b77a</id>
<content type='text'>
Introduce a new set of utility functions that can be used to create
pthread-based helpers. Helper threads created in this way will ensure
thread safety for errno while sharing the same memory space.

Signed-off-by: Tiwei Bie &lt;tiwei.btw@antgroup.com&gt;
Link: https://patch.msgid.link/20250319135523.97050-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: remove copy_from_kernel_nofault_allowed</title>
<updated>2025-03-18T10:03:29Z</updated>
<author>
<name>Benjamin Berg</name>
</author>
<published>2025-02-10T16:09:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84a6fc378471fbeaf48f8604566a5a33a3d63c18'/>
<id>urn:sha1:84a6fc378471fbeaf48f8604566a5a33a3d63c18</id>
<content type='text'>
There is no need to override the default version of this function
anymore as UML now has proper _nofault memory access functions.

Doing this also fixes the fact that the implementation was incorrect as
using mincore() will incorrectly flag pages as inaccessible if they were
swapped out by the host.

Fixes: f75b1b1bedfb ("um: Implement probe_kernel_read()")
Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Link: https://patch.msgid.link/20250210160926.420133-3-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: remove broken double fault detection</title>
<updated>2024-11-07T16:36:31Z</updated>
<author>
<name>Benjamin Berg</name>
</author>
<published>2024-11-03T15:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce6e85a186c28ab0ca024580cba93fa19147c72b'/>
<id>urn:sha1:ce6e85a186c28ab0ca024580cba93fa19147c72b</id>
<content type='text'>
The show_stack function had some code to detect double faults. However,
the logic is wrong and it would e.g. trigger if a WARNING happened
inside an IRQ.

Remove it without trying to add a new logic. The current behaviour,
which will just fault repeatedly until the IRQ stack is used up and the
host kills UML, seems to be good enough.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Link: https://patch.msgid.link/20241103150506.1367695-5-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: remove file sync for stub data</title>
<updated>2024-11-07T16:36:30Z</updated>
<author>
<name>Benjamin Berg</name>
</author>
<published>2024-11-03T15:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37c691151e52f7762afa147ffb6e412ee0b5e8ac'/>
<id>urn:sha1:37c691151e52f7762afa147ffb6e412ee0b5e8ac</id>
<content type='text'>
There is no need to sync the stub code to "disk" for the other process
to see the correct memory. Drop the fsync there and remove the helper
function.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Link: https://patch.msgid.link/20241103150506.1367695-3-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: Add os_set_pdeathsig helper function</title>
<updated>2024-10-25T09:34:54Z</updated>
<author>
<name>Tiwei Bie</name>
</author>
<published>2024-10-24T14:28:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e5adbe447db382cc76e05613581f96aef4f91d2'/>
<id>urn:sha1:4e5adbe447db382cc76e05613581f96aef4f91d2</id>
<content type='text'>
This helper can be used to set the parent-death signal of the calling
process to SIGKILL to ensure that the process will be killed if the
UML kernel dies unexpectedly without proper cleanup. This helper will
be used in the follow-up patches.

Signed-off-by: Tiwei Bie &lt;tiwei.btw@antgroup.com&gt;
Link: https://patch.msgid.link/20241024142828.2612828-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: Abandon the _PAGE_NEWPROT bit</title>
<updated>2024-10-23T07:52:49Z</updated>
<author>
<name>Tiwei Bie</name>
</author>
<published>2024-10-11T10:23:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2717c6b649e1840328c2758a478bf4034a22ac3e'/>
<id>urn:sha1:2717c6b649e1840328c2758a478bf4034a22ac3e</id>
<content type='text'>
When a PTE is updated in the page table, the _PAGE_NEWPAGE bit will
always be set. And the corresponding page will always be mapped or
unmapped depending on whether the PTE is present or not. The check
on the _PAGE_NEWPROT bit is not really reachable. Abandoning it will
allow us to simplify the code and remove the unreachable code.

Reviewed-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Signed-off-by: Tiwei Bie &lt;tiwei.btw@antgroup.com&gt;
Link: https://patch.msgid.link/20241011102354.1682626-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: Discover host_task_size from envp</title>
<updated>2024-10-10T11:37:22Z</updated>
<author>
<name>Benjamin Berg</name>
</author>
<published>2024-09-19T12:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68b9883cc16ec2ce699d832ef60241b1a4e47d33'/>
<id>urn:sha1:68b9883cc16ec2ce699d832ef60241b1a4e47d33</id>
<content type='text'>
When loading the UML binary, the host kernel will place the stack at the
highest possible address. It will then map the program name and
environment variables onto the start of the stack.

As such, an easy way to figure out the host_task_size is to use the
highest pointer to an environment variable as a reference.

Ensure that this works by disabling address layout randomization and
re-executing UML in case it was enabled.

This increases the available TASK_SIZE for 64 bit UML considerably.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Link: https://patch.msgid.link/20240919124511.282088-9-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: remove auxiliary FP registers</title>
<updated>2024-10-10T10:10:30Z</updated>
<author>
<name>Benjamin Berg</name>
</author>
<published>2024-10-04T23:38:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6ce72005d1af98b983cc27aaa770afa66a1ca90'/>
<id>urn:sha1:c6ce72005d1af98b983cc27aaa770afa66a1ca90</id>
<content type='text'>
We do not need the extra save/restore of the FP registers when getting
the fault information. This was originally added in commit 2f56debd77a8
("uml: fix FP register corruption") but at that time the code was not
saving/restoring the FP registers when switching to userspace. This was
fixed in commit fbfe9c847edf ("um: Save FPU registers between task
switches") and since then the auxiliary registers have not been useful.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Link: https://patch.msgid.link/20241004233821.2130874-1-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: Remove unused os_getpgrp function</title>
<updated>2024-10-10T10:02:04Z</updated>
<author>
<name>Benjamin Berg</name>
</author>
<published>2024-09-13T13:44:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71fae9dfa7e3a987886c8baf235d5a0b96e5dc15'/>
<id>urn:sha1:71fae9dfa7e3a987886c8baf235d5a0b96e5dc15</id>
<content type='text'>
The function is not used anywhere.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Link: https://patch.msgid.link/20240913134442.967599-5-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
</feed>
