Re: [RFC PATCH v4 1/4] mseal: Wire up mseal syscall

2024-01-04 Thread Greg KH
On Thu, Jan 04, 2024 at 06:51:34PM +, jef...@chromium.org wrote: > From: Jeff Xu > > Wire up mseal syscall for all architectures. > > Signed-off-by: Jeff Xu Doesn't this break the build at this point in the patch series? Normally you add the code for the syscall first, and then you wire i

Re: [PATCH v7 1/3] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2024-01-04 Thread Nicolin Chen
On Wed, Jan 03, 2024 at 08:02:04PM -0400, Jason Gunthorpe wrote: > On Wed, Jan 03, 2024 at 12:18:35PM -0800, Nicolin Chen wrote: > > > The driver would have to create it and there would be some driver > > > specific enclosing struct to go with it > > > > > > Perhaps device_ids goes in the driver s

[linux-next:master] BUILD REGRESSION d0b3c8aa5e37775cd7c3ac07b256218df0fd6678

2024-01-04 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: d0b3c8aa5e37775cd7c3ac07b256218df0fd6678 Add linux-next specific files for 20240104 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202401041942.qrb1amzm-...@intel.com Error

Re: [RFC PATCH v2 3/3] KVM: selftests: Add set_memory_region_io to test memslots for MMIO BARs

2024-01-04 Thread Yuan Yao
On Wed, Jan 03, 2024 at 04:45:35PM +0800, Yan Zhao wrote: > Added a selftest set_memory_region_io to test memslots for MMIO BARs. Emm.. "set_memory_region_io" doesn't represent the real testing purpose, but not sure if things like "memory_region_page_refcount_test" become better... > The MMIO BAR

RE: [PATCH v7 1/3] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2024-01-04 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Friday, January 5, 2024 10:16 AM > > > From: Jason Gunthorpe > > Sent: Thursday, January 4, 2024 10:37 PM > > > > On Thu, Dec 14, 2023 at 07:26:39PM +0800, Yi Liu wrote: > > > Per the prior discussion[1], we agreed to move the error reporting into > the > > > driver sp

[PATCH bpf-next v2 3/3] bpf: treewide: Annotate BPF kfuncs in BTF

2024-01-04 Thread Daniel Xu
This commit marks kfuncs as such inside the .BTF_ids section. The upshot of these annotations is that we'll be able to automatically generate kfunc prototypes for downstream users. The process is as follows: 1. In source, use BTF_KFUNCS_START/END macro pair to mark kfuncs 2. During build, pahole i

[PATCH bpf-next v2 0/3] Annotate kfuncs in .BTF_ids section

2024-01-04 Thread Daniel Xu
=== Description === This is a bpf-treewide change that annotates all kfuncs as such inside .BTF_ids. This annotation eventually allows us to automatically generate kfunc prototypes from bpftool. We store this metadata inside a yet-unused flags field inside struct btf_id_set8 (thanks Kumar!). paho

Re: [PATCH bpf-next 2/2] bpf: treewide: Annotate BPF kfuncs in BTF

2024-01-04 Thread Daniel Xu
On Thu, Jan 04, 2024 at 06:17:50PM -0700, Daniel Xu wrote: [...] > > > > also given that we can have modules calling register_btf_kfunc_id_set, > > should we just return error instead of the warn? > > It looks like quite a few registrations go through late_initcall(), > in which error codes are t

RE: [PATCH v7 1/3] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2024-01-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 4, 2024 10:37 PM > > On Thu, Dec 14, 2023 at 07:26:39PM +0800, Yi Liu wrote: > > Per the prior discussion[1], we agreed to move the error reporting into the > > driver specific part. On Intel side, we want to report two devTLB > > invalidation err

Re: [PATCH bpf-next 2/2] bpf: treewide: Annotate BPF kfuncs in BTF

2024-01-04 Thread Daniel Xu
Hi Jiri, On Thu, Jan 04, 2024 at 12:41:51PM +0100, Jiri Olsa wrote: > On Wed, Jan 03, 2024 at 04:31:56PM -0700, Daniel Xu wrote: > > SNIP > > > diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h > > index 88f914579fa1..771e29762a2d 100644 > > --- a/include/linux/btf_ids.h > > +++ b/

Re: [RFC PATCH v4 4/4] mseal:add documentation

2024-01-04 Thread Randy Dunlap
On 1/4/24 10:51, jef...@chromium.org wrote: > From: Jeff Xu > > Add documentation for mseal(). > > Signed-off-by: Jeff Xu > --- > Documentation/userspace-api/mseal.rst | 181 ++ > 1 file changed, 181 insertions(+) > create mode 100644 Documentation/userspace-api/mse

Re: [PATCH net-next] selftests: forwarding: Avoid failures to source net/lib.sh

2024-01-04 Thread Hangbin Liu
On Thu, Jan 04, 2024 at 09:11:09AM -0500, Benjamin Poirier wrote: > The expression "source ../lib.sh" added to net/forwarding/lib.sh in commit > 25ae948b4478 ("selftests/net: add lib.sh") does not work for tests outside > net/forwarding which source net/forwarding/lib.sh (1). It also does not > wor

[PATCHv3 net-next 3/3] selftest/ptp: extend test to include ptp_gettimex64any()

2024-01-04 Thread Mahesh Bandewar
Update testptp.c to exercise the new ptp method gettimex64any(). When only -x option is given the PTP_SYS_OFFSET_EXTENDED or gettimex64() method is exercised while presence of -x with -y will exercise PTP_SYS_OFFSET_ANY or gettimex64any() method. -y option is to choose the timebase from available

[RFC PATCH v4 3/4] selftest mm/mseal memory sealing

2024-01-04 Thread jeffxu
From: Jeff Xu selftest for memory sealing change in mmap() and mseal(). Signed-off-by: Jeff Xu --- tools/testing/selftests/mm/.gitignore |1 + tools/testing/selftests/mm/Makefile |1 + tools/testing/selftests/mm/mseal_test.c | 1971 +++ 3 files changed, 1973 i

[RFC PATCH v4 4/4] mseal:add documentation

2024-01-04 Thread jeffxu
From: Jeff Xu Add documentation for mseal(). Signed-off-by: Jeff Xu --- Documentation/userspace-api/mseal.rst | 181 ++ 1 file changed, 181 insertions(+) create mode 100644 Documentation/userspace-api/mseal.rst diff --git a/Documentation/userspace-api/mseal.rst b/Doc

[RFC PATCH v4 2/4] mseal: add mseal syscall

2024-01-04 Thread jeffxu
From: Jeff Xu The new mseal() is an syscall on 64 bit CPU, and with following signature: int mseal(void addr, size_t len, unsigned long flags) addr/len: memory range. flags: reserved. mseal() blocks following operations for the given memory range. 1> Unmapping, moving to another location, and

[RFC PATCH v4 0/4] Introduce mseal()

2024-01-04 Thread jeffxu
From: Jeff Xu This is V4 of the patch, the patch has improved significantly since V1, thanks to diverse inputs, a few discussions remain, please read those in the open discussion section of v4 of change history. - This patchset prop

[RFC PATCH v4 1/4] mseal: Wire up mseal syscall

2024-01-04 Thread jeffxu
From: Jeff Xu Wire up mseal syscall for all architectures. Signed-off-by: Jeff Xu --- arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 ++ ar

Re: [RFC PATCH v3 0/3] Add test to verify probe of devices from discoverable busses

2024-01-04 Thread Mark Brown
On Tue, Jan 02, 2024 at 10:45:59AM +0300, Dan Carpenter wrote: > Life hack: Don't put RFC in the subject. Especially if it's a v2 or > higher. No one reads RFC patches. RFC does tend to be useful in cases where you know that there are substantial problems with the patches but are posting to sol

Re: [PATCH v7 1/3] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2024-01-04 Thread Jason Gunthorpe
On Thu, Dec 14, 2023 at 07:26:39PM +0800, Yi Liu wrote: > Per the prior discussion[1], we agreed to move the error reporting into the > driver specific part. On Intel side, we want to report two devTLB > invalidation errors: ICE (invalid completion error) and ITE (invalidation > timeout error). Suc

[PATCH net-next] selftests: forwarding: Avoid failures to source net/lib.sh

2024-01-04 Thread Benjamin Poirier
The expression "source ../lib.sh" added to net/forwarding/lib.sh in commit 25ae948b4478 ("selftests/net: add lib.sh") does not work for tests outside net/forwarding which source net/forwarding/lib.sh (1). It also does not work in some cases where only a subset of tests are exported (2). Avoid the

Re: [PATCH] kunit: Protect string comparisons against NULL

2024-01-04 Thread Richard Fitzgerald
On 22/12/23 08:39, David Gow wrote: On Wed, 20 Dec 2023 at 23:52, Richard Fitzgerald wrote: Add NULL checks to KUNIT_BINARY_STR_ASSERTION() so that it will fail cleanly if either pointer is NULL, instead of causing a NULL pointer dereference in the strcmp(). A test failure could be that a str

Re: [PATCH bpf-next 2/2] bpf: treewide: Annotate BPF kfuncs in BTF

2024-01-04 Thread Jiri Olsa
On Wed, Jan 03, 2024 at 04:31:56PM -0700, Daniel Xu wrote: SNIP > diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h > index 88f914579fa1..771e29762a2d 100644 > --- a/include/linux/btf_ids.h > +++ b/include/linux/btf_ids.h > @@ -8,6 +8,9 @@ struct btf_id_set { > u32 ids[]; > };

Re: Re: [PATCH v4 11/11] KVM: selftests: Enable tunning of err_margin_us in arch timer test

2024-01-04 Thread Andrew Jones
On Thu, Dec 21, 2023 at 10:58:40AM +0800, Haibo Xu wrote: > On Wed, Dec 20, 2023 at 9:58 PM Marc Zyngier wrote: > > > > On Wed, 20 Dec 2023 13:51:24 +, > > Haibo Xu wrote: > > > > > > On Wed, Dec 20, 2023 at 5:00 PM Marc Zyngier wrote: > > > > > > > > On 2023-12-20 06:50, Haibo Xu wrote: > >

Re: [RFC PATCH v2 2/3] KVM: selftests: add selftest driver for KVM to test memory slots for MMIO BARs

2024-01-04 Thread Yuan Yao
On Wed, Jan 03, 2024 at 04:44:57PM +0800, Yan Zhao wrote: > This driver is for testing KVM memory slots for device MMIO BARs that are > mapped to pages serving as device resources. > > This driver implements a mock device whose device resources are pages > array that can be mmaped into user space.