[PATCH] scripts/spdxcheck.py: improve Python 3 compat

2018-09-16 Thread Thomas Weißschuh
functional change. Signed-off-by: Thomas Weißschuh --- scripts/spdxcheck.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py index 839e190bbd7a..8f472f995d70 100755 --- a/scripts/spdxcheck.py +++ b/scripts/spdxcheck.py @@ -250,12

[PATCH net-next 2/5] net/ipv4/sysctl: constify ctl_table arguments of utility functions

2024-05-27 Thread Thomas Weißschuh
To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/ipv4/sysctl_net_ipv4.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH net-next 3/5] net/ipv6/addrconf: constify ctl_table arguments of utility functions

2024-05-27 Thread Thomas Weißschuh
To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/ipv6/addrconf.c | 8 1 file changed, 4 insertions(+), 4 delet

[PATCH net-next 4/5] net/ipv6/ndisc: constify ctl_table arguments of utility function

2024-05-27 Thread Thomas Weißschuh
To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH net-next 0/5] net: constify ctl_table arguments of utility functions

2024-05-27 Thread Thomas Weißschuh
ned changes can be found at https://git.sr.ht/~t-8ch/linux sysctl-constfy [0] https://lore.kernel.org/lkml/20240322-sysctl-empty-dir-v2-0-e559cf8ec...@weissschuh.net/ [1] https://lore.kernel.org/lkml/20240315-sysctl-const-ownership-v3-0-b86680eae...@weissschuh.net/ [2] https://lore.kernel

[PATCH net-next 5/5] ipvs: constify ctl_table arguments of utility functions

2024-05-27 Thread Thomas Weißschuh
To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/netfilter/ipvs/ip_vs_ctl.c | 7 --- 1 file changed, 4 insertions(+)

[PATCH net-next 1/5] net/neighbour: constify ctl_table arguments of utility function

2024-05-27 Thread Thomas Weißschuh
To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH v2] modpost: compile constant module information only once

2024-09-01 Thread Thomas Weißschuh
this case. The code is also easier to maintain as it's now in a proper source file instead of an inline string literal. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Remove RFC status - Incorporate Masahiro's proposals - Rename modinfo.o to .module-common.o - Build a dedicat

Re: [PATCH] selftests: kselftest: Use strerror() on nolibc

2024-09-11 Thread Thomas Weißschuh
-*/ > > - ksft_exit_fail_msg("%s: %d)\n", msg, errno); > > -#endif > > } > > static inline __noreturn void ksft_exit_xfail(void) > > Adding nolibc maintainers for review. > > Willy and Thomas, please review. Acked-by: Thomas Weißschuh I did the same for another kselftests function when introducing strerror(). This one was apparently missed or didn't exist yet. Thomas

[PATCH] selftests/nolibc: libc-test: avoid -Wstringop-overflow warnings

2023-09-10 Thread Thomas Weißschuh
__nfds, int __timeout) |^~~~ Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c

Re: [PATCH v2] platform/x86: add Gigabyte WMI temperature driver

2021-04-07 Thread Thomas Weißschuh
Hi Hans, On Mi, 2021-04-07T17:54+0200, Hans de Goede wrote: > Thank you for your new driver and thank you for the quick respin > addressing Barnabás' request to make it a WMI driver. > > The code looks good, so merging this should be a no-brainer, > yet I'm not sure if I should merge this driver

Re: [PATCH v2] platform/x86: add Gigabyte WMI temperature driver

2021-04-08 Thread Thomas Weißschuh
Hi, On Mi, 2021-04-07T18:27+, Barnabás Pőcze wrote: > 2021. április 5., hétfő 22:48 keltezéssel, Thomas Weißschuh írta: > > Tested with a X570 I Aorus Pro Wifi. > > The mainboard contains an ITE IT8688E chip for management. > > This chips is also handled by drivers/hwm

Re: [PATCH v2] platform/x86: add Gigabyte WMI temperature driver

2021-04-08 Thread Thomas Weißschuh
Hi Hans, On Do, 2021-04-08T11:36+0200, Hans de Goede wrote: > On 4/7/21 9:43 PM, Thomas Weißschuh wrote: > > Hi Hans, > > > > On Mi, 2021-04-07T17:54+0200, Hans de Goede wrote: > >> Thank you for your new driver and thank you for the quick respin > >> ad

Re: [PATCH v2] platform/x86: add Gigabyte WMI temperature driver

2021-04-08 Thread Thomas Weißschuh
On Do, 2021-04-08T08:00-0700, Guenter Roeck wrote: > On 4/8/21 2:36 AM, Hans de Goede wrote: > > On 4/7/21 9:43 PM, Thomas Weißschuh wrote: > >> On Mi, 2021-04-07T17:54+0200, Hans de Goede wrote: > > Jean, Guenter, > > > > Thomas has been working on a WMI

[PATCH v5] platform/x86: add Gigabyte WMI temperature driver

2021-04-12 Thread Thomas Weißschuh
: Thomas Weißschuh Reviewed-by: Guenter Roeck --- Changes since v4: * Style * Wording * Alignment of email addresses --- MAINTAINERS | 6 + drivers/platform/x86/Kconfig| 11 ++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/gigabyte-wmi.c | 195

[PATCH v3] platform/x86: add Gigabyte WMI temperature driver

2021-04-10 Thread Thomas Weißschuh
CPI driver. Unfortunately not all sensor registers are handled by the firmware and even less are exposed via WMI. Signed-off-by: Thomas Weißschuh --- MAINTAINERS | 6 + drivers/platform/x86/Kconfig| 11 ++ drivers/platform/x86/Makefile | 1 + drivers/platf

[PATCH v4] platform/x86: add Gigabyte WMI temperature driver

2021-04-10 Thread Thomas Weißschuh
ITE IT8688E chip for management. This chips is also handled by drivers/hwmon/i87.c but as it is also used by the firmware itself it needs an ACPI driver. Unfortunately not all sensor registers are handled by the firmware and even less are exposed via WMI. Signed-off-by: Thomas Weißschuh --- MAINTAIN

[PATCH] platform/x86: add Gigabyte WMI temperature driver

2021-04-05 Thread Thomas Weißschuh
ard contains a ITE IT8688E chip for management. This chips is also handled by drivers/hwmon/i87.c but as it is also used by the firmware itself it needs an ACPI driver. Unfortunately not all sensor registers are handled by the firmware and even less are exposed via WMI. Signed-off-by: Thomas Weißs

[PATCH v2] platform/x86: add Gigabyte WMI temperature driver

2021-04-05 Thread Thomas Weißschuh
led by the firmware and even less are exposed via WMI. Signed-off-by: Thomas Weißschuh --- drivers/platform/x86/Kconfig| 11 +++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/gigabyte-wmi.c | 138 3 files changed, 150 insertions(+) cre

Re: [PATCH 3.16 310/366] vmxnet3: fix checks for dma mapping errors

2019-03-29 Thread Thomas Weißschuh
> 3.16.60-rc1 review patch. If anyone has any objections, please let me know. Sorry for the late response, this just hit the kernel in Debian Jessie (oldstable) a few days ago. > -- > > From: Alexey Khoroshilov > > commit 5738a09d58d5ad2871f1f9a42bf6a3aa9ece5b3c upstream. > >

Re: [PATCH 1/4] LoongArch: Don't crash in stack_top() for tasks without vDSO

2024-10-14 Thread Thomas Weißschuh
t 7:36 PM Thomas Weißschuh > wrote: > > > > Not all tasks have a vDSO mapped, for example kthreads never do. > > If such a task ever ends up calling stack_top(), it will derefence the > > NULL vdso pointer and crash. > > > > This can for example happen when

[PATCH 3/4] kunit: tool: Allow overriding the shutdown mode from qemu config

2024-10-14 Thread Thomas Weißschuh
Not all platforms support machine reboot. If it a proper reboot is not supported the machine will hang. Allow the QEMU configuration to override the necessary shutdown mode for the specific system under test. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/kunit_kernel.py | 4 +++- 1

[PATCH 4/4] kunit: qemu_configs: loongarch: Enable shutdown

2024-10-14 Thread Thomas Weißschuh
QEMU for LoongArch does not yet support shutdown/restart through ACPI. Use the pvpanic driver to enable shutdowns. This requires 9.1.0 for shutdown support in pvpanic, but that is the requirement of kunit on LoongArch anyways. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs

[PATCH 2/4] kunit: qemu_configs: add LoongArch config

2024-10-14 Thread Thomas Weißschuh
Add a basic config to run kunit tests on LoongArch. This requires QEMU 9.1.0 or later for the necessary direct kernel boot support. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/loongarch.py | 16 1 file changed, 16 insertions(+) diff --git a/tools

[PATCH 0/4] kunit: Add support for LoongArch

2024-10-14 Thread Thomas Weißschuh
[13:33:14] [13:33:14] Testing complete. Ran 493 tests: passed: 453, skipped: 40 [13:33:14] Elapsed time: 28.862s total, 0.002s configuring, 2.526s building, 26.302s running Signed-off-by: Thomas Weißschuh --- Thomas We

[PATCH 1/4] LoongArch: Don't crash in stack_top() for tasks without vDSO

2024-10-14 Thread Thomas Weißschuh
xbc/0x25c [<903c1db4>] kunit_try_run_case+0x5c/0x184 [<903c3d54>] kunit_generic_run_threadfn_adapter+0x24/0x48 [<9022e4bc>] kthread+0xc8/0xd4 [<90200ce8>] ret_from_kernel_thread+0xc/0xa4 Fixes: 803b0fc5c3f2 ("Lo

[PATCH] selftests/nolibc: start qemu with 1 GiB of memory

2024-10-07 Thread Thomas Weißschuh
. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 8de98ea7af8071caa0597aa7b86d91a2d1d50e68

Re: [PATCH 2/4] kunit: qemu_configs: add LoongArch config

2024-10-17 Thread Thomas Weißschuh
Hi Shuah, Oct 17, 2024 22:27:29 Shuah Khan : > On 10/14/24 05:36, Thomas Weißschuh wrote: >> Add a basic config to run kunit tests on LoongArch. >> This requires QEMU 9.1.0 or later for the necessary direct kernel boot >> support. >> Signed-off-by: Thomas Weißschuh

Re: [PATCH 2/2] kunit: enable hardware acceleration when available

2024-11-01 Thread Thomas Weißschuh
On 2024-11-01 10:49:36-0400, Tamir Duberstein wrote: > On Fri, Nov 1, 2024, 09:52 Alyssa Ross wrote: > > > > On Fri, Oct 25, 2024 at 05:03:54PM -0400, Tamir Duberstein wrote: > > > @@ -124,6 +125,29 @@ class > > > LinuxSourceTreeOperationsQemu(LinuxSourceTreeOperations): > > >

[PATCH v2 3/3] kunit: qemu_configs: loongarch: Enable shutdown

2024-11-10 Thread Thomas Weißschuh
QEMU for LoongArch does not yet support shutdown/restart through ACPI. Use the pvpanic driver to enable shutdowns. This requires 9.1.0 for shutdown support in pvpanic, but that is the requirement of kunit on LoongArch anyways. Signed-off-by: Thomas Weißschuh Reviewed-by: Bibo Mao Reviewed-by

[PATCH v2 0/3] kunit: Add support for LoongArch

2024-11-10 Thread Thomas Weißschuh
ftest tree. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Drop already applied patch - Pick up review tags - Add SPDX header - Link to v1: https://lore.kernel.org/r/20241014-kunit-loongarch-v1-0-1699b2ad6...@linutronix.de --- Thomas Weißschuh (3): kunit: qemu_configs: Add LoongA

[PATCH v2 1/3] kunit: qemu_configs: Add LoongArch config

2024-11-10 Thread Thomas Weißschuh
Add a basic config to run kunit tests on LoongArch. This requires QEMU 9.1.0 or later for the necessary direct kernel boot support. Signed-off-by: Thomas Weißschuh Reviewed-by: Bibo Mao Reviewed-by: David Gow --- tools/testing/kunit/qemu_configs/loongarch.py | 18 ++ 1 file

[PATCH v2 2/3] kunit: tool: Allow overriding the shutdown mode from qemu config

2024-11-10 Thread Thomas Weißschuh
Not all platforms support machine reboot. If it a proper reboot is not supported the machine will hang. Allow the QEMU configuration to override the necessary shutdown mode for the specific system under test. Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow --- tools/testing/kunit

[PATCH 3/4] btf: Switch vmlinux BTF attribute to sysfs_bin_attr_simple_read()

2024-12-05 Thread Thomas Weißschuh
The generic function from the sysfs core can replace the custom one. Signed-off-by: Thomas Weißschuh --- This is a replacement for [0], as Alexei was not happy about BIN_ATTR_SIMPLE_RO() [0] https://lore.kernel.org/lkml/20241122-sysfs-const-bin_attr-bpf-v1-1-823aea399...@weissschuh.net

[PATCH 0/4] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2024-12-05 Thread Thomas Weißschuh
Most users use this function through the BIN_ATTR_SIMPLE* macros, they can handle the switch transparently. This series is meant to be merged through the driver core tree. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (4): sysfs: constify bin_attribute argument of

[PATCH 4/4] btf: Switch module BTF attribute to sysfs_bin_attr_simple_read()

2024-12-05 Thread Thomas Weißschuh
The generic function from the sysfs core can replace the custom one. Signed-off-by: Thomas Weißschuh --- kernel/bpf/btf.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index e7a59e6462a9331d0acb17a88a4ebf641509c050

[PATCH 2/4] platform/x86: wmi-bmof: Switch to sysfs_bin_attr_simple_read()

2024-12-05 Thread Thomas Weißschuh
The generic function from the sysfs core can replace the custom one. Signed-off-by: Thomas Weißschuh --- drivers/platform/x86/wmi-bmof.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/platform/x86/wmi-bmof.c b/drivers/platform/x86/wmi-bmof.c index

[PATCH 1/4] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2024-12-05 Thread Thomas Weißschuh
Most users use this function through the BIN_ATTR_SIMPLE* macros, they can handle the switch transparently. Also adapt the two non-macro users in the same change. Signed-off-by: Thomas Weißschuh --- arch/powerpc/platforms/powernv/opal.c | 2 +- fs/sysfs/file.c | 2

Re: [PATCH] selftests/nolibc: start qemu with 1 GiB of memory

2025-01-06 Thread Thomas Weißschuh
On 2025-01-06 10:51:52-0700, Shuah Khan wrote: > On 10/7/24 02:10, Thomas Weißschuh wrote: > > Recently the loongarch defconfig stopped working with the default 128 MiB > > of memory. The VM just spins infinitively. > > Increasing the available memory to 1 GiB, similar to s390

Re: [PATCH v2 0/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2024-12-31 Thread Thomas Weißschuh
On 2024-12-30 16:50:41-0800, Alexei Starovoitov wrote: > On Sat, Dec 28, 2024 at 12:43 AM Thomas Weißschuh > wrote: > > > > Most users use this function through the BIN_ATTR_SIMPLE* macros, > > they can handle the switch transparently. > > > > This series is m

[PATCH 3/3] selftests/mm: virtual_address_range: Dump to /dev/null

2025-01-07 Thread Thomas Weißschuh
vfs_write+0x29c/0x480 ksys_write+0x6c/0xe0 do_syscall_64+0x9e/0x1a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Write the dumped data into /dev/null instead which does not require additional memory during write(), making the code simpler as a side-effect. Signed-off-by: Thomas

[PATCH 0/3] selftests/mm: virtual_address_range: Two bugfixes and a cleanup

2025-01-07 Thread Thomas Weißschuh
The selftest started failing since commit e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping") was merged. While debugging I stumbled upon another bug and potential cleanup. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (3): selftests/mm: virtual_add

[PATCH 1/3] selftests/mm: virtual_address_range: Fix error when CommitLimit < 1GiB

2025-01-07 Thread Thomas Weißschuh
("selftests/mm: confirm VA exhaustion without reliance on correctness of mmap()") Cc: sta...@vger.kernel.org Signed-off-by: Thomas Weißschuh --- The logic in __vm_enough_memory() seems weird. It describes itself as "Check that a process has enough memory to allocate a new virtual mappi

[PATCH 2/3] selftests/mm: virtual_address_range: Avoid reading VVAR mappings

2025-01-07 Thread Thomas Weißschuh
..@vger.kernel.org Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202412271148.2656e485-...@intel.com Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/mm/virtual_address_range.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --gi

Re: [PATCH 3/3] selftests/mm: virtual_address_range: Dump to /dev/null

2025-01-07 Thread Thomas Weißschuh
On Wed, Jan 08, 2025 at 11:39:40AM +0530, Dev Jain wrote: > > On 07/01/25 8:44 pm, Thomas Weißschuh wrote: > > During the execution of validate_complete_va_space() a lot of memory is > > on the VM subsystem. When running on a low memory subsystem an OOM may > > be trigge

Re: [PATCH 1/3] selftests/mm: virtual_address_range: Fix error when CommitLimit < 1GiB

2025-01-08 Thread Thomas Weißschuh
On Wed, Jan 08, 2025 at 11:46:19AM +0530, Dev Jain wrote: > > On 07/01/25 8:44 pm, Thomas Weißschuh wrote: > > If not enough physical memory is available the kernel may fail mmap(); > > see __vm_enough_memory() and vm_commit_limit(). > > In that case the logic in validate_

[PATCH v2 3/3] btf: Switch module BTF attribute to sysfs_bin_attr_simple_read()

2024-12-28 Thread Thomas Weißschuh
The generic function from the sysfs core can replace the custom one. Signed-off-by: Thomas Weißschuh Acked-by: Andrii Nakryiko --- kernel/bpf/btf.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index

[PATCH v2 2/3] btf: Switch vmlinux BTF attribute to sysfs_bin_attr_simple_read()

2024-12-28 Thread Thomas Weißschuh
The generic function from the sysfs core can replace the custom one. Signed-off-by: Thomas Weißschuh Acked-by: Andrii Nakryiko --- This is a replacement for [0], as Alexei was not happy about BIN_ATTR_SIMPLE_RO() [0] https://lore.kernel.org/lkml/20241122-sysfs-const-bin_attr-bpf-v1-1

[PATCH v2 0/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2024-12-28 Thread Thomas Weißschuh
Most users use this function through the BIN_ATTR_SIMPLE* macros, they can handle the switch transparently. This series is meant to be merged through the driver core tree. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Rebase on torvalds/master - Drop wmi-bmof patch - Pick up Acks from

[PATCH v2 1/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2024-12-28 Thread Thomas Weißschuh
Most users use this function through the BIN_ATTR_SIMPLE* macros, they can handle the switch transparently. Also adapt the two non-macro users in the same change. Signed-off-by: Thomas Weißschuh --- arch/powerpc/platforms/powernv/opal.c | 2 +- fs/sysfs/file.c | 2

[PATCH 04/16] elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK

2025-02-03 Thread Thomas Weißschuh
The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c. To be able to build the vDSO selftests without a libc dependency, add the definitions to the kernels own UAPI headers. Link: https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-80869/index.html Signed-off-by: Thomas

[PATCH 00/16] selftests: vDSO: parse_vdso: Make compatible with nolibc

2025-02-03 Thread Thomas Weißschuh
kselftest tree. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (16): MAINTAINERS: Add vDSO selftests elf, uapi: Add definition for STN_UNDEF elf, uapi: Add definition for DT_GNU_HASH elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK elf, uapi: Add type

[PATCH 01/16] MAINTAINERS: Add vDSO selftests

2025-02-03 Thread Thomas Weißschuh
These currently have no maintainer besides the default kselftest ones. Add the general vDSO maintainers, too. Signed-off-by: Thomas Weißschuh --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 896a307fa06545e2861abe46ea7029f9b4d3628e

[PATCH 02/16] elf, uapi: Add definition for STN_UNDEF

2025-02-03 Thread Thomas Weißschuh
The definition is used by tools/testing/selftests/vDSO/parse_vdso.c. To be able to build the vDSO selftests without a libc dependency, add the definition to the kernels own UAPI headers. Link: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.symtab.html Signed-off-by: Thomas Weißschuh

[PATCH 03/16] elf, uapi: Add definition for DT_GNU_HASH

2025-02-03 Thread Thomas Weißschuh
: Thomas Weißschuh --- include/uapi/linux/elf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index 448695c7364042b10682acc8223eb6053ad039dd..c5383cc7bb13c931fea083de5243c4006f795006 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi

[PATCH 07/16] tools/include: Add uapi/linux/elf.h

2025-02-03 Thread Thomas Weißschuh
It will be used by the vDSO selftests. Signed-off-by: Thomas Weißschuh --- tools/include/uapi/linux/elf.h | 524 + 1 file changed, 524 insertions(+) diff --git a/tools/include/uapi/linux/elf.h b/tools/include/uapi/linux/elf.h new file mode 100644 index

[PATCH 09/16] selftests: vDSO: vdso_standalone_test_x86: Use vdso_init_form_sysinfo_ehdr

2025-02-03 Thread Thomas Weißschuh
/stdlib.h. Signed-off-by: Thomas Weißschuh --- All of this code will be deleted later again. --- .../selftests/vDSO/vdso_standalone_test_x86.c | 27 +- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c b

[PATCH 05/16] elf, uapi: Add type ElfXX_Versym

2025-02-03 Thread Thomas Weißschuh
The types are used by tools/testing/selftests/vDSO/parse_vdso.c. To be able to build the vDSO selftests without a libc dependency, add the types to the kernels own UAPI headers. As documented by elf(5). Signed-off-by: Thomas Weißschuh --- include/uapi/linux/elf.h | 2 ++ 1 file changed, 2

[PATCH 11/16] selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers

2025-02-03 Thread Thomas Weißschuh
To allow the usage of parse_vdso.c together with a limited libc like nolibc, use the kernels own elf.h and auxvec.h headers. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/Makefile | 3 +++ tools/testing/selftests/vDSO/parse_vdso.c | 3 ++- 2 files changed, 5 insertions

[PATCH 06/16] elf, uapi: Add types ElfXX_Verdef and ElfXX_Veraux

2025-02-03 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- include/uapi/linux/elf.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index 8846fe03ca5b836c96aad1be6d8fb9daf3d4b1d9..49f9f90458d8ca8e7b8f823d32be0a719ff827b3 100644 --- a

[PATCH 08/16] selftests: Add headers target

2025-02-03 Thread Thomas Weißschuh
tests can depend on to get access to usable UAPI headers. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/lib.mk | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index

[PATCH 16/16] selftests: vDSO: vdso_standalone_test_x86: Switch to nolibc

2025-02-03 Thread Thomas Weißschuh
version. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/Makefile | 8 +- .../selftests/vDSO/vdso_standalone_test_x86.c | 168 + 2 files changed, 7 insertions(+), 169 deletions(-) diff --git a/tools/testing/selftests/vDSO/Makefile b/tools

[PATCH 10/16] selftests: vDSO: parse_vdso: Drop vdso_init_from_auxv()

2025-02-03 Thread Thomas Weißschuh
There are no users left. Also remove the usage of ElfXX_auxv_t, which is not formally standardized. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/parse_vdso.c | 14 -- tools/testing/selftests/vDSO/parse_vdso.h | 1 - 2 files changed, 15 deletions(-) diff --git

[PATCH 15/16] selftests: vDSO: vdso_test_gettimeofday: Make compatible with nolibc

2025-02-03 Thread Thomas Weißschuh
nolibc does not provide these headers, instead those definitions are available unconditionally. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c

[PATCH 12/16] selftests: vDSO: parse_vdso: Test __SIZEOF_LONG__ instead of ULONG_MAX

2025-02-03 Thread Thomas Weißschuh
__SIZEOF_LONG__ instead, with is provided directly by the preprocessor and therefore always a symbolic constant. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/parse_vdso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/parse_vdso.c

[PATCH 14/16] selftests: vDSO: vdso_test_gettimeofday: Clean up includes

2025-02-03 Thread Thomas Weißschuh
Some unnecessary headers are included, remove them. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c b/tools/testing/selftests/vDSO

[PATCH 13/16] selftests: vDSO: parse_vdso: Make compatible with nolibc

2025-02-03 Thread Thomas Weißschuh
nolibc does not provide this header, instead its definitions are available unconditionally. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/parse_vdso.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests

Re: [PATCH 00/16] selftests: vDSO: parse_vdso: Make compatible with nolibc

2025-02-03 Thread Thomas Weißschuh
On Mon, Feb 03, 2025 at 12:23:29PM +0100, Christophe Leroy wrote: > Le 03/02/2025 à 10:05, Thomas Weißschuh a écrit : > > For testing the functionality of the vDSO, it is necessary to build > > userspace programs for multiple different architectures. > > It is additional wor

Re: [PATCH 00/16] selftests: vDSO: parse_vdso: Make compatible with nolibc

2025-02-03 Thread Thomas Weißschuh
On Mon, Feb 03, 2025 at 04:43:22PM +0100, Christophe Leroy wrote: > Do you have any plan to get it work with nolibc for all test programs in > selftests/vDSO, not only the standalone x86 test ? Not directly as next step. I am focussing on some other work which will integrate (vDSO) selftests wit

[PATCH 2/2] tools/nolibc: add support for directory access

2025-01-30 Thread Thomas Weißschuh
From: Thomas Weißschuh Add an allocation-free implementation of readdir() and related functions. The implementation is modelled after the one for FILE. Signed-off-by: Thomas Weißschuh Signed-off-by: Thomas Weißschuh --- I'm not entirely sure where to put it. It doesn't really b

[PATCH 1/2] tools/nolibc: add support for sys_llseek()

2025-01-30 Thread Thomas Weißschuh
From: Thomas Weißschuh Not all architectures have the old sys_lseek(), notably riscv32. Implement lseek() in terms of sys_llseek() in that case. Signed-off-by: Thomas Weißschuh Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/sys.h | 29 - 1 file changed

[PATCH 0/2] tools/nolibc: add support for directory access

2025-01-30 Thread Thomas Weißschuh
Add support opendir(), readdir(), closedir() and friends. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): tools/nolibc: add support for sys_llseek() tools/nolibc: add support for directory access tools/include/nolibc/stdio.h | 76

Re: [PATCH 04/16] elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK

2025-02-04 Thread Thomas Weißschuh
On Tue, Feb 04, 2025 at 07:10:00AM -0800, Kees Cook wrote: > On Mon, Feb 03, 2025 at 10:05:05AM +0100, Thomas Weißschuh wrote: > > The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c. > > To be able to build the vDSO selftests without a libc dependency, > > a

[PATCH v2 0/2] tools/nolibc: support for 32-bit s390

2025-02-05 Thread Thomas Weißschuh
hard dependency, only a minor diff conflict) Signed-off-by: Thomas Weißschuh --- Changes in v2: - Rebase unto nolibc-next - Use 96 bytes of stack frame size - Pick up Ack from Willy - Link to v1: https://lore.kernel.org/r/20250122-nolibc-s390-v1-0-8c765f00e...@weissschuh.net --- Thom

[PATCH v2 2/2] tools/nolibc: add support for 32-bit s390

2025-02-05 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/arch-s390.h| 5 + tools/include/nolibc/arch.h | 2 +- tools/testing/selftests/nolibc/Makefile | 5 + tools/testing/selftests/nolibc/run-tests.sh | 6 +- 4 files changed, 16 insertions(+), 2 deletions

[PATCH v2 1/2] selftests/nolibc: rename s390 to s390x

2025-02-05 Thread Thomas Weißschuh
Support for 32-bit s390 is about to be added. As "s39032" would look horrible, use the another naming scheme. 32-bit s390 is "s390" and 64-bit s390 is "s390x", similar to how it is handled in various toolchain components. Acked-by: Willy Tarreau Signed-off-by

[PATCH v2 2/2] Revert "selftests: kselftest: Fix build failure with NOLIBC"

2025-02-09 Thread Thomas Weißschuh
This reverts commit 16767502aa990cca2cb7d1372b31d328c4c85b40. Nolibc gained support for uname(2) and sscanf(3) which are the dependencies of ksft_min_kernel_version(). So re-enable support for ksft_min_kernel_version() under nolibc. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests

[PATCH v2 0/2] tools/nolibc: add support for [v]sscanf()

2025-02-09 Thread Thomas Weißschuh
The implementation is limited and only supports numeric arguments. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Return __LINE__ from different testcases to directly point to the failed testcase - Add some comments - Expand commit message - Link to v1: https://lore.kernel.org/r

[PATCH v2 1/2] tools/nolibc: add support for [v]sscanf()

2025-02-09 Thread Thomas Weißschuh
These functions are used often, also in selftests. sscanf() itself is also used by kselftest.h itself. The implementation is limited and only supports numeric arguments. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdio.h | 98 tools

Re: [v2 2/3] kernel: refactor and globalize lookup_or_create_module_kobject()

2025-02-06 Thread Thomas Weißschuh
On 2025-02-06 21:45:37-0800, Shyam Saini wrote: > lookup_or_create_module_kobject() is static and marked as __init, > this is not ideal for global usage. FYI missing "PATCH" in patch subject. > Fix this limitation by refactoring and declaring this as global: > - Refactor it by removing BUG_ON()

[PATCH] selftests/nolibc: split up architecture list in run-tests.sh

2025-02-11 Thread Thomas Weißschuh
The list is getting overly long and any modifications introduce a lot of noise and are prone to conflicts. Split the string into a bash array and break that into multiple lines. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/run-tests.sh | 11 ++- 1 file changed, 10

[PATCH 0/2] kunit: qemu_configs: Add MIPS configurations

2025-02-12 Thread Thomas Weißschuh
/ Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): MIPS: mm: Avoid blocking DMA zone with memory map memblock allocation kunit: qemu_configs: Add MIPS configurations arch/mips/mm/init.c | 2 ++ tools/testing/kunit/qemu_configs/mips.py | 18

[PATCH 1/2] MIPS: mm: Avoid blocking DMA zone with memory map memblock allocation

2025-02-12 Thread Thomas Weißschuh
allocation does not fall into the DMA zone. Signed-off-by: Thomas Weißschuh --- Another solution would be to change alloc_node_mem_map() in the mm core to use __pa(MAX_DMA_ADDRESS) for the min_addr when calling memmap_alloc(), as is done by the other callers of memmap_alloc(). Looping in th

[PATCH 2/2] kunit: qemu_configs: Add MIPS configurations

2025-02-12 Thread Thomas Weißschuh
Add basic support to run various MIPS variants via kunit_tool using the virtualized malta platform. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/mips.py | 18 ++ tools/testing/kunit/qemu_configs/mips64.py | 19 +++ tools/testing

Re: [PATCH 2/2] tools/nolibc: add support for directory access

2025-02-02 Thread Thomas Weißschuh
On 2025-02-01 11:46:59+0100, Willy Tarreau wrote: > On Sat, Feb 01, 2025 at 11:41:58AM +0100, Thomas Weißschuh wrote: > > On 2025-02-01 11:34:38+0100, Willy Tarreau wrote: > > > On Thu, Jan 30, 2025 at 08:54:03PM +0100, Thomas Weißschuh wrote: > > > > From: Thomas W

Re: [PATCH v2 1/5] selftests/nolibc: drop custom EXTRACONFIG functionality

2025-02-01 Thread Thomas Weißschuh
On 2025-02-01 11:13:05+0100, Willy Tarreau wrote: > On Thu, Jan 23, 2025 at 08:37:37AM +0100, Thomas Weißschuh wrote: > > kbuild already contains logic to merge predefines snippets into a > > defconfig file. This already works nicely with the current "defconfig" > >

Re: [PATCH 2/2] tools/nolibc: add support for directory access

2025-02-01 Thread Thomas Weißschuh
On 2025-02-01 11:34:38+0100, Willy Tarreau wrote: > On Thu, Jan 30, 2025 at 08:54:03PM +0100, Thomas Weißschuh wrote: > > From: Thomas Weißschuh > > > > Add an allocation-free implementation of readdir() and related > > functions. The implementation is modelled aft

[PATCH 3/3] module: Constify 'struct module_attribute'

2024-12-16 Thread Thomas Weißschuh
These structs are never modified, move them to read-only memory. This makes the API clearer and also prepares for the constification of 'struct attribute' itself. While at it, also constify 'modinfo_attrs_count'. Signed-off-by: Thomas Weißschuh --- include/l

[PATCH 2/3] module: Handle 'struct module_version_attribute' as const

2024-12-16 Thread Thomas Weißschuh
The structure is always read-only due to its placement in the read-only section __modver. Reflect this at its usage sites. Also prepare for the const handling of 'struct module_attribute' itself. Signed-off-by: Thomas Weißschuh --- include/linux/module.h | 2 +- kernel/params.c

[PATCH 0/3] module: Constify 'struct module_attribute'

2024-12-16 Thread Thomas Weißschuh
These structs are never modified, move them to read-only memory. This makes the API clearer and also prepares for the constification of 'struct attribute' itself. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (3): params: Prepare for 'const struct module_attribute

[PATCH 1/3] params: Prepare for 'const struct module_attribute *'

2024-12-16 Thread Thomas Weißschuh
The 'struct module_attribute' sysfs callbacks are about to change to receive a 'const struct module_attribute *' parameter. Prepare for that by avoid casting away the constness through container_of() and using const pointers to 'struct param_attribute'. S

Re: [PATCH 2/4] platform/x86: wmi-bmof: Switch to sysfs_bin_attr_simple_read()

2024-12-13 Thread Thomas Weißschuh
Hi Armin, On 2024-12-13 01:21:37+0100, Armin Wolf wrote: > Am 05.12.24 um 18:35 schrieb Thomas Weißschuh: > > > The generic function from the sysfs core can replace the custom one. > > Sorry for taking quite a bit to respond, i totally overlooked this patch. > > This

[PATCH 3/6] selftests/nolibc: use a pipe to in vfprintf tests

2024-12-21 Thread Thomas Weißschuh
Not all architectures implement lseek(), for example riscv32 only implements llseek() which is not equivalent to normal lseek(). Remove the need for lseek() by using a pipe instead. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 20 +--- 1

[PATCH 2/6] selftests/nolibc: use waitid() over waitpid()

2024-12-21 Thread Thomas Weißschuh
Newer archs like riscv32 don't provide waitpid() anymore. Switch to waitid() which is available everywhere. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/testing/self

[PATCH 5/6] selftests/nolibc: rename riscv to riscv64

2024-12-21 Thread Thomas Weißschuh
riscv32 support is about the be added. To keep the naming clear and consistent with other architectures rename riscv to riscv64, as that is what it actually represents. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 6 ++ tools/testing/selftests/nolibc/run

[PATCH 4/6] selftests/nolibc: skip tests for unimplemented syscalls

2024-12-21 Thread Thomas Weißschuh
The riscv32 architecture is missing many of the older syscalls. Instead of providing wrappers for everything at once, introducing a lot of complexity, skip the tests for those syscalls for now. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 14

[PATCH 6/6] selftests/nolibc: add configurations for riscv32

2024-12-21 Thread Thomas Weißschuh
nolibc already supports riscv32. Wire it up in the testsuite. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 5 + tools/testing/selftests/nolibc/run-tests.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests

[PATCH 0/6] selftests/nolibc: wire up riscv32

2024-12-21 Thread Thomas Weißschuh
Nolibc has support for riscv32. But the testsuite did not allow to test it so far. Add a test configuration. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (6): tools/nolibc: add support for waitid() selftests/nolibc: use waitid() over waitpid() selftests/nolibc: use a

[PATCH 1/6] tools/nolibc: add support for waitid()

2024-12-21 Thread Thomas Weißschuh
waitid() is the modern variant of the family of wait-like syscalls. Some architectures have dropped support for wait(), wait4() and waitpid() but all of them support waitid(). It is more flexible and easier to use than the older ones. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc

Re: [PATCH 1/3] selftests/mm: virtual_address_range: Fix error when CommitLimit < 1GiB

2025-01-08 Thread Thomas Weißschuh
On Wed, Jan 08, 2025 at 05:46:37PM +0100, David Hildenbrand wrote: > On 08.01.25 17:13, Thomas Weißschuh wrote: > > On Wed, Jan 08, 2025 at 02:36:57PM +0100, David Hildenbrand wrote: > > > On 08.01.25 09:05, Thomas Weißschuh wrote: > > > > On Wed, Jan 08, 2025 at 11

  1   2   3   >