[PATCH net-next v5 6/7] selftests: net: Add busy_poll_test

2024-11-02 Thread Joe Damato
Add an epoll busy poll test using netdevsim. This test is comprised of: - busy_poller (via busy_poller.c) - busy_poll_test.sh which loads netdevsim, sets up network namespaces, and runs busy_poller to receive data and socat to send data. The selftest tests two different scenarios: - bus

[PATCH net-next] ptp: Remove 'default y' for VMCLOCK PTP device

2024-11-02 Thread David Woodhouse
From: David Woodhouse The VMCLOCK device gives support for accurate timekeeping even across live migration, unlike the KVM PTP clock. To help ensure that users can always use ptp_vmclock where it's available in preference to ptp_kvm, set it to 'default PTP_1588_CLOCK_VMCLOCK' instead of 'default

[PATCH v4 5/6] iio: light: stk3310: log error if reading the chip id fails

2024-11-02 Thread Aren Moynihan
If the chip isn't powered, this call is likely to return an error. Without a log here the driver will silently fail to probe. Potential errors include ENXIO (when the chip isn't powered) and ETIMEDOUT (when the i2c bus isn't powered). This function is only called from stk3310_probe, and this condi

[PATCH v4 3/6] iio: light: stk3310: Implement vdd and leda supplies

2024-11-02 Thread Aren Moynihan
The vdd and leda supplies must be powered on for the chip to function and can be powered off during system suspend. This was originally based on a patch by Ondrej Jirman[1], but has been rewritten since. 1: https://codeberg.org/megi/linux/commit/a933aff8b7a0e6e3c9cf1d832dcba07022bbfa82 Signed-o

Re: [PATCH 1/2] exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case

2024-11-02 Thread Kees Cook
On Sat, Nov 02, 2024 at 11:29:55AM +, Zbigniew Jędrzejewski-Szmek wrote: > On Thu, Oct 31, 2024 at 03:10:37PM -0700, Kees Cook wrote: > > On Wed, 30 Oct 2024 14:37:31 -0600, Tycho Andersen wrote: > > > Zbigniew mentioned at Linux Plumber's that systemd is interested in > > > switching to execve

[PATCH v4 6/6] arm64: dts: allwinner: pinephone: Add power supplies to stk3311

2024-11-02 Thread Aren Moynihan
From: Ondrej Jirman This allows the driver to properly handle powering this device, and disable power during suspend. Signed-off-by: Ondrej Jirman Signed-off-by: Aren Moynihan --- Notes: Changes in v2: - add leda-supply arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 2 ++

[PATCH v4 4/6] iio: light: stk3310: use dev_err_probe where possible

2024-11-02 Thread Aren Moynihan
Using dev_err_probe instead of dev_err and return makes the errors easier to understand by including the error name, and saves a little code. Signed-off-by: Aren Moynihan --- Notes: Changes in v4: - Get a struct device ahead of time so it can be passed as "dev" instead of "&clien

[PATCH v4 2/6] iio: light: stk3310: handle all remove logic with devm callbacks

2024-11-02 Thread Aren Moynihan
Using devm callbacks helps to make the ordering of probe / remove operations easier to reason about and removes some duplicate code between the probe error path and driver remove. --- Notes: Changes in v4: - also replace mutex_init with devm_mutex_init Added in v3 drivers/iio/l

[PATCH v4 1/6] dt-bindings: iio: light: stk33xx: add vdd and leda regulators

2024-11-02 Thread Aren Moynihan
stk3310 and stk3311 are typically connected to power supplies for the chip (vdd) and the infrared LED (leda). Add properties so we can power these up / down appropriately. Signed-off-by: Aren Moynihan Reviewed-by: Krzysztof Kozlowski --- Notes: Changes in v2: - add leda-supply - a

[PATCH v4 0/6] iio: light: stk3310: support powering off during suspend

2024-11-02 Thread Aren Moynihan
In the Pine64 PinePhone, the stk3310 chip is powered by a regulator that is disabled at system boot and can be shut off during suspend. To ensure that the chip properly initializes, both after boot and suspend, we need to manage this regulator. Additionally if the chip is shut off in suspend, we n

Re: [PATCH v1 1/2] selftests/x86/syscall: fix coccinelle WARNING recommending the use of ARRAY_SIZE()

2024-11-02 Thread Mirsad Todorovac
On 11/1/24 13:04, Muhammad Usama Anjum wrote: > On 11/1/24 4:15 PM, Mirsad Todorovac wrote: >> Coccinelle gives WARNING recommending the use of ARRAY_SIZE() macro >> definition >> to improve the code readability: >> >> ./tools/testing/selftests/x86/syscall_numbering.c:316:35-36: WARNING: Use >

Re: [PATCH v1 2/2] selftests/mm: fix coccinelle WARNING recommending the use of ARRAY_SIZE()

2024-11-02 Thread Mirsad Todorovac
On 11/1/24 14:48, Peter Xu wrote: > On Fri, Nov 01, 2024 at 12:15:25PM +0100, Mirsad Todorovac wrote: >> Coccinelle gives WARNING recommending the use of ARRAY_SIZE() macro >> definition >> to improve the code readability: >> >> ./tools/testing/selftests/mm/uffd-unit-tests.c:1484:32-33: WARNING

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

2024-11-02 Thread Tamir Duberstein
Use KVM or HVF if supported by the QEMU binary and available on the system. This produces a nice improvement on my Apple M3 Pro running macOS 14.7: Before: ./tools/testing/kunit/kunit.py exec --arch arm64 [HH:MM:SS] Elapsed time: 10.145s After: ./tools/testing/kunit/kunit.py exec --arch arm64 [H

[PATCH v2 0/2] kunit: enable hardware virtualization

2024-11-02 Thread Tamir Duberstein
This series implements feature detection of hardware virtualization on Linux and macOS; the latter being my primary use case. This yields approximately a 6x improvement using HVF on M3 Pro. Signed-off-by: Tamir Duberstein --- Changes in v2: - Use QEMU accelerator fallback (Alyssa Ross, Thomas We

[PATCH v2 1/2] kunit: add fallback for os.sched_getaffinity

2024-11-02 Thread Tamir Duberstein
Python 3.13 added os.process_cpu_count as a cross-platform alternative for the Linux-only os.sched_getaffinity. Use it when it's available and provide a fallback when it's not. This allows kunit to run on macOS. Signed-off-by: Tamir Duberstein --- tools/testing/kunit/kunit.py | 11 ++-

Re: [PATCH 1/2] exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case

2024-11-02 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Oct 31, 2024 at 03:10:37PM -0700, Kees Cook wrote: > On Wed, 30 Oct 2024 14:37:31 -0600, Tycho Andersen wrote: > > Zbigniew mentioned at Linux Plumber's that systemd is interested in > > switching to execveat() for service execution, but can't, because the > > contents of /proc/pid/comm are

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

2024-11-02 Thread Tamir Duberstein
On Fri, Nov 1, 2024 at 11:23 AM Thomas Weißschuh wrote: > > 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 > > > > LinuxSourceT

Re: [RFC v2 00/13] LKMM *generic* atomics in Rust

2024-11-02 Thread David Gow
On Fri, 1 Nov 2024 at 14:04, Boqun Feng wrote: > > Hi, > > This is another RFC version of LKMM atomics in Rust, you can find the > previous versions: > > v1: > https://lore.kernel.org/rust-for-linux/20240612223025.1158537-1-boqun.f...@gmail.com/ > wip: > https://lore.kernel.org/rust-for-linux/20