On Sat, 8 Feb 2025 at 21:32, Thomas Weißschuh wrote:
>
> Usermode Linux uses "um" as primary architecture name and the underlying
> physical architecture is provided in "SUBARCH".
> Resolve the target architecture flags through that underlying architecture.
> This is the same pattern as used by sc
t a patch[1] to
fix it. (Though note that 32-bit UML/Rust still hits issues with
atomics in the block driver, so you'll need to disable that for now.)
Regardless, this is a significant improvement, thanks!
Reviewed-by: David Gow
Thanks,
-- David
[1]:
https://lore.kernel.org/rust-for-linu
t x86.
Move the target definition outside the conditional block, and update the
condition to take into account the gcc version.
Fixes: a3046a618a28 ("um: Only disable SSE on clang to work around old GCC
bugs")
Signed-off-by: David Gow
---
When combined with Thomas' patch [1]
On Mon, 11 Nov 2024 at 14:27, Hajime Tazaki wrote:
>
> This is a series of patches of nommu arch addition to UML. It would
> be nice to ask comments/opinions on this.
>
> There are still several limitations/issues which we already found;
> here is the list of those issues.
>
> - prompt configured
om/
> Signed-off-by: Johannes Berg
> ---
Thanks very much: this is much nicer, and works on all of the
differently problematic compilers I've tried.
The explanation of the stack space calculation is useful, too.
Reviewed-by: David Gow
Cheers,
-- David
> arch/um/kernel/skas/stub_
isn't necessarily the
_correct_ way of solving the problem, but it avoids the need to rewrite
__start in assembly for each architecture for now.
Fixes: 32e8eaf263d9 ("um: use execveat to create userspace MMs")
Signed-off-by: David Gow
---
Changes since v1:
https://lore
On Fri, 18 Oct 2024 at 07:10, David Gow wrote:
>
> The stub_exe could segfault when built with some compilers (e.g. gcc
> 13.2.0), as SSE instructions which relied on stack alignment could be
> generated, but the stack was misaligned.
>
> This seems to be due to the __start ent
On Thu, 17 Oct 2024 at 20:05, Benjamin Berg wrote:
>
> Hi,
>
> On Thu, 2024-10-17 at 10:18 +0200, Johannes Berg wrote:
> > [SNIP]
> >
> > I wonder now if the SSE instructions generated are memset() and that
> > goes away with the patches that Nathan just sent to not have the memset
> > (which was
ot;um: use execveat to create userspace MMs")
Signed-off-by: David Gow
---
See the discussion here:
https://lore.kernel.org/linux-um/c7c5228e9de1e79dc88b304e28d25f5ffd7e36dd.ca...@sipsolutions.net/T/#m90c1c5b6c34ebaaa043b402e97009c5825fd158a
---
arch/um/kernel/skas/stub_exe.c | 2 +-
1
On Thu, 19 Sept 2024 at 20:45, Benjamin Berg wrote:
>
> From: Benjamin Berg
>
> Using clone will not undo features that have been enabled by libc. An
> example of this already happening is rseq, which could cause the kernel
> to read/write memory of the userspace process. In the future the
> stan
a ("rust: block: introduce `kernel::block::mq` module")
Signed-off-by: David Gow
---
Hi all,
I encountered this build error with Rust/UML since the kernel::block::mq
stuff landed. I'm not 100% sure just swapping AtomicU64 with AtomicU32
is correct -- please correct me if not --
hub[2].
[1]: https://github.com/rust-lang/rust/issues/116972
[2]: https://github.com/Rust-for-Linux/linux/pull/966
Signed-off-by: David Gow
---
Documentation/rust/arch-support.rst | 2 +-
arch/um/Kconfig | 2 +-
rust/Makefile | 2 +-
scripts/Mak
wing compile
error:
error: :0:0: in function _RNvMNtCs5QSdWC790r4_4core3f32f7next_up float
(float): SSE register return with SSE disabled
Fixes: f82811e22b48 ("rust: Refactor the build target to allow the use of
builtin targets")
Signed-off-by: David Gow
---
arch/x86/Makefile.um | 1
On Mon, 22 Apr 2024 at 21:36, Guenter Roeck wrote:
>
> On 4/22/24 06:08, Mickaël Salaün wrote:
> > On Fri, Apr 19, 2024 at 04:38:01PM -0700, Guenter Roeck wrote:
> >> On Fri, Apr 19, 2024 at 03:33:49PM -0700, Guenter Roeck wrote:
> >>> Hi,
> >>>
> >>> On Tue, Mar 19, 2024 at 11:48:57AM +0100, Mick
ad of calling kthread_complete_and_exit(). Because thread's exit
> code is never checked, always set it to 0 to make it clear.
>
> Fix the -EINTR error message, which couldn't be reached until now.
>
> This is tested with a following patch.
>
> Cc: Brendan Higgins
> Cc: Sh
On Fri, 23 Feb 2024 at 22:07, Petr Tesarik wrote:
>
> From: Petr Tesarik
>
> If a segmentation fault is caused by accessing an address in the vmalloc
> area, check that the target page is present.
>
> Currently, if the kernel hits a guard page in the vmalloc area, UML blindly
> assumes that the f
ad of calling kthread_complete_and_exit(). Because thread's exit
> code is never checked, always set it to 0 to make it clear.
>
> Fix the -EINTR error message, which couldn't be reached until now.
>
> This is tested with a following patch.
>
> Cc: Brendan Higgins
>
c.
>
> Tested with:
> ./tools/testing/kunit/kunit.py run --arch x86_64 kunit_fault
> ./tools/testing/kunit/kunit.py run --arch arm64 \
> --cross_compile=aarch64-linux-gnu- kunit_fault
>
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Cc: Shuah Khan
> Signed-off-
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote:
>
> This helps identify the location of test faults.
>
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Cc: Shuah Khan
> Reviewed-by: Kees Cook
> Signed-off-by: Mickaël Salaün
> Link: https://lore.kernel
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote:
>
> Fix KUNIT_SUCCESS() calls to pass a test argument.
>
> This is a no-op for now because this macro does nothing, but it will be
> required for the next commit.
>
> Cc: Brendan Higgins
> Cc: David Gow
> Cc:
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote:
>
> The exit code is always checked, so let's properly handle the -ETIMEDOUT
> error code.
>
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Cc: Shuah Khan
> Reviewed-by: Kees Cook
> Signed-of
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote:
>
> There is a race condition when a kthread finishes after the deadline and
> before the call to kthread_stop(), which may lead to use after free.
>
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Cc: Shuah K
ode returned by kthread_run(), which will mark the test as failed and
> print "internal error occurred...".
>
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Cc: Shuah Khan
> Reviewed-by: Kees Cook
> Signed-off-by: Mickaël Salaün
> Link: https://lore.
On Fri, 1 Mar 2024 at 01:04, Mickaël Salaün wrote:
>
> Hi,
>
Thanks very much. I think there's a lot going on in this series, and
it'd probably be easier to address if it were broken up a bit more.
To take things one at a time:
> This patch series moves KUnit test execution at the very end of k
al address 02016f88
...
Call trace:
kfree+0x30/0x184
kunit_run_all_tests+0x88/0x154
kernel_init+0x6c/0x1e0
ret_from_fork+0x10/0x20
Code: b25f7be1 aa0003f4 d34cfe73 8b131833 (f9400661)
---[ end trace 00000000 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x000
On Sat, 3 Feb 2024 at 03:59, Stephen Boyd wrote:
>
> Add a KUnit test that confirms a DTB has been loaded, i.e. there is a
> root node, and that the of_have_populated_dt() API works properly.
>
> Cc: Rob Herring
> Cc: Frank Rowand
> Cc: David Gow
> Cc: Brendan Higgins
On Tue, 23 Jan 2024 at 06:48, Stephen Boyd wrote:
>
> Quoting David Gow (2024-01-15 21:03:12)
> > On Sat, 13 Jan 2024 at 04:07, Stephen Boyd wrote:
> > >
> > > Add a KUnit test that confirms a DTB has been loaded, i.e. there is a
> > > root node, and th
On Sat, 13 Jan 2024 at 04:07, Stephen Boyd wrote:
>
> Add a KUnit test that confirms a DTB has been loaded, i.e. there is a
> root node, and that the of_have_populated_dt() API works properly.
>
> Cc: Rob Herring
> Cc: Frank Rowand
> Cc: David Gow
> Cc: Brendan
too, I suppose.) There shouldn't be any
merge conflicts on our side.
Reviewed-by: David Gow
Cheers,
-- David
> Documentation/dev-tools/kunit/running_tips.rst | 11 +++
> 1 file changed, 11 insertions(+)
>
> diff --git a/Documentation/dev-tools/kunit/running_tip
n gcc 6!
I assume this will go in via the UML tree, but if you want, we can
take it via KUnit.
Tested-by: David Gow
Cheers,
-- David
> arch/um/Makefile-skas | 5 +
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/um/Makefile-skas b/arch/um/Makefile-skas
> index ac35de53
share the same implementation between UML and
"normal" x86.
Signed-off-by: David Gow
---
Note that there is a further issue with the pre-pentium-pro codepath in
the shared x86 code, which I'll send a separate fix out for. i686+ works
fine with just this series.
---
arch/x86/um/Makef
when either C code or non-asm-compatible preprocessor
directives are included.
Just wrap the contents behind an #ifndef __ASSEMBLY__ to avoid any C
code making its way in.
Signed-off-by: David Gow
---
This is requrired for patch #2 here, as UML uses this asm-generic
header, but works with x86
-off-by: Vincent Whitchurch
> ---
Thanks: I stumbled into this the other day and ran out of time to debug it.
I've tested that it works here.
Tested-by: David Gow
Cheers,
-- David
> arch/x86/lib/memcpy_64.S | 4
> arch/x86/lib/memmove_64.S | 4
> arch/x8
On Sat, 18 Mar 2023 at 12:16, David Gow wrote:
>
> As part of the Rust support for UML, we disable SSE (and similar flags)
> to match the normal x86 builds. This both makes sense (we ideally want a
> similar configuration to x86), and works around a crash bug with SSE
> generation
On Thu, 23 Mar 2023 at 09:08, Mark Brown wrote:
>
> I've been trying to do some stuff with KUnit but I can't seem to
> find a current tree where KUnit builds. Running on Debian stable
> starting from a clean -next tree and running:
>
>./tools/testing/kunit/kunit.py config
>./tools/testing
654a82acd607fdcbc93ad593c.ca...@huaweicloud.com/
Tested-by: Roberto Sassu
Tested-by: SeongJae Park
Signed-off-by: David Gow
---
arch/x86/Makefile.um | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index b70559b821df..2106a2bd152b 100644
--- a/arch/x8
On Thu, 16 Mar 2023 at 08:45, Frank Rowand wrote:
>
> On 3/15/23 16:35, Frank Rowand wrote:
> > On 3/15/23 02:04, David Gow wrote:
> >> On Tue, 14 Mar 2023 at 12:28, Frank Rowand wrote:
> >>>
> >>> On 3/13/23 11:02, Frank Rowand wrote:
> >>&g
On Tue, 14 Mar 2023 at 12:28, Frank Rowand wrote:
>
> On 3/13/23 11:02, Frank Rowand wrote:
> > On 3/11/23 00:42, David Gow wrote:
> >> On Sat, 11 Mar 2023 at 07:34, Stephen Boyd wrote:
> >>>
> >>> Quoting David Gow (2023-03-10 00:09:48)
> >&g
On Sat, 11 Mar 2023 at 07:34, Stephen Boyd wrote:
>
> Quoting David Gow (2023-03-10 00:09:48)
> > On Fri, 10 Mar 2023 at 07:19, Stephen Boyd wrote:
> > >
> > >
> > > Hmm. I think you're suggesting that the unit test data be loaded
> > > wh
On Sat, 11 Mar 2023 at 07:21, Stephen Boyd wrote:
>
> Quoting David Gow (2023-03-02 23:15:35)
> > On Thu, 2 Mar 2023 at 09:38, Stephen Boyd wrote:
> > >
> > > Unit tests are more ergonomic and simpler to understand if they don't
> > > have to hoist a
On Fri, 10 Mar 2023 at 07:25, Stephen Boyd wrote:
>
> Quoting David Gow (2023-03-02 23:15:31)
> > On Thu, 2 Mar 2023 at 09:38, Stephen Boyd wrote:
> > >
> > > Introduce KUnit resource wrappers around platform_driver_register(),
> > > platform_device_all
On Fri, 10 Mar 2023 at 07:19, Stephen Boyd wrote:
>
> Quoting David Gow (2023-03-02 23:15:04)
> > On Thu, 2 Mar 2023 at 09:38, Stephen Boyd wrote:
> > >
> > > To fully exercise common clk framework code in KUnit we need to
> > > associate 'stru
On Fri, 10 Mar 2023 at 07:12, Stephen Boyd wrote:
>
> Quoting David Gow (2023-03-02 23:14:55)
> > On Thu, 2 Mar 2023 at 09:38, Stephen Boyd wrote:
> > >
> > > Document the linux,kunit board compatible string. This board is loaded
> > > into the Linux
On Sat, 4 Mar 2023 at 23:50, Frank Rowand wrote:
>
> On 3/1/23 19:38, Stephen Boyd wrote:
> > This patch series adds unit tests for the clk fixed rate basic type and
> > the clk registration functions that use struct clk_parent_data. To get
> > there, we add support for loading a DTB into the UML
On Fri, 3 Mar 2023 at 16:37, Roberto Sassu
wrote:
>
> Hi
>
> it looks like one recent commit causes the kernel build to break.
>
> GEN scripts/gdb/linux/constants.py
> In file included from /usr/include/stdlib.h:1013,
> from arch/um/os-Linux/helper.c:6:
> /usr/include/x86_64
can write more code in the actual test and less code in the
> harness.
>
> Only add APIs that are used for now. More wrappers can be added in the
> future as necessary.
>
> Cc: Brendan Higgins
> Cc: David Gow
> Signed-off-by: Stephen Boyd
> ---
Looks good, modu
s automatically be unregistered when the test is done.
>
> This makes test setup code simpler when a platform driver or platform
> device is needed. Add a few test cases at the same time to make sure the
> APIs work as intended.
>
> Cc: Brendan Higgins
> Cc: David Gow
>
On Thu, 2 Mar 2023 at 09:38, Stephen Boyd wrote:
>
> To fully exercise common clk framework code in KUnit we need to
> associate 'struct device' pointers with 'struct device_node' pointers so
> that things like clk_get() can parse DT nodes for 'clocks' and so that
> clk providers can use DT to pro
inux,kunit", "linux-kunit,uml", "linux,kunit-uml", etc?
>
> Cc: Rob Herring
> Cc: Krzysztof Kozlowski
> Cc: Brendan Higgins
> Cc: David Gow
> Signed-off-by: Stephen Boyd
> ---
> .../bindings/kunit/linux,kunit.yaml | 24 +
On Thu, 2 Mar 2023 at 09:38, Stephen Boyd wrote:
>
> This patch series adds unit tests for the clk fixed rate basic type and
> the clk registration functions that use struct clk_parent_data. To get
> there, we add support for loading a DTB into the UML kernel that's
> running the unit tests along
; https://lore.kernel.org/rust-for-linux/caniq72nxmsnusjnzog-qzicvoqa9drusmc4ras3exlznj7v...@mail.gmail.com
> Reported-by: Miguel Ojeda
> Signed-off-by: Thomas Bamelis
> ---
Thanks very much for fixing my mistake!
This is
Reviewed-by: David Gow
Cheers,
-- David
> Documentati
ure version of
> the linker
> /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld:
> warning: vmlinux has a LOAD segment with RWX permissions
> ---
Thanks very much for fixing this -- the LDFLAGS/CFLAGS fun here always
trips me up!
Reviewed-by: David Gow
Cheers,
-
support.
The Rust support does not currently support X86_32.
Also, update the Rust architecture support documentation to not that
this is being maintained: I intend to look after this as best I can.
Signed-off-by: David Gow
---
Documentation/rust/arch-support.rst | 2 ++
arch/um/Kconfig
x27;s definitely my intention to keep this working, but if
anyone has serious concerns, we can downgrade that.
Cheers,
-- David
David Gow (3):
rust: arch/um: Use 'pie' relocation mode under UML
rust: arch/um: Disable FP/SIMD instruction to match x86
rust: arch/um: Add suppor
/github.com/Rust-for-Linux/linux/pull/881
Signed-off-by: David Gow
---
arch/x86/Makefile.um | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index b3c1ae084180..d2e95d1d4db7 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -1,
UML expects a position independent executable for some reason, so tell
rustc to generate pie objects. Otherwise we get a bunch of relocations
we can't deal with in libcore.
Signed-off-by: David Gow
---
arch/um/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/um/Makef
On Thu, Sep 22, 2022 at 1:47 AM 'Nick Desaulniers' via KUnit
Development wrote:
>
> On Tue, Sep 20, 2022 at 11:49 PM David Gow wrote:
> >
> > Since binutils 2.39, ld will print a warning if any stack section is
> > executable, which is the default for
a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
Signed-off-by: David Gow
Reviewed-by: Lukas Straub
Tested-by: Lukas Straub
Acked-by: Randy Dunlap # build-tested
---
Note that this still doesn't seem to be working properly with make
LLVM=1. It doesn't appear to break anything, and still is an improveme
58 matches
Mail list logo