Re: [PATCH v6 2/6] iommufd: Add IOMMU_HWPT_INVALIDATE

2023-12-06 Thread Yi Liu
On 2023/11/17 21:07, Yi Liu wrote: In nested translation, the stage-1 page table is user-managed but cached by the IOMMU hardware, so an update on present page table entries in the stage-1 page table should be followed with a cache invalidation. Add an IOMMU_HWPT_INVALIDATE ioctl to support such

Re: [PATCH 1/4] kunit: Add APIs for managing devices

2023-12-06 Thread Greg Kroah-Hartman
On Wed, Dec 06, 2023 at 03:44:08PM +0800, David Gow wrote: > > But really, why is this a "raw" device_driver pointer and not a pointer > > to the driver type for your bus? > > So, this is where the more difficult questions start (and where my > knowledge of the driver model gets a bit shakier). >

Re: [PATCH v6 1/6] iommu: Add cache_invalidate_user op

2023-12-06 Thread Yi Liu
On 2023/12/7 02:50, Jason Gunthorpe wrote: On Wed, Dec 06, 2023 at 10:43:34AM -0800, Nicolin Chen wrote: On Wed, Dec 06, 2023 at 02:32:09PM -0400, Jason Gunthorpe wrote: On Fri, Nov 17, 2023 at 05:07:12AM -0800, Yi Liu wrote: @@ -465,6 +492,9 @@ struct iommu_domain_ops {

Re: [PATCH v1] selftests/sgx: Skip non X86_64 platform

2023-12-06 Thread Jarkko Sakkinen
On Tue, 2023-12-05 at 21:56 -0500, Zhao Mengmeng wrote: > From: Zhao Mengmeng > > When building whole selftests on arm64, rsync gives an erorr about > sgx: > > rsync: [sender] link_stat "/root/linux- > next/tools/testing/selftests/sgx/test_encl.elf" failed: No such file > or directory (2) > rsyn

Re: [PATCH v8 6/6] zswap: shrinks zswap pool based on memory pressure

2023-12-06 Thread Chengming Zhou
On 2023/12/7 03:47, Nhat Pham wrote: > [...] >> >> Hmm so how should we proceed from here? How about this: >> >> a) I can send a fixlet to move the enablement check above the stats >> flushing + use mem_cgroup_flush_stats >> b) Then maybe, you can send a fixlet to update this new callsite? >> >> Do

Re: WARNING: CPU: 6 PID: 474 at include/linux/maple_tree.h:712 mmap_region (include/linux/maple_tree.h:556 include/linux/maple_tree.h:731

2023-12-06 Thread Liam R. Howlett
* Kees Cook [231206 17:38]: > On Thu, Nov 09, 2023 at 09:45:26PM -0800, Kees Cook wrote: > > > > > > On November 9, 2023 6:03:02 AM PST, Mark Brown wrote: > > >On Thu, Nov 09, 2023 at 06:57:08PM +0530, Naresh Kamboju wrote: > > >> Following kernel panic noticed while running selftests: exec:

Re: [PATCH v2 00/15] selftests/hid: tablets fixes

2023-12-06 Thread Jiri Kosina
On Wed, 6 Dec 2023, Benjamin Tissoires wrote: > Hi, > > the main trigger of this series was the XP-Pen issue[0]. > Basically, the tablets tests were good-ish but couldn't > handle that tablet both in terms of emulation or in terms > of detection of issues. > > So rework the tablets test a bit to

Re: WARNING: CPU: 6 PID: 474 at include/linux/maple_tree.h:712 mmap_region (include/linux/maple_tree.h:556 include/linux/maple_tree.h:731

2023-12-06 Thread Kees Cook
On Thu, Nov 09, 2023 at 09:45:26PM -0800, Kees Cook wrote: > > > On November 9, 2023 6:03:02 AM PST, Mark Brown wrote: > >On Thu, Nov 09, 2023 at 06:57:08PM +0530, Naresh Kamboju wrote: > >> Following kernel panic noticed while running selftests: exec: load_address > >> on Fastmodels (FVP) runn

Re: [PATCH v7 23/39] arm64/mm: Implement map_shadow_stack()

2023-12-06 Thread Thiago Jung Bauermann
Mark Brown writes: > Since the x86 code has not yet been rebased to v6.5-rc1 this includes > the architecture neutral parts of Rick Edgecmbe's "x86/shstk: Introduce > map_shadow_stack syscall". This paragraph can be dropped now. -- Thiago

Re: [PATCH v7 22/39] arm64/gcs: Implement shadow stack prctl() interface

2023-12-06 Thread Thiago Jung Bauermann
Mark Brown writes: > Implement the architecture neutral prtctl() interface for setting the > shadow stack status, this supports setting and reading the current GCS > configuration for the current thread. > > Userspace can enable basic GCS functionality and additionally also > support for GCS pu

Re: [PATCH v8 6/6] zswap: shrinks zswap pool based on memory pressure

2023-12-06 Thread Yosry Ahmed
On Wed, Dec 6, 2023 at 11:47 AM Nhat Pham wrote: > > [...] > > > > Hmm so how should we proceed from here? How about this: > > > > a) I can send a fixlet to move the enablement check above the stats > > flushing + use mem_cgroup_flush_stats > > b) Then maybe, you can send a fixlet to update this n

Re: [PATCH V12 4/7] cpufreq: Add a notification message that the highest perf has changed

2023-12-06 Thread Rafael J. Wysocki
On Wed, Dec 6, 2023 at 9:58 PM Rafael J. Wysocki wrote: > > On Tue, Dec 5, 2023 at 7:38 AM Meng Li wrote: > > > > ACPI 6.5 section 8.4.6.1.1.1 specifies that Notify event 0x85 can be > > emmitted to cause the the OSPM to re-evaluate the highest performance > > Typos above. Given the number of it

Re: [PATCH 2/4] fortify: test: Use kunit_device

2023-12-06 Thread Kees Cook
On Tue, Dec 05, 2023 at 03:31:34PM +0800, david...@google.com wrote: > Using struct root_device to create fake devices for tests is something > of a hack. The new struct kunit_device is meant for this purpose, so use > it instead. > > Signed-off-by: David Gow > --- > lib/fortify_kunit.c | 5 +++-

Re: [PATCH V12 4/7] cpufreq: Add a notification message that the highest perf has changed

2023-12-06 Thread Rafael J. Wysocki
On Tue, Dec 5, 2023 at 7:38 AM Meng Li wrote: > > ACPI 6.5 section 8.4.6.1.1.1 specifies that Notify event 0x85 can be > emmitted to cause the the OSPM to re-evaluate the highest performance Typos above. Given the number of iterations of this patch, this is kind of disappointing. > register. Ad

Re: [PATCH v7 21/39] arm64/gcs: Allocate a new GCS for threads with GCS enabled

2023-12-06 Thread Thiago Jung Bauermann
Mark Brown writes: > When a new thread is created by a thread with GCS enabled the GCS needs > to be specified along with the regular stack. clone3() has been > extended to support this case, allowing userspace to explicitly request > the size for the GCS to be created, but plain clone() is no

hi

2023-12-06 Thread mohams
hi my friend

Re: [PATCH v1 3/9] x86/resctrl: Add resctrl_mbm_flush_cpu() to collect CPUs' MBM events

2023-12-06 Thread Reinette Chatre
Hi Peter, On 12/6/2023 10:38 AM, Peter Newman wrote: > Hi Reinette, > > On Tue, Dec 5, 2023 at 5:47 PM Reinette Chatre > wrote: >> >> On 12/5/2023 4:33 PM, Peter Newman wrote: >>> On Tue, Dec 5, 2023 at 1:57 PM Reinette Chatre >>> wrote: On 12/1/2023 12:56 PM, Peter Newman wrote: > >>> Ig

hi

2023-12-06 Thread mohams
hi my friend

Re: [PATCH v8 6/6] zswap: shrinks zswap pool based on memory pressure

2023-12-06 Thread Nhat Pham
[...] > > Hmm so how should we proceed from here? How about this: > > a) I can send a fixlet to move the enablement check above the stats > flushing + use mem_cgroup_flush_stats > b) Then maybe, you can send a fixlet to update this new callsite? > > Does that sound reasonable? I just sent out the

[PATCH v8 6/6] zswap: shrinks zswap pool based on memory pressure (fix)

2023-12-06 Thread Nhat Pham
Check shrinker enablement early, and use a less costly stat flushing. Suggested-by: Yosry Ahmed Suggested-by: Chengming Zhou Signed-off-by: Nhat Pham --- mm/zswap.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index 27c749f6c1ba

hi

2023-12-06 Thread mohams
hi my friend

Re: [xdp-hints] Re: [PATCH bpf-next v3 2/3] net: stmmac: add Launch Time support to XDP ZC

2023-12-06 Thread Stanislav Fomichev
On 12/06, Magnus Karlsson wrote: > On Tue, 5 Dec 2023 at 20:39, Stanislav Fomichev wrote: > > > > On 12/05, Willem de Bruijn wrote: > > > Stanislav Fomichev wrote: > > > > On Tue, Dec 5, 2023 at 7:34 AM Florian Bezdeka > > > > wrote: > > > > > > > > > > On Tue, 2023-12-05 at 15:25 +, Song, Yo

Re: [PATCH v7 3/3] iommu/vt-d: Add iotlb flush for nested domain

2023-12-06 Thread Jason Gunthorpe
On Fri, Nov 17, 2023 at 05:18:16AM -0800, Yi Liu wrote: > +static int intel_nested_cache_invalidate_user(struct iommu_domain *domain, > + struct iommu_user_data_array > *array, > + u32 *cerror_idx) > +{ > + str

Re: [PATCH v6 1/6] iommu: Add cache_invalidate_user op

2023-12-06 Thread Jason Gunthorpe
On Wed, Dec 06, 2023 at 10:43:34AM -0800, Nicolin Chen wrote: > On Wed, Dec 06, 2023 at 02:32:09PM -0400, Jason Gunthorpe wrote: > > On Fri, Nov 17, 2023 at 05:07:12AM -0800, Yi Liu wrote: > > > > @@ -465,6 +492,9 @@ struct iommu_domain_ops { > > > size_t size); > > > vo

Re: [PATCH v6 1/6] iommu: Add cache_invalidate_user op

2023-12-06 Thread Nicolin Chen
On Wed, Dec 06, 2023 at 02:32:09PM -0400, Jason Gunthorpe wrote: > On Fri, Nov 17, 2023 at 05:07:12AM -0800, Yi Liu wrote: > > @@ -465,6 +492,9 @@ struct iommu_domain_ops { > > size_t size); > > void (*iotlb_sync)(struct iommu_domain *domain, > >

Re: [PATCH RFT v4 5/5] kselftest/clone3: Test shadow stack support

2023-12-06 Thread Mark Brown
On Tue, Dec 05, 2023 at 10:31:09PM +, Edgecombe, Rick P wrote: > On Tue, 2023-12-05 at 16:43 +, Mark Brown wrote: > > If the x86 toolchain/libc support is widely enough deployed (or you > > just > > don't mind any missing coverage) we could use the toolchain support > > there and only have

Re: [PATCH v1 3/9] x86/resctrl: Add resctrl_mbm_flush_cpu() to collect CPUs' MBM events

2023-12-06 Thread Peter Newman
Hi Reinette, On Tue, Dec 5, 2023 at 5:47 PM Reinette Chatre wrote: > > On 12/5/2023 4:33 PM, Peter Newman wrote: > > On Tue, Dec 5, 2023 at 1:57 PM Reinette Chatre > > wrote: > >> On 12/1/2023 12:56 PM, Peter Newman wrote: > > Ignoring any present-day resctrl interfaces, what we minimally need

Re: [PATCH v6 2/6] iommufd: Add IOMMU_HWPT_INVALIDATE

2023-12-06 Thread Jason Gunthorpe
On Fri, Nov 17, 2023 at 05:07:13AM -0800, Yi Liu wrote: > +/** > + * struct iommu_hwpt_invalidate - ioctl(IOMMU_HWPT_INVALIDATE) > + * @size: sizeof(struct iommu_hwpt_invalidate) > + * @hwpt_id: HWPT ID of a nested HWPT for cache invalidation > + * @reqs_uptr: User pointer to an array having @req_n

Re: [PATCH v6 1/6] iommu: Add cache_invalidate_user op

2023-12-06 Thread Jason Gunthorpe
On Fri, Nov 17, 2023 at 05:07:12AM -0800, Yi Liu wrote: > +/** > + * struct iommu_user_data_array - iommu driver specific user space data array > + * @type: The data type of all the entries in the user buffer array > + * @uptr: Pointer to the user buffer array for copy_from_user() > + * @entry_len:

Re: [PATCH RFT v4 2/5] fork: Add shadow stack support to clone3()

2023-12-06 Thread Mark Brown
On Tue, Dec 05, 2023 at 10:23:08PM +, Edgecombe, Rick P wrote: > On Tue, 2023-12-05 at 15:51 +, Mark Brown wrote: > > Hrm, right.  And we then can't use do_mmap() either.  I'd be somewhat > > tempted to disallow that specific case for now rather than deal with > > it > > though that's not

hi

2023-12-06 Thread mohams
hi my friend

Re: [PATCH v6 6/6] iommufd/selftest: Add coverage for IOMMU_HWPT_INVALIDATE ioctl

2023-12-06 Thread Jason Gunthorpe
On Fri, Nov 17, 2023 at 05:07:17AM -0800, Yi Liu wrote: > From: Nicolin Chen > > Add test cases for the IOMMU_HWPT_INVALIDATE ioctl and verify it by using > the new IOMMU_TEST_OP_MD_CHECK_IOTLB. > > Signed-off-by: Nicolin Chen > Signed-off-by: Yi Liu > --- > tools/testing/selftests/iommu/iomm

Re: [PATCH v6 4/6] iommufd/selftest: Add mock_domain_cache_invalidate_user support

2023-12-06 Thread Jason Gunthorpe
On Fri, Nov 17, 2023 at 05:07:15AM -0800, Yi Liu wrote: > +static int > +mock_domain_cache_invalidate_user(struct iommu_domain *domain, > + struct iommu_user_data_array *array, > + u32 *error_code) > +{ > + struct mock_iommu_domain_nes

Re: [RFC PATCH v2 02/10] MAINTAINERS: Introduce V: entry for tests

2023-12-06 Thread Nikolai Kondrashov
On 12/6/23 18:38, Joe Perches wrote: On Wed, 2023-12-06 at 18:23 +0200, Nikolai Kondrashov wrote: On 12/6/23 10:12, David Gow wrote: I'm pretty happy with this personally, though I definitely think we need the support for tests which aren't just executable scripts (e.g. the docs in patch 6). T

Re: [PATCH v8 6/6] zswap: shrinks zswap pool based on memory pressure

2023-12-06 Thread Nhat Pham
On Tue, Dec 5, 2023 at 10:00 PM Yosry Ahmed wrote: > > [..] > > > @@ -526,6 +582,102 @@ static struct zswap_entry > > > *zswap_entry_find_get(struct rb_root *root, > > > return entry; > > > } > > > > > > +/* > > > +* shrinker functions > > > +***

Re: [RFC PATCH v2 06/10] MAINTAINERS: Support referencing test docs in V:

2023-12-06 Thread Nikolai Kondrashov
On 12/6/23 10:03, David Gow wrote: On Wed, 6 Dec 2023 at 02:45, Nikolai Kondrashov wrote: Support referencing test suite documentation in the V: entries of MAINTAINERS file. Use the '*' syntax (like C pointer dereference), where '' is a second-level heading in the new Documentation/process/tes

Re: [RFC PATCH v2 04/10] docs: submitting-patches: Introduce Tested-with:

2023-12-06 Thread Nikolai Kondrashov
On 12/5/23 21:07, Joe Perches wrote: On Tue, 2023-12-05 at 11:59 -0700, Jonathan Corbet wrote: Nikolai Kondrashov writes: Introduce a new tag, 'Tested-with:', documented in the Documentation/process/submitting-patches.rst file. [] I have to ask whether we *really* need to introduce yet anot

Re: [PATCH] drm/tests: Switch to kunit devices

2023-12-06 Thread kernel test robot
rnel.org/r/20231205090405.153140-1-mripard%40kernel.org patch subject: [PATCH] drm/tests: Switch to kunit devices config: i386-randconfig-012-20231206 (https://download.01.org/0day-ci/archive/20231207/202312070010.hafmuyfe-...@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (thi

Re: [RFC PATCH v2 02/10] MAINTAINERS: Introduce V: entry for tests

2023-12-06 Thread Joe Perches
On Wed, 2023-12-06 at 18:23 +0200, Nikolai Kondrashov wrote: > On 12/6/23 10:12, David Gow wrote: > > I'm pretty happy with this personally, though I definitely think we > > need the support for tests which aren't just executable scripts (e.g. > > the docs in patch 6). > > > > The get_maintailer.p

Re: [PATCH] drm/tests: Switch to kunit devices

2023-12-06 Thread kernel test robot
rnel.org/r/20231205090405.153140-1-mripard%40kernel.org patch subject: [PATCH] drm/tests: Switch to kunit devices config: i386-buildonly-randconfig-004-20231206 (https://download.01.org/0day-ci/archive/20231207/202312070011.fdjyhkoz-...@intel.com/config) compiler: clang version 16.0.4 (https://github.com

Re: [RFC PATCH v2 04/10] docs: submitting-patches: Introduce Tested-with:

2023-12-06 Thread Nikolai Kondrashov
On 12/5/23 20:59, Jonathan Corbet wrote: Nikolai Kondrashov writes: Introduce a new tag, 'Tested-with:', documented in the Documentation/process/submitting-patches.rst file. The tag is expected to contain the test suite command which was executed for the commit, and to certify it passed. Addi

Re: [PATCH v2] selftests: sud_test: return correct emulated syscall value on RISC-V

2023-12-06 Thread Palmer Dabbelt
On Wed, 06 Dec 2023 05:44:37 PST (-0800), cle...@rivosinc.com wrote: Currently, the sud_test expects the emulated syscall to return the emulated syscall number. This assumption only works on architectures were the syscall calling convention use the same register for syscall number/syscall return

Re: [RFC PATCH v2 02/10] MAINTAINERS: Introduce V: entry for tests

2023-12-06 Thread Nikolai Kondrashov
On 12/6/23 10:12, David Gow wrote: I'm pretty happy with this personally, though I definitely think we need the support for tests which aren't just executable scripts (e.g. the docs in patch 6). The get_maintailer.pl bits, and hence the requirement to not include '@', feel a little bit 'off': I'

Re: [RFC PATCH v2 02/10] MAINTAINERS: Introduce V: entry for tests

2023-12-06 Thread Nikolai Kondrashov
On 12/5/23 20:58, Joe Perches wrote: On Tue, 2023-12-05 at 20:02 +0200, Nikolai Kondrashov wrote: Require the entry values to not contain the '@' character, so they could be distinguished from emails (always) output by get_maintainer.pl. Why is this useful? Why the need to distinguish? This

Re: [RFC PATCH v2 01/10] get_maintainer: Survive querying missing files

2023-12-06 Thread Nikolai Kondrashov
Hi Joe, On 12/5/23 20:55, Joe Perches wrote: On Tue, 2023-12-05 at 20:02 +0200, Nikolai Kondrashov wrote: Do not die, but only warn when scripts/get_maintainer.pl is asked to retrieve information about a missing file. This allows scripts/checkpatch.pl to query MAINTAINERS while processing patc

Re: [PATCHv3 net-next 01/14] selftests/net: add lib.sh

2023-12-06 Thread Paolo Abeni
On Wed, 2023-12-06 at 13:32 +0100, Petr Machata wrote: > Paolo Abeni writes: > > > Side note for a possible follow-up: if you maintain $ns_list as global > > variable, and remove from such list the ns deleted by cleanup_ns, you > > could remove the cleanup trap from the individual test with somet

[PATCH v3] kunit: run test suites only after module initialization completes

2023-12-06 Thread Marco Pagani
Commit 2810c1e99867 ("kunit: Fix wild-memory-access bug in kunit_free_suite_set()") fixed a wild-memory-access bug that could have happened during the loading phase of test suites built and executed as loadable modules. However, it also introduced a problematic side effect that causes test suites m

Re: [PATCH v3 2/3] livepatch: Move tests from lib/livepatch to selftests/livepatch

2023-12-06 Thread Miroslav Benes
On Fri, 1 Dec 2023, Joe Lawrence wrote: > On Tue, Oct 31, 2023 at 06:10:52PM -0300, Marcos Paulo de Souza wrote: > > The modules are being moved from lib/livepatch to > > tools/testing/selftests/livepatch/test_modules. > > > > This code moving will allow writing more complex tests, like for examp

Re: [PATCH v3 3/3] selftests: livepatch: Test livepatching a heavily called syscall

2023-12-06 Thread Miroslav Benes
Hi, On Tue, 5 Dec 2023, Shuah Khan wrote: > On 12/5/23 05:52, mpdeso...@suse.com wrote: > > On Fri, 2023-12-01 at 16:38 +, Shuah Khan wrote: > > > 0003-selftests-livepatch-Test-livepatching-a-heavily-call.patch has > > style problems, please review. > > > > NOTE: If any of the errors are fa

[PATCH v2] selftests: sud_test: return correct emulated syscall value on RISC-V

2023-12-06 Thread Clément Léger
Currently, the sud_test expects the emulated syscall to return the emulated syscall number. This assumption only works on architectures were the syscall calling convention use the same register for syscall number/syscall return value. This is not the case for RISC-V and thus the return value must b

Re: [PATCH net-next 6/9] selftests/net: convert test_vxlan_vnifiltering.sh to run it in unique namespace

2023-12-06 Thread Ido Schimmel
On Wed, Dec 06, 2023 at 03:07:58PM +0800, Hangbin Liu wrote: > Here is the test result after conversion. > > ]# ./test_vxlan_vnifiltering.sh > TEST: Create traditional vxlan device [ OK ] > TEST: Cannot create vnifilter device without external flag [

Re: [PATCH net-next 5/9] selftests/net: convert test_vxlan_under_vrf.sh to run it in unique namespace

2023-12-06 Thread Ido Schimmel
On Wed, Dec 06, 2023 at 03:07:57PM +0800, Hangbin Liu wrote: > Here is the test result after conversion. > > ]# ./test_vxlan_under_vrf.sh > Checking HV connectivity [ OK ] > Check VM connectivity through VXLAN (underlay in the default VRF) [ OK ] > Check

Re: [PATCH v2] kunit: run test suites only after module initialization completes

2023-12-06 Thread Richard Fitzgerald
On 28/11/2023 10:16, Marco Pagani wrote: Commit 2810c1e99867 ("kunit: Fix wild-memory-access bug in kunit_free_suite_set()") fixed a wild-memory-access bug that could have happened during the loading phase of test suites built and executed as loadable modules. However, it also introduced a proble

Re: [PATCH net-next 4/9] selftests/net: convert test_vxlan_nolocalbypass.sh to run it in unique namespace

2023-12-06 Thread Ido Schimmel
On Wed, Dec 06, 2023 at 03:07:56PM +0800, Hangbin Liu wrote: > Here is the test result after conversion. > > ]# ./test_vxlan_nolocalbypass.sh > TEST: localbypass enabled [ OK ] > TEST: Packet received by local VXLAN device - localbypass [ OK ] >

Re: [PATCH net-next 3/9] selftests/net: convert test_vxlan_mdb.sh to run it in unique namespace

2023-12-06 Thread Ido Schimmel
On Wed, Dec 06, 2023 at 03:07:55PM +0800, Hangbin Liu wrote: > Here is the test result after conversion. > > ]# ./test_vxlan_mdb.sh > > Control path: Basic (*, G) operations - IPv4 overlay / IPv4 underlay > > TEST: MDB entry add

Re: [PATCH v6 2/6] iommufd: Add IOMMU_HWPT_INVALIDATE

2023-12-06 Thread Jason Gunthorpe
On Tue, Dec 05, 2023 at 09:33:30AM -0800, Nicolin Chen wrote: > On Mon, Dec 04, 2023 at 10:48:50AM -0400, Jason Gunthorpe wrote: > > > > Or am I missing some point here? > > > > It sounds Ok, we just have to understand what userspace should be > > doing and how much of this the kernel should imp

Re: [PATCH net-next 2/9] selftests/net: convert test_bridge_neigh_suppress.sh to run it in unique namespace

2023-12-06 Thread Ido Schimmel
On Wed, Dec 06, 2023 at 03:07:54PM +0800, Hangbin Liu wrote: > Here is the test result after conversion. > > ]# ./test_bridge_neigh_suppress.sh > > Per-port ARP suppression - VLAN 10 > -- > TEST: arping[ OK ]

Re: [PATCHv3 net-next 01/14] selftests/net: add lib.sh

2023-12-06 Thread Petr Machata
Paolo Abeni writes: > Side note for a possible follow-up: if you maintain $ns_list as global > variable, and remove from such list the ns deleted by cleanup_ns, you > could remove the cleanup trap from the individual test with something > alike: > > final_cleanup_ns() > { > cleanup_ns $ns

Re: [PATCH net-next 1/9] selftests/net: convert test_bridge_backup_port.sh to run it in unique namespace

2023-12-06 Thread Ido Schimmel
On Wed, Dec 06, 2023 at 03:07:53PM +0800, Hangbin Liu wrote: > There is no h1 h2 actually. Remove it. Here is the test result after > conversion. > > ]# ./test_bridge_backup_port.sh > > Backup port > --- > TEST: Forwarding out of swp1[ OK ] > TEST:

[PATCH v2 15/15] selftests/hid: fix ruff linter complains

2023-12-06 Thread Benjamin Tissoires
rename ambiguous variables l, r, and m, and ignore the return values of uhdev.get_evdev() and uhdev.get_slot() Signed-off-by: Benjamin Tissoires --- new in v2 --- tools/testing/selftests/hid/tests/test_mouse.py | 14 +++--- tools/testing/selftests/hid/tests/test_wacom_generic.p

[PATCH v2 14/15] selftests/hid: fix mypy complains

2023-12-06 Thread Benjamin Tissoires
No code change, only typing information added/ignored Signed-off-by: Benjamin Tissoires --- new in v2 --- tools/testing/selftests/hid/tests/base.py| 4 ++-- tools/testing/selftests/hid/tests/test_tablet.py | 10 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a

[PATCH v2 13/15] selftests/hid: tablets: be stricter for some transitions

2023-12-06 Thread Benjamin Tissoires
To accommodate for legacy devices, we rely on the last state of a transition to be valid: for example when we test PEN_IS_OUT_OF_RANGE to PEN_IS_IN_CONTACT, any "normal" device that reports an InRange bit would insert a PEN_IS_IN_RANGE state between the 2. This is of course valid, but this solutio

[PATCH v2 12/15] selftests/hid: tablets: add a secondary barrel switch test

2023-12-06 Thread Benjamin Tissoires
Some tablets report 2 barrel switches. We better test those too. Use the same transistions description from the primary button tests. Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/tests/test_tablet.py | 67 +

[PATCH v2 11/15] selftests/hid: tablets: convert the primary button tests

2023-12-06 Thread Benjamin Tissoires
We get more descriptive in what we are doing, and also get more information of what is actually being tested. Instead of having a non exhaustive button changes that are semi-randomly done, we can describe all the states we want to test. Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoire

[PATCH v2 10/15] selftests/hid: tablets: add variants of states with buttons

2023-12-06 Thread Benjamin Tissoires
Turns out that there are transitions that are unlikely to happen: for example, having both the tip switch and a button being changed at the same time (in the same report) would require either a very talented and precise user or a very bad hardware with a very low sampling rate. So instead of manua

[PATCH v2 09/15] selftests/hid: tablets: define the elements of PenState

2023-12-06 Thread Benjamin Tissoires
This introduces a little bit more readability by not using the raw values but a dedicated Enum Signed-off-by: Benjamin Tissoires --- new in v2 --- tools/testing/selftests/hid/tests/test_tablet.py | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/too

[PATCH v2 08/15] selftests/hid: tablets: set initial data for tilt/twist

2023-12-06 Thread Benjamin Tissoires
Avoids getting a null event when these usages are set Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/tests/test_tablet.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/testing/selfte

[PATCH v2 07/15] selftests/hid: tablets: do not set invert when the eraser is used

2023-12-06 Thread Benjamin Tissoires
Turns out that the chart from Microsoft is not exactly what I got here: when the rubber is used, and is touching the surface, invert can (should) be set to 0... [0] https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states Reviewed-by: Peter Hutterer Sign

[PATCH v2 06/15] selftests/hid: tablets: move move_to function to PenDigitizer

2023-12-06 Thread Benjamin Tissoires
We can easily subclass PenDigitizer for introducing firmware bugs when subclassing Pen is harder. Move move_to from Pen to PenDigitizer so we get that ability Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/tests/test_tablet.

[PATCH v2 04/15] selftests/hid: tablets: remove unused class

2023-12-06 Thread Benjamin Tissoires
Looks like this is a leftover Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/tests/test_tablet.py | 4 1 file changed, 4 deletions(-) diff --git a/tools/testing/selftests/hid/tests/test_tablet.py b/tools/testing/selfte

[PATCH v2 05/15] selftests/hid: tablets: move the transitions to PenState

2023-12-06 Thread Benjamin Tissoires
Those transitions have nothing to do with `Pen`, so migrate them to `PenState`. The hidden agenda is to remove `Pen` and integrate it into `PenDigitizer` so that we can tweak the events in each state to emulate firmware bugs. Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- n

[PATCH v2 02/15] selftests/hid: vmtest.sh: allow finer control on the build steps

2023-12-06 Thread Benjamin Tissoires
vmtest.sh works great for a one shot test, but not so much for CI where I want to build (with different configs) the bzImage in a separate job than the one I am running it. Add a "build_only" option to specify whether we need to boot the currently built kernel in the vm. Reviewed-by: Peter Hutter

[PATCH v2 03/15] selftests/hid: base: allow for multiple skip_if_uhdev

2023-12-06 Thread Benjamin Tissoires
We can actually have multiple occurences of `skip_if_uhdev` if we follow the information from the pytest doc[0]. This is not immediately used, but can be if we need multiple conditions on a given test. [0] https://docs.pytest.org/en/latest/historical-notes.html#update-marker-code Reviewed-by: Pe

[PATCH v2 01/15] selftests/hid: vmtest.sh: update vm2c and container

2023-12-06 Thread Benjamin Tissoires
boot2container is now on an official project, so let's use that. The container image is now the same I use for the CI, so let's keep to it. Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/vmtest.sh | 4 ++-- 1 file changed, 2

[PATCH v2 00/15] selftests/hid: tablets fixes

2023-12-06 Thread Benjamin Tissoires
Hi, the main trigger of this series was the XP-Pen issue[0]. Basically, the tablets tests were good-ish but couldn't handle that tablet both in terms of emulation or in terms of detection of issues. So rework the tablets test a bit to be able to include the XP-Pen patch later, once I have a kerne

Re: [PATCH v5 5/5] selftests/mm: add UFFDIO_MOVE ioctl test

2023-12-06 Thread Suren Baghdasaryan
On Wed, Dec 6, 2023 at 2:30 AM Suren Baghdasaryan wrote: > > On Wed, Dec 6, 2023 at 1:21 AM David Hildenbrand wrote: > > > > On 05.12.23 05:46, Suren Baghdasaryan wrote: > > > On Mon, Dec 4, 2023 at 10:44 AM Suren Baghdasaryan > > > wrote: > > >> > > >> On Mon, Dec 4, 2023 at 10:27 AM David Hil

[PATCH v6 5/5] selftests/mm: add UFFDIO_MOVE ioctl test

2023-12-06 Thread Suren Baghdasaryan
Add tests for new UFFDIO_MOVE ioctl which uses uffd to move source into destination buffer while checking the contents of both after the move. After the operation the content of the destination buffer should match the original source buffer's content while the source buffer should be zeroed. Separa

[PATCH v6 2/5] userfaultfd: UFFDIO_MOVE uABI

2023-12-06 Thread Suren Baghdasaryan
From: Andrea Arcangeli Implement the uABI of UFFDIO_MOVE ioctl. UFFDIO_COPY performs ~20% better than UFFDIO_MOVE when the application needs pages to be allocated [1]. However, with UFFDIO_MOVE, if pages are available (in userspace) for recycling, as is usually the case in heap compaction algorit

[PATCH v6 4/5] selftests/mm: add uffd_test_case_ops to allow test case-specific operations

2023-12-06 Thread Suren Baghdasaryan
Currently each test can specify unique operations using uffd_test_ops, however these operations are per-memory type and not per-test. Add uffd_test_case_ops which each test case can customize for its own needs regardless of the memory type being used. Pre- and post-allocation operations are added,

[PATCH v6 1/5] mm/rmap: support move to different root anon_vma in folio_move_anon_rmap()

2023-12-06 Thread Suren Baghdasaryan
From: Andrea Arcangeli For now, folio_move_anon_rmap() was only used to move a folio to a different anon_vma after fork(), whereby the root anon_vma stayed unchanged. For that, it was sufficient to hold the folio lock when calling folio_move_anon_rmap(). However, we want to make use of folio_mov

[PATCH v6 3/5] selftests/mm: call uffd_test_ctx_clear at the end of the test

2023-12-06 Thread Suren Baghdasaryan
uffd_test_ctx_clear() is being called from uffd_test_ctx_init() to unmap areas used in the previous test run. This approach is problematic because while unmapping areas uffd_test_ctx_clear() uses page_size and nr_pages which might differ from one test run to another. Fix this by calling uffd_test_c

[PATCH v6 0/5] userfaultfd move option

2023-12-06 Thread Suren Baghdasaryan
This patch series introduces UFFDIO_MOVE feature to userfaultfd, which has long been implemented and maintained by Andrea in his local tree [1], but was not upstreamed due to lack of use cases where this approach would be better than allocating a new page and copying the contents. Previous upstrami

[PATCH v1] selftests/mm: cow: print ksft header before printing anything else

2023-12-06 Thread David Hildenbrand
Doing a ksft_print_msg() before the ksft_print_header() seems to confuse the ksft framework in a strange way: running the test on the cmdline results in the expected output. But piping the output somewhere else, results in some odd output, whereby we repeatedly get the same info printed: #

Re: [PATCH v5 5/5] selftests/mm: add UFFDIO_MOVE ioctl test

2023-12-06 Thread Suren Baghdasaryan
On Wed, Dec 6, 2023 at 1:21 AM David Hildenbrand wrote: > > On 05.12.23 05:46, Suren Baghdasaryan wrote: > > On Mon, Dec 4, 2023 at 10:44 AM Suren Baghdasaryan > > wrote: > >> > >> On Mon, Dec 4, 2023 at 10:27 AM David Hildenbrand wrote: > >>> > >>> On 04.12.23 17:35, Suren Baghdasaryan wrote:

Re: [RFC PATCH v2 04/10] docs: submitting-patches: Introduce Tested-with:

2023-12-06 Thread Geert Uytterhoeven
On Tue, Dec 5, 2023 at 8:07 PM Joe Perches wrote: > On Tue, 2023-12-05 at 11:59 -0700, Jonathan Corbet wrote: > > Nikolai Kondrashov writes: > > > > > Introduce a new tag, 'Tested-with:', documented in the > > > Documentation/process/submitting-patches.rst file. > [] > > I have to ask whether we

Re: [xdp-hints] Re: [PATCH bpf-next v3 2/3] net: stmmac: add Launch Time support to XDP ZC

2023-12-06 Thread Magnus Karlsson
On Tue, 5 Dec 2023 at 20:39, Stanislav Fomichev wrote: > > On 12/05, Willem de Bruijn wrote: > > Stanislav Fomichev wrote: > > > On Tue, Dec 5, 2023 at 7:34 AM Florian Bezdeka > > > wrote: > > > > > > > > On Tue, 2023-12-05 at 15:25 +, Song, Yoong Siang wrote: > > > > > On Monday, December 4,

Re: [PATCH v5 5/5] selftests/mm: add UFFDIO_MOVE ioctl test

2023-12-06 Thread David Hildenbrand
On 05.12.23 05:46, Suren Baghdasaryan wrote: On Mon, Dec 4, 2023 at 10:44 AM Suren Baghdasaryan wrote: On Mon, Dec 4, 2023 at 10:27 AM David Hildenbrand wrote: On 04.12.23 17:35, Suren Baghdasaryan wrote: On Mon, Dec 4, 2023 at 1:27 AM Ryan Roberts wrote: On 04/12/2023 04:09, Suren Bagh

Re: [PATCH] mm, memcg: cg2 memory{.swap,}.peak write handlers

2023-12-06 Thread Michal Hocko
On Tue 05-12-23 11:00:47, David Finkel wrote: > On Tue, Dec 5, 2023 at 4:07 AM Michal Hocko wrote: > > > > This behavior is particularly useful for work scheduling systems that > > > need to track memory usage of worker processes/cgroups per-work-item. > > > Since memory can't be squeezed like CP

RE: [PATCH v1 13/23] KVM: VMX: Handle VMX nested exception for FRED

2023-12-06 Thread Li, Xin3
> Subject: RE: [PATCH v1 13/23] KVM: VMX: Handle VMX nested exception for FRED > > > >+ if (idt_vectoring_info & > VECTORING_INFO_DELIVER_CODE_MASK) > > >+ kvm_requeue_exception_e(vcpu, vector, > > vmcs_read32(error_code_field), > > >+

Re: [PATCH] kunit: tool: fix parsing of test attributes

2023-12-06 Thread David Gow
On Wed, 6 Dec 2023 at 04:39, Rae Moar wrote: > > Add parsing of attributes as diagnostic data. Fixes issue with test plan > being parsed incorrectly as diagnostic data when located after > suite-level attributes. > > Note that if there does not exist a test plan line, the diagnostic lines > betwee

[PATCH] kunit: test: Use an action wrapper instead of a cast

2023-12-06 Thread David Gow
We missed one of the casts of kfree() to kunit_action_t in kunit-test, which was only enabled when debugfs was in use. This could potentially break CFI. Use the existing wrapper function instead. Signed-off-by: David Gow --- lib/kunit/kunit-test.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

Re: [RFC PATCH v2 02/10] MAINTAINERS: Introduce V: entry for tests

2023-12-06 Thread David Gow
On Wed, 6 Dec 2023 at 02:45, Nikolai Kondrashov wrote: > > Introduce a new 'V:' ("Verify") entry to MAINTAINERS. The entry accepts > a test suite command which is proposed to be executed for each > contribution to the subsystem. > > Extend scripts/get_maintainer.pl to support retrieving the V: ent

Re: [RFC PATCH v2 06/10] MAINTAINERS: Support referencing test docs in V:

2023-12-06 Thread David Gow
On Wed, 6 Dec 2023 at 02:45, Nikolai Kondrashov wrote: > > Support referencing test suite documentation in the V: entries of > MAINTAINERS file. Use the '*' syntax (like C pointer dereference), > where '' is a second-level heading in the new > Documentation/process/tests.rst file, with the suite's