Ping.
Looking to get this patch and [1] slated for 6.7 which fixes some
kselftest builds on older kernels.
On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote:
>
> When building with Clang, I am getting many warnings from the selftests/rseq
> tree.
>
> Here's one such example from rseq tree:
> |
Hey all,
Gentle ping on this patch. Looking to get this patch and [1] slated
for 6.7 wherein we can start getting cleaner kselftests builds.
I do not think I am able to successfully run the hid/bpf selftests due
to my kernel version being too low (and an inability to upgrade it as
I'm on a corp r
Ping.
On 2023/9/15 15:41, Jinjie Ruan wrote:
> Inject fault while probing kunit-test.ko, the below null-ptr-deref
> occurs.
>
> In kunit_run_case_catch_errors(), if the first kunit_try_catch_run()
> fails in kthread_run(), the kunit_try_run_case() will not run, so the
> kunit_resource_test_init()
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:51 PM
>
> From: Nicolin Chen
>
> The struct iommufd_hw_pagetable has been representing a kernel-managed
> HWPT, yet soon will be reused to represent a user-managed HWPT. These
> two types of HWPTs has the same IOMMUFD object type and an
>
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:51 PM
>
> -void iommufd_hw_pagetable_destroy(struct iommufd_object *obj)
> +static void iommufd_kernel_managed_hwpt_destroy(struct
> iommufd_object *obj)
'_managed_' could be removed. 'kernel_hwpt' and 'user_hwpt' are
clear enough.
ditto
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:51 PM
>
> +static void iommufd_user_managed_hwpt_abort(struct iommufd_object
> *obj)
> +{
> + struct iommufd_hw_pagetable *hwpt =
> + container_of(obj, struct iommufd_hw_pagetable, obj);
> +
> + /* The parent->mutex must
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:51 PM
>
> From: Nicolin Chen
>
> Now enforce_cache_coherency and msi_cookie are kernel-managed hwpt
> things.
> So, they should be only setup on kernel-managed domains. If the attaching
> domain is a user-managed domain, redirect the hwpt
There is need to get the selftest device (sobj->type == TYPE_IDEV) in
multiple places, so have a helper to for it.
Signed-off-by: Yi Liu
---
drivers/iommu/iommufd/selftest.c | 32 +---
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/iommu/iommu
From: Lu Baolu
Provide a high-level API to allow replacements of one domain with
another for specific pasid of a device. This is similar to
iommu_group_replace_domain() and it is also expected to be used
only by IOMMUFD.
Signed-off-by: Lu Baolu
Signed-off-by: Yi Liu
---
drivers/iommu/iommu-pr
From: Kevin Tian
This introduces three APIs for device drivers to manage pasid attach/
replace/detach.
int iommufd_device_pasid_attach(struct iommufd_device *idev,
u32 pasid, u32 *pt_id);
int iommufd_device_pasid_replace(struct iommufd_device *idev,
The two callbacks are needed to make pasid_attach/detach path complete for
mock device. A nop is enough for set_dev_pasid, a domain type check in the
remove_dev_pasid is also helpful.
Signed-off-by: Yi Liu
---
drivers/iommu/iommufd/selftest.c | 28
1 file changed, 28
From: Lu Baolu
This allows the upper layers to set a nested type domain to a PASID of a
device if the PASID feature is supported by the IOMMU hardware.
Signed-off-by: Lu Baolu
Signed-off-by: Yi Liu
---
drivers/iommu/intel/nested.c | 47
1 file changed, 47
This adds 4 test ops for pasid attach/replace/detach testing. There are
ops to attach/detach pasid, and also op to check the attached domain of
a pasid.
Signed-off-by: Yi Liu
---
drivers/iommu/iommufd/iommufd_test.h | 24 +++
drivers/iommu/iommufd/selftest.c | 98
Most of the core logic before conducting the actual device attach/
replace operation can be shared with pasid attach/replace. Create
a new structure so more information (e.g. pasid) can be later added
along with the attach_fn.
Signed-off-by: Kevin Tian
Signed-off-by: Yi Liu
---
drivers/iommu/io
PASID (Process Address Space ID) is a PCIe extension to tag the DMA
transactions out of a physical device, and most modern IOMMU hardware
have supported PASID granular address translation. So a PASID-capable
devices can be attached to multiple hwpts (a.k.a. domains), each attachment
is tagged with
This tests iommufd pasid attach/replace/detach.
Signed-off-by: Yi Liu
---
tools/testing/selftests/iommu/iommufd.c | 172 ++
.../selftests/iommu/iommufd_fail_nth.c| 28 ++-
tools/testing/selftests/iommu/iommufd_utils.h | 78
3 files changed, 274 insertions
This exposes PCIe PASID capability to userspace and where to emulate this
capability if wants to further expose it to VM.
And this only exposes PASID capability for devices which has PCIe PASID
extended struture in its configuration space. While for VFs, userspace
is still unable to see this capab
This adds ioctls for the userspace to attach a given pasid of a vfio
device to/from an IOAS/HWPT.
Signed-off-by: Yi Liu
---
drivers/vfio/device_cdev.c | 45 +++
drivers/vfio/vfio.h| 4 +++
drivers/vfio/vfio_main.c | 8 ++
include/uapi/linux/vfio.h | 5
This adds the pasid attach/detach uAPIs for userspace to attach/detach
a PASID of a device to/from a given ioas/hwpt. Only vfio-pci driver is
enabled in this series. After this series, PASID-capable devices bound
with vfio-pci can report PASID capability to userspace and VM to enable
PASID usages l
From: Kevin Tian
This adds pasid_at|de]tach_ioas ops for attaching hwpt to pasid of a
device and the helpers for it. For now, only vfio-pci supports pasid
attach/detach.
Signed-off-by: Kevin Tian
Signed-off-by: Yi Liu
---
drivers/vfio/iommufd.c | 48 +
On Tue, Sep 19, 2023 at 10:12:50AM +0200, Johannes Nixdorf wrote:
> A malicious actor behind one bridge port may spam the kernel with packets
> with a random source MAC address, each of which will create an FDB entry,
> each of which is a dynamic allocation in the kernel.
>
> There are roughly 2^4
On Thu, Sep 21, 2023 at 01:19:44PM +0300, Nikolay Aleksandrov wrote:
> I'm not strongly against, just IMO it is unnecessary. I won't block the set
> because of this, but it would be nice to get input from others as
> well. If you can recompile your kernel to set a limit, it should be easier
> to ch
On 9/25/23 15:38, Juntong Deng wrote:
According to the awk manual, the -e option does not need to be specified
in front of 'program' (unless you need to mix program-file).
The redundant -e option can cause error when users use awk tools other
than gawk (for example, mawk does not support the -e
On Mon, Sep 25, 2023 at 04:37:02PM -0700, Tony Ambardar wrote:
> Current test_verifier provides little feedback or argument validation,
> instead silently falling back to running all tests in case of user error
> or even expected use cases. Trying to do manual exploratory testing,
> switching betwe
On Mon, Sep 25, 2023 at 04:37:02PM -0700, Tony Ambardar wrote:
SNIP
> @@ -1848,36 +1850,40 @@ int main(int argc, char **argv)
> {
> unsigned int from = 0, to = ARRAY_SIZE(tests);
> bool unpriv = !is_admin();
> - int arg = 1;
> -
> - if (argc > 1 && strcmp(argv[1], "-v") == 0)
On Tue, Sep 19, 2023 at 02:49:43PM -0400, Rae Moar wrote:
> On Fri, Sep 15, 2023 at 8:58 AM Dan Carpenter
> wrote:
> >
> > Smatch complains that the missing error checks would lead to a crash:
> >
> > lib/kunit/executor_test.c:40 parse_filter_test()
> > error: double free of 'filter.test_
Hi Linus,
Please pull the following Kselftest fixes update for Linux 6.6-rc4.
This kselftest fixes update for Linux 6.6-rc4 consists of one
single fix to unmount tracefs when test created mount.
diff is attached.
thanks.
-- Shuah
---
On Mon, Sep 18, 2023 at 06:16:37PM -0700, Nicolin Chen wrote:
> The point in iterating variant->mock_domains is to test the idev_ids[0]
> and idev_ids[1]. So use it instead of keeping testing idev_ids[0] only.
>
> Signed-off-by: Nicolin Chen
> ---
> Jason/Kevin, I formated the patch with "-U4" so
The pull request you sent on Tue, 26 Sep 2023 09:24:47 -0600:
> git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
> tags/linux-kselftest-fixes-6.6-rc4
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/50768a425b46ad7d98f6d88c22d41aa026c463cf
Thank you!
On Tue, Sep 26, 2023 at 06:37:55AM +, Tian, Kevin wrote:
> > From: Robin Murphy
> > Sent: Friday, September 22, 2023 5:48 PM
> >
> > I could go on enjoying myself, but basically yeah, "default" can't be a
> > type in itself (at best it would be a meta-type which could be
> > requested, such t
The 'uevents' subdirectory does not exist in tools/testing/selftests/
and adding 'uevents' to the TARGETS list results in the following error:
make[1]: Entering directory 'xx/tools/testing/selftests/uevents'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory
Hi Shuah,
Could you please consider this series for inclusion?
Thank you very much
Reinette
On 9/4/2023 2:53 AM, Ilpo Järvinen wrote:
> The benchmark command handling (-b) in resctrl selftests is overly
> complicated code. This series turns the benchmark command immutable to
> preserve it for a
According to the awk manual, the -e option does not need to be specified
in front of 'program' (unless you need to mix program-file).
The redundant -e option can cause error when users use awk tools other
than gawk (for example, mawk does not support the -e option).
Error Example:
awk: not an opt
On 9/26/23 08:20, Justin Stitt wrote:
Ping.
Looking to get this patch and [1] slated for 6.7 which fixes some
kselftest builds on older kernels.
On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote:
When building with Clang, I am getting many warnings from the selftests/rseq
tree.
Here's one
On 9/26/23 13:02, Mathieu Desnoyers wrote:
On 9/26/23 08:20, Justin Stitt wrote:
Ping.
Looking to get this patch and [1] slated for 6.7 which fixes some
kselftest builds on older kernels.
On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote:
When building with Clang, I am getting many warning
The existing macro KUNIT_ARRAY_PARAM can produce parameter
generator function but only when we fully know the definition
of the array. However, there might be cases where we would like
to generate test params based on externaly defined array, which
is defined as zero-terminated array, like pci_driv
In some cases we may want to generate params based on existing
zero terminated array, but with some entries filtered out.
Extend macro KUNIT_ZERO_ARRAY_PARAM to accept filter function
and provide example how to use it.
$ ./tools/testing/kunit/kunit.py run \
--kunitconfig ./lib/kunit/.kunitconf
Hi Ilpo,
On 9/15/2023 8:44 AM, Ilpo Järvinen wrote:
> The MBA and CMT tests expect support of other features to be able to
> run.
>
> When platform only supports MBA but not MBM, MBA test will fail with:
> Failed to open total bw file: No such file or directory
>
> When platform only supports CM
Hi Ilpo,
On 9/15/2023 8:44 AM, Ilpo Järvinen wrote:
> Feature check in validate_resctrl_feature_request() takes in the test
> name string and maps that to what to check per test.
>
> Pass resource and feature names to validate_resctrl_feature_request()
> directly rather than deriving them from th
Hi Jinjie,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc3 next-20230926]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--bas
Hi Ilpo,
On 9/15/2023 8:44 AM, Ilpo Järvinen wrote:
> The initial value of 5% chosen for the maximum allowed percentage
> difference between resctrl mbm value and IMC mbm value in commit
> 06bd03a57f8c ("selftests/resctrl: Fix MBA/MBM results reporting
> format") was "randomly chosen value" (as ad
Hi Ilpo,
On 9/15/2023 8:44 AM, Ilpo Järvinen wrote:
> The test runner run_cmt_test() in resctrl_tests.c checks for CMT
> feature and does not run cmt_resctrl_val() if CMT is not supported.
> Then cmt_resctrl_val() also check is CMT is supported.
>
> Remove the duplicated feature check for CMT fro
Tested the series on AMD system. Looks good.
Tested-by: Babu Moger
There are few tests which are skipped on AMD. Will plan to look into it.
Thanks
Babu
On 9/4/23 04:53, Ilpo Järvinen wrote:
> The benchmark command handling (-b) in resctrl selftests is overly
> complicated code. This series turn
On 9/26/23 12:03, Juntong Deng wrote:
The 'uevents' subdirectory does not exist in tools/testing/selftests/
and adding 'uevents' to the TARGETS list results in the following error:
make[1]: Entering directory 'xx/tools/testing/selftests/uevents'
make[1]: *** No targets specified and no makefile
> From: Jason Gunthorpe
> Sent: Wednesday, September 27, 2023 12:29 AM
>
> On Tue, Sep 26, 2023 at 06:37:55AM +, Tian, Kevin wrote:
> > > From: Robin Murphy
> > > Sent: Friday, September 22, 2023 5:48 PM
> > >
> > > I could go on enjoying myself, but basically yeah, "default" can't be a
> >
On 9/26/23 5:26 PM, Yi Liu wrote:
From: Lu Baolu
Provide a high-level API to allow replacements of one domain with
another for specific pasid of a device. This is similar to
iommu_group_replace_domain() and it is also expected to be used
only by IOMMUFD.
Signed-off-by: Lu Baolu
Signed-off-by:
On 9/26/23 14:39, Shuah Khan wrote:
On 9/26/23 13:02, Mathieu Desnoyers wrote:
On 9/26/23 08:20, Justin Stitt wrote:
Ping.
Looking to get this patch and [1] slated for 6.7 which fixes some
kselftest builds on older kernels.
On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote:
When building
kselftest/fixes build: 6 builds: 0 failed, 6 passed, 1 warning
(linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)
Full Build Summary:
https://kernelci.org/build/kselftest/branch/fixes/kernel/linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df/
Tree: kselftest
Branch: fixes
Git Describe: linux-kselftest-
On 9/26/23 5:26 PM, Yi Liu wrote:
Most of the core logic before conducting the actual device attach/
replace operation can be shared with pasid attach/replace. Create
a new structure so more information (e.g. pasid) can be later added
along with the attach_fn.
Signed-off-by: Kevin Tian
Signed-of
kselftest/fixes kselftest-seccomp: 3 runs, 3 regressions
(linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)
Regressions Summary
---
platform | arch | lab | compiler | defconfig
| regressions
-+---+---
On Sat, 23 Sept 2023 at 08:54, Ma Ke wrote:
>
> To avoid the failure of alloc, we could check the return value of
> kmalloc() and kzalloc().
>
> Signed-off-by: Ma Ke
> ---
Thanks very much. This looks good to me. We could change the rest of
the allocations to also use kunit_kzalloc(), but equall
kselftest/fixes kselftest-lkdtm: 3 runs, 2 regressions
(linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)
Regressions Summary
---
platform | arch | lab | compiler | defconfig
| regressions
-+---+-
kselftest/next kselftest-seccomp: 4 runs, 3 regressions
(v6.6-rc2-2-g078a2ead544c)
Regressions Summary
---
platform | arch | lab | compiler | defconfig
| regressions
-+---+---+-
> From: Baolu Lu
> Sent: Wednesday, September 27, 2023 10:18 AM
>
> On 9/26/23 5:26 PM, Yi Liu wrote:
> >
> > -typedef struct iommufd_hw_pagetable *(*attach_fn)(
> > - struct iommufd_device *idev, struct iommufd_hw_pagetable *hwpt);
> > +static struct iommufd_hw_pagetable *do_attach(struct iomm
Hi Ilpo,
On 9/15/2023 8:44 AM, Ilpo Järvinen wrote:
> Unmounting resctrl FS has been moved into the per test functions in
> resctrl_tests.c by commit caddc0fbe495 ("selftests/resctrl: Move
> resctrl FS mount/umount to higher level"). In case a signal (SIGINT,
> SIGTERM, or SIGHUP) is received, the
kselftest/next kselftest-cpufreq: 7 runs, 4 regressions
(v6.6-rc2-2-g078a2ead544c)
Regressions Summary
---
platform | arch | lab | compiler | defconfig
| regressions
-+---+---+-
kselftest/fixes kselftest-lib: 3 runs, 3 regressions
(linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)
Regressions Summary
---
platform | arch | lab | compiler | defconfig
| regressions
-+---+---
On 9/26/23 5:26 PM, Yi Liu wrote:
From: Kevin Tian
This introduces three APIs for device drivers to manage pasid attach/
replace/detach.
int iommufd_device_pasid_attach(struct iommufd_device *idev,
u32 pasid, u32 *pt_id);
int iommufd_device_pasid_re
> From: Baolu Lu
> Sent: Wednesday, September 27, 2023 10:49 AM
>
> On 9/26/23 5:26 PM, Yi Liu wrote:
> > From: Kevin Tian
> >
> > This introduces three APIs for device drivers to manage pasid attach/
> > replace/detach.
> >
> > int iommufd_device_pasid_attach(struct iommufd_device *idev,
>
kselftest/fixes kselftest-livepatch: 1 runs, 1 regressions
(linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)
Regressions Summary
---
platform| arch | lab | compiler | defconfig
| regressions
+---+---+--+
On Tue, Sep 26, 2023 at 09:44:38AM +0530, Anup Patel wrote:
> On Tue, Sep 26, 2023 at 9:38 AM Anup Patel wrote:
> >
> > On Mon, Sep 25, 2023 at 11:18 PM Charlie Jenkins
> > wrote:
> > >
> > > On Mon, Sep 25, 2023 at 07:08:52PM +0530, Anup Patel wrote:
> > > > The Veyron-V1 CPU supports custom co
kselftest/next kselftest-lkdtm: 3 runs, 2 regressions (v6.6-rc2-2-g078a2ead544c)
Regressions Summary
---
platform | arch | lab | compiler | defconfig
| regressions
-+---+---+--+-
Hi Ilpo,
On 9/15/2023 8:44 AM, Ilpo Järvinen wrote:
> Currently, _GNU_SOURCE is defined in resctrl.h. Defining _GNU_SOURCE
nitpick: If you do submit a new version, could you please drop the
"Currently".
> has a large impact on what gets defined when including headers either
> before or after it.
kselftest/fixes kselftest-cpufreq: 8 runs, 4 regressions
(linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)
Regressions Summary
---
platform | arch | lab | compiler | defconfig
| regressions
-+---+---
kselftest/next kselftest-livepatch: 1 runs, 1 regressions
(v6.6-rc2-2-g078a2ead544c)
Regressions Summary
---
platform| arch | lab | compiler | defconfig
| regressions
+---+---+--+--
kselftest/next build: 6 builds: 0 failed, 6 passed, 1 warning
(v6.6-rc2-2-g078a2ead544c)
Full Build Summary:
https://kernelci.org/build/kselftest/branch/next/kernel/v6.6-rc2-2-g078a2ead544c/
Tree: kselftest
Branch: next
Git Describe: v6.6-rc2-2-g078a2ead544c
Git Commit: 078a2ead544c56fbe6a3bed8
kselftest/next kselftest-lib: 3 runs, 3 regressions (v6.6-rc2-2-g078a2ead544c)
Regressions Summary
---
platform | arch | lab | compiler | defconfig
| regressions
-+---+---+--+---
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:54 PM
>
> This adds IOMMU_HWPT_TYPE_VTD_S1 for stage-1 hw_pagetable of Intel
> VT-d
> and the corressponding data structure for userspace specified parameter
> for the domain allocation.
>
> Signed-off-by: Yi Liu
Reviewed-by: Kevin Tian
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:54 PM
> +
> +/**
> + * intel_pasid_setup_nested() - Set up PASID entry for nested translation.
> + * @iommu: IOMMU which the device belong to
> + * @dev:Device to be set up for translation
> + * @pasid: PASID to be programm
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:54 PM
>
> +
> + /* Is s2_domain compatible with this IOMMU? */
Add more words on why prepare_attach uses s2_domain when the actual
attach is for s1
> + ret = prepare_domain_attach_device(&dmar_domain->s2_domain-
> >domain, dev);
>
Zero out the buffer for readlink() since readlink() does not append a
terminating null byte to the buffer.
Fixes: 833c12ce0f430 ("selftests/x86/lam: Add inherit test cases for
linear-address masking")
Signed-off-by: Binbin Wu
---
tools/testing/selftests/x86/lam.c | 2 +-
1 file changed, 1 inse
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:54 PM
>
> +/**
> + * enum iommu_hwpt_vtd_s1_invalidate_flags - Flags for Intel VT-d
> + * stage-1 cache invalidation
> + * @IOMMU_VTD_QI_FLAGS_LEAF: The LEAF flag indicates whether only the
> + *
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:54 PM
> +
> + /* REVISIT:
> + * VT-d has defined ITE, ICE, IQE for invalidation failure per hardware,
> + * but no error code yet, so just set the error code to be 0.
> + */
> + *cerror_idx = 0;
> +
Is it "hardware do
> From: Liu, Yi L
> Sent: Thursday, September 21, 2023 3:55 PM
>
>
> + if (hwpt_type != IOMMU_HWPT_TYPE_DEFAULT &&
> + hwpt_type != IOMMU_HWPT_TYPE_VTD_S1)
> + return ERR_PTR(-EINVAL);
> +
> + if ((hwpt_type == IOMMU_HWPT_TYPE_DEFAULT) == !!parent)
> + ret
74 matches
Mail list logo