Mark Brown writes:
> While it's a bit off topic for them the floating point stress tests do give
> us some coverage of context thrashing cases, and also of active signal
> delivery separate to the relatively complicated framework in the actual
> signals tests. Have the tests enable GCS on startup
Mark Brown writes:
> On Wed, Aug 07, 2024 at 07:39:54PM -0300, Thiago Jung Bauermann wrote:
>
>> # # Thread-4870: Failed to enable GCS
>
> which is printed if a basic PR_SET_SHADOW_STACK_STATUS fails immediately
> the program starts executing:
>
> function _start
> // Run with GCS
>
On Wed, 7 Aug 2024 17:57:16 + Abhinav Jain wrote:
> + ip link add veth0 type peer name veth1
That's not the right syntax..
--
pw-bot: cr
On Wed, Aug 07, 2024 at 11:03:24PM +0100, Mark Brown wrote:
> On Wed, Aug 07, 2024 at 12:23:01PM -0700, Kees Cook wrote:
> > On Wed, Aug 07, 2024 at 01:39:27PM +0100, Mark Brown wrote:
>
> > > size = args->shadow_stack_size;
> > > + shstk->base = 0;
> > > + shstk->size =
On Wed, Aug 07, 2024 at 07:39:54PM -0300, Thiago Jung Bauermann wrote:
> Mark Brown writes:
> > Add a stress test which runs one more process than we have CPUs spinning
> > through a very recursive function with frequent syscalls immediately prior
> Unfortunately, gcs-stress still fails on my FV
Mark Brown writes:
> Add a stress test which runs one more process than we have CPUs spinning
> through a very recursive function with frequent syscalls immediately prior
> to return and signals being injected every 100ms. The goal is to flag up
> any scheduling related issues, for example failur
Mark Brown writes:
> Do some testing of the signal handling for GCS, checking that a GCS
> frame has the expected information in it and that the expected signals
> are delivered with invalid operations.
>
> Reviewed-by: Thiago Jung Bauermann
> Signed-off-by: Mark Brown
> ---
> tools/testing/se
Mark Brown writes:
> Verify that we can lock individual GCS mode bits, that other modes
> aren't affected and as a side effect also that every combination of
> modes can be enabled.
>
> Normally the inability to reenable GCS after disabling it would be an
> issue with testing but fortunately the
Mark Brown writes:
> There are things like threads which nolibc struggles with which we want
> to add coverage for, and the ABI allows us to test most of these even if
> libc itself does not understand GCS so add a test application built
> using the system libc.
>
> Reviewed-by: Thiago Jung Bauer
Mark Brown writes:
> This test program just covers the basic GCS ABI, covering aspects of the
> ABI as standalone features without attempting to integrate things.
>
> Reviewed-by: Thiago Jung Bauermann
> Signed-off-by: Mark Brown
> ---
> tools/testing/selftests/arm64/Makefile| 2 +-
>
Mark Brown writes:
> In order to test shadow stack support in clone3() the clone3() selftests
> need to have a fully inline clone3() call, provide one for arm64.
>
> Signed-off-by: Mark Brown
> ---
> tools/testing/selftests/clone3/clone3_selftests.h | 26
> +++
> 1 file cha
Hello,
Mark Brown writes:
> Add coverage of the GCS hwcap to the hwcap selftest, using a read of
> GCSPR_EL0 to generate SIGILL without having to worry about enabling GCS.
>
> Reviewed-by: Thiago Jung Bauermann
> Signed-off-by: Mark Brown
> ---
> tools/testing/selftests/arm64/abi/hwcap.c | 19
On 8/7/24 15:51, Thomas Weißschuh wrote:
The current support for LLVM and clang in nolibc and its testsuite is
very limited.
* Various architectures plain do not compile
* The user *has* to specify "-Os" otherwise the program crashes
* Cross-compilation of the tests does not work
* Using clang i
On Wed, Aug 07, 2024 at 12:23:01PM -0700, Kees Cook wrote:
> On Wed, Aug 07, 2024 at 01:39:27PM +0100, Mark Brown wrote:
> > size = args->shadow_stack_size;
> > + shstk->base = 0;
> > + shstk->size = 0;
> Yup, that fixes it!
> # Totals: pass:23 fail:0 xfail:0 xp
The target names between GCC and clang differ for s390.
While GCC uses "s390", clang uses "powerz".
This mapping is not handled by tools/scripts/Makefile.include,
so do it in the nolibc-test Makefile.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 3 +++
1 file cha
As mentioned in the comment, the workaround for
__attribute__((no_stack_protector)) is only necessary on GCC.
Avoid applying the workaround on clang, as clang does not recognize
__attribute__((__optimize__)) and would fail.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-powerpc.h
The cc-option macro from Build.include is not compatible with clang
cross builds, as it does not respect the "--target" and similar flags,
set up by Mekfile.include.
Provide a custom variant which works correctly.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selfte
Makefile.include can modify CC and CFLAGS for usage with clang.
Make use of it.
Makefile.include is currently used to handle the O= variable.
This is incompatible with the LLVM= handling as for O= it has to be
included as early as possible, while for LLVM= it needs to be included
after CFLAGS are
The current entrypoint attributes optimize("Os", "omit-frame-pointer")
are intended to avoid all compiler generated code, like function
porologue and epilogue.
This is the exact usecase implemented by the attribute "naked".
Unfortunately this is not implemented by GCC for all targets,
so only use
When nolibc-test is so broken, it doesn't even start,
don't report success.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/te
If the user specified their own CFLAGS_EXTRA these should not be
overwritten by `-e`.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/run-tests.sh | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc
The logic in clang to find the libgcc.a from a GCC toolchain for a
specific ABI does not work reliably and can lead to errors.
Instead disable libgcc when building with clang, as it's not needed
anyways.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 11 +--
The nolibc-test Makefile includes various other Makefiles from the tree.
At first these are included with relative paths like
"../../../build/Build.include" but as soon as $(srctree) is set up,
the inclusions use that instead to build full paths.
To keep the style of inclusions consistent, perform
The nolibc tests can now be properly built with LLVM.
Expose this through run-tests.sh.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/run-tests.sh | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/no
Clang on higher optimization levels detects that NULL is passed to
printf("%s") and warns about it.
While printf() from nolibc gracefully handles that NULL,
it is undefined behavior as per POSIX, so the warning is reasonable.
Avoid the warning by transforming NULL into a non-NULL placeholder.
Sign
The specific attributes for the _start entrypoint are duplicated for
each architecture.
Deduplicate it into a dedicated #define into compiler.h.
The macros are similar to attribute((naked)), so adopt that naming.
This make the code shorter and will make it easier to adapt for clang
compatibility.
The MIPS calling convention requires the address of the current function
to be available in $t9.
This was not done so far.
For GCC this seems to have worked, but when compiled with clang the
executable segfault instantly.
Properly load the address of _start_c() into $t9 before calling it.
Signed-
The current support for LLVM and clang in nolibc and its testsuite is
very limited.
* Various architectures plain do not compile
* The user *has* to specify "-Os" otherwise the program crashes
* Cross-compilation of the tests does not work
* Using clang is not wired up in run-tests.sh
This series
Recent compilers support __has_attribute() to check if a certain
compiler attribute is supported.
Unfortunately we have to first check if __has_attribute is supported in
the first place and then if a specific attribute is present.
These two checks can't be folded into a single condition as that wou
The clang assembler rejects the current syntax.
Switch to a syntax accepted by both GCC and clang.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-arm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/include/nolibc/arch-arm.h b/tools/include/nolibc/ar
On Wed, Aug 7, 2024 at 2:20 PM Pedro Falcato wrote:
>
> On Wed, Aug 7, 2024 at 7:03 PM Jeff Xu wrote:
> > Do you have any suggestions here ? I can think of two options to choose
> > from:
> >
> > 1> use 0xd000
> > 2> allocate a memory then free it, reuse the ptr.
>
> Personally I'd prefer 2,
From: Jeff Xu
the syscall remap accepts following:
mremap(src, size, size, MREMAP_MAYMOVE | MREMAP_DONTUNMAP, dst)
when the src is sealed, the call will fail with error code:
EPERM
Previously, the test uses hard-coded 0xdeaddead as dst, and it
will fail on the system with newer glibc installed
On Wed, Aug 7, 2024 at 7:03 PM Jeff Xu wrote:
>
> test_seal_mremap_move_dontunmap use 0 as new_addr, 0 indicates
> allocating a new memory.
> test_seal_mremap_move_dontunmap_anyaddr uses any arbitrary address as
> a new address.
No, MREMAP_DONTUNMAP uses the address you pass as a hint, aka you'r
On Wed, Aug 7, 2024 at 11:03 AM Jeff Xu wrote:
>
> On Wed, Aug 7, 2024 at 9:38 AM Pedro Falcato wrote:
> >
> > On Wed, Aug 7, 2024 at 4:35 PM wrote:
> >
> > > /* shrink from 4 pages to 2 pages. */
> > > - ret2 = mremap(ptr, size, 2 * page_size, 0, 0);
> > > + ret2 = sys_mrem
On 8/7/24 14:29, Steven Rostedt wrote:
On Fri, 14 Jun 2024 12:41:51 -0400
Steven Rostedt wrote:
Shuah,
Can you take this through your tree?
Ping!
-- Steve
Sorry for the delay.
Applied it o linux-kselftest next for Linux 6.12-rc1.
thanks,
-- Shuah
On 8/7/24 14:36, Steven Rostedt wrote:
On Fri, 24 May 2024 09:49:55 +0900
"Masami Hiramatsu (Google)" wrote:
From: Masami Hiramatsu (Google)
Add a basic uprobe testcase which checks whether add/remove/trace
operations works on /bin/sh.
Signed-off-by: Masami Hiramatsu (Google)
Reviewed-by
Adjust the mseal test's plan.
Signed-off-by: Pedro Falcato
---
Andrew, please squash this small fix into "selftests/mm: Add mseal test for
no-discard madvise".
Thank you!
tools/testing/selftests/mm/mseal_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing
On Fri, 24 May 2024 09:49:55 +0900
"Masami Hiramatsu (Google)" wrote:
> From: Masami Hiramatsu (Google)
>
> Add a basic uprobe testcase which checks whether add/remove/trace
> operations works on /bin/sh.
>
> Signed-off-by: Masami Hiramatsu (Google)
Reviewed-by: Steven Rostedt (Google)
Shu
On Fri, 14 Jun 2024 12:41:51 -0400
Steven Rostedt wrote:
> Shuah,
>
> Can you take this through your tree?
Ping!
-- Steve
>
> -- Steve
>
>
> On Thu, 23 May 2024 12:45:41 -0400
> Steven Rostedt wrote:
>
> > From: "Steven Rostedt (Google)"
> >
> > A regression happened where running the
Extract a helper accepting an s2_parent input directly so the following
patch can take advantage of it for viommu's cache invalidate callback,
which doesn't have a nested domain but a viommu object linked to an S2
parent domain.
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-s
From: Jason Gunthorpe
Now, ATC invalidation can be done with the VIOMMU invalidation op. A guest
owned IOMMU_DOMAIN_NESTED can do an ATS too. Allow it to pass in the EATS
field via the vSTE words.
Signed-off-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm
Add an arm_smmu_viommu_cache_invalidate() function for user space to issue
cache invalidation commands via viommu.
The viommu invalidation takes the same native format of a 128-bit command,
as the hwpt invalidation. Thus, reuse the same driver data structure, but
make it wider to accept CMDQ_OP_AT
Allow an IOMMU driver to convert a core-managed viommu to a nested parent
domain for the info that the domain holds.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/viommu.c | 8
include/linux/iommufd.h| 8
2 files changed, 16 insertions(+)
diff --git a/drivers/i
Add a viommu_cache test function to cover the new IOMMU_VIOMMU_INVALIDATE
ioctl with similar postive and negative cases to the existing iotlb ones.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd.c | 190 ++
tools/testing/selftests/iommu/iommufd_utils.
Similar to IOMMU_TEST_OP_MD_CHECK_IOTLB verifying a mock_domain's iotlb,
IOMMU_TEST_OP_DEV_CHECK_CACHE will be used to verify a mock_dev's cache.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 5
drivers/iommu/iommufd/selftest.c | 24 ++
Similar to the coverage of cache_invalidate_user for iotlb invalidation,
add a device cache and an invalidation op to test IOMMU_VIOMMU_INVALIDATE
ioctl.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 25 +++
drivers/iommu/iommufd/selftest.c | 63 +
Now, an IOMMU driver can use viommu to invalidate a device cache via the
viommu_cache_invalidate op. Very likely, this would require the driver to
lookup a virtual device ID for a physical device (or just its ID). Since
the core already has a helper, make it public.
Signed-off-by: Nicolin Chen
--
Add a new IOMMU_VIOMMU_INVALIDATE ioctl, similar to IOMMU_HWPT_INVALIDATE.
This is used by the user space to flush any IOMMU specific cache that can
be directed using a viommu object.
Add IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3 as the initial data type whose
support is in the one of the following
Add a default_viommu_ops with a new op for cache invaldiation, similar to
the cache_invalidate_user op in structure iommu_domain_ops, but wider. An
IOMMU driver that allocated a nested domain with a core-managed viommu is
able to use the same viommu pointer for this cache invalidation API.
ARM SMM
A core-managed VIOMMU maintains an xarray to store a list of virtual ids
to mock_devs.
Add test cases to cover the new IOMMU_VIOMMU_SET/UNSET_VDEV_ID ioctls.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd.c | 35 +++-
tools/testing/selftests/iommu/iommuf
Introduce a pair of new ioctls to set/unset a per-viommu virtual device id
that should be linked to a physical device id via a struct device pointer.
Continue the support IOMMU_VIOMMU_TYPE_DEFAULT for a core-managed viommu.
Provide a lookup function for drivers to load device pointer by a virtual
With a viommu object wrapping a potentially shareable S2 domain, a nested
domain should be allocated by associating to a viommu instead. Driver can
store this viommu pointer somewhere, so as to later use it calling viommu
helpers for virtual device ID lookup and viommu invalidation.
For drivers wi
Use IOMMU_VIOMMU_TYPE_DEFAULT to cover the new IOMMU_VIOMMU_ALLOC ioctl.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd.c | 35 +++
tools/testing/selftests/iommu/iommufd_utils.h | 28 +++
2 files changed, 63 insertions(+)
diff --git a/too
Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like
a nested parent HWPT to allocate a nested HWPT.
Support that in the IOMMU_HWPT_ALLOC ioctl handler, and update its kdoc.
Also, associate a viommu to an allocating nested HWPT.
Signed-off-by: Nicolin Chen
---
drivers/iomm
Add a new IOMMUFD_OBJ_VIOMMU with an iommufd_viommu structure to represent
a vIOMMU instance in the user space, backed by a physical IOMMU for its HW
accelerated virtualization feature, such as nested translation support for
a multi-viommu-instance VM, NVIDIA CMDQ-Virtualization extension for ARM
S
This series introduces a new VIOMMU infrastructure and related ioctls.
IOMMUFD has been using the HWPT infrastructure for all cases, including a
nested IO page table support. Yet, there're limitations for an HWPT-based
structure to support some advanced HW-accelerated features, such as CMDQV
on NV
On Wed, 7 Aug 2024 20:25:45 +0100 Pedro Falcato wrote:
> On Wed, Aug 7, 2024 at 7:58 PM Andrew Morton
> wrote:
> >
> > On Wed, 7 Aug 2024 18:33:35 +0100 Pedro Falcato
> > wrote:
> >
> > > is_madv_discard did its check wrong. MADV_ flags are not bitwise,
> > > they're normal sequential number
On Wed, Aug 7, 2024 at 7:58 PM Andrew Morton wrote:
>
> On Wed, 7 Aug 2024 18:33:35 +0100 Pedro Falcato
> wrote:
>
> > is_madv_discard did its check wrong. MADV_ flags are not bitwise,
> > they're normal sequential numbers. So, for instance:
> > behavior & (/* ... */ | MADV_REMOVE)
> >
>
On Wed, Aug 07, 2024 at 01:39:27PM +0100, Mark Brown wrote:
> On Tue, Aug 06, 2024 at 10:08:44PM -0700, Kees Cook wrote:
> > On Tue, Aug 06, 2024 at 04:10:02PM +0100, Mark Brown wrote:
>
> > > > # Running test 'Shadow stack with no token'
>
> > It took me a while to figure out where a thread sw
In a 1-stage translation setup, a device is attached to a paging domain.
In a 2-stage translation setup, a device is attached to a nested domain,
which does not have the mappings for the MSI page but only an s2_parent
paging domain pointer that holds the mappings.
Add arm_smmu_get_msi_mapping_doma
Define an IOMMU_RESV_SW_MSI region (within the mock aperture) as the ARM
SMMU drivers do.
Implement the get_msi_mapping_domain nested domain op to allow dma-iommu
to find the correct paging domain.
Add a new IOMMU_TEST_OP_MD_CHECK_SW_MSI to loopback test the MSI mapping
using public dma-iommu and
From: Robin Murphy
Currently, iommu-dma is the only place outside of IOMMUFD and drivers
which might need to be aware of the stage 2 domain encapsulated within
a nested domain. This would be still the RMR solution where we're using
host-managed MSIs with an identity mapping at stage 1, where it i
Reorder include files to alphabetic order to simplify maintenance, and
separate local headers and global headers with a blank line.
No functional change intended.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/device.c | 4 ++--
drivers/iommu/iommufd/fault.c | 4 ++--
The dma-iommu needs to find the correct domain for MSI mapping. With an
IOMMU_DOMAIN_NESTED, the mapping resides in its parent paging domain.
Add a get_msi_mapping_domain op for drivers to return paging domains.
Add an iommufd selftest coverage for that, by doing a loopback test.
Add arm_smmu_ge
On Wed, 7 Aug 2024 18:33:35 +0100 Pedro Falcato
wrote:
> is_madv_discard did its check wrong. MADV_ flags are not bitwise,
> they're normal sequential numbers. So, for instance:
> behavior & (/* ... */ | MADV_REMOVE)
>
> tagged both MADV_REMOVE and MADV_RANDOM (bit 0 set) as
> discard op
On Wed, Aug 07, 2024 at 01:39:27PM +0100, Mark Brown wrote:
> On Tue, Aug 06, 2024 at 10:08:44PM -0700, Kees Cook wrote:
> > On Tue, Aug 06, 2024 at 04:10:02PM +0100, Mark Brown wrote:
>
> > > > # Running test 'Shadow stack with no token'
>
> > It took me a while to figure out where a thread sw
On Wed, Aug 7, 2024 at 9:38 AM Pedro Falcato wrote:
>
> On Wed, Aug 7, 2024 at 4:35 PM wrote:
>
> > /* shrink from 4 pages to 2 pages. */
> > - ret2 = mremap(ptr, size, 2 * page_size, 0, 0);
> > + ret2 = sys_mremap(ptr, size, 2 * page_size, 0, 0);
> > if (seal) {
> >
Implement on/off testing for all non-fixed features via while loop.
Save the initial state so that it can be restored after on/off checks.
Signed-off-by: Abhinav Jain
---
tools/testing/selftests/net/netdevice.sh | 37 +++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff
Check if the netdev list is empty and create veth pair to be used for
feature on/off testing.
Remove the veth pair after testing is complete.
Signed-off-by: Abhinav Jain
---
tools/testing/selftests/net/netdevice.sh | 18 ++
1 file changed, 18 insertions(+)
diff --git a/tools/tes
This small series includes fixes for creation of veth pairs for
networkless kernels & adds tests for turning the different network
interface features on and off in selftests/net/netdevice.sh script.
Changes in v4:
Move veth creation/removal to the main shell script.
Tested using vng on a networkle
is_madv_discard did its check wrong. MADV_ flags are not bitwise,
they're normal sequential numbers. So, for instance:
behavior & (/* ... */ | MADV_REMOVE)
tagged both MADV_REMOVE and MADV_RANDOM (bit 0 set) as
discard operations. This is obviously incorrect, so use
a switch statement inst
Add an mseal test for madvise() operations that aren't considered
"discard" (e.g purely advisory ops such as MADV_RANDOM).
Signed-off-by: Pedro Falcato
---
tools/testing/selftests/mm/mseal_test.c | 34 +
1 file changed, 34 insertions(+)
diff --git a/tools/testing/selftes
This small series fixes is_madv_discard() and adds a small sanity check
test to selftests/mm/mseal_test. Without this patch, is_madv_discard()
erroneously thinks innocent ops like MADV_RANDOM are discard operations
(which they are not, and are supposed to be allowed, per the overall
design).
Based
On Wed, Aug 7, 2024 at 4:35 PM wrote:
> /* shrink from 4 pages to 2 pages. */
> - ret2 = mremap(ptr, size, 2 * page_size, 0, 0);
> + ret2 = sys_mremap(ptr, size, 2 * page_size, 0, 0);
> if (seal) {
> - FAIL_TEST_IF_FALSE(ret2 == MAP_FAILED);
> +
This patch series adds a selftest suite to validate the s390x
architecture specific ucontrol KVM interface.
When creating a VM on s390x it is possible to create it as userspace
controlled VM or in short ucontrol VM.
These VMs delegates the management of the VM to userspace instead
of handling most
To simplify testing enable UCONTROL KVM by default in debug kernels.
Signed-off-by: Christoph Schlameuss
Reviewed-by: Janosch Frank
---
arch/s390/configs/debug_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/s390/configs/debug_defconfig
b/arch/s390/configs/debug_defconfig
in
Add a uc_kvm fixture to create and destroy a ucontrol VM.
* uc_sie_assertions asserts basic settings in the SIE as setup by the
kernel.
* uc_attr_mem_limit asserts the memory limit is max value and cannot be
set (not supported).
* uc_no_dirty_log asserts dirty log is not supported.
Signed-off
Multiple test cases need page size and shift definitions.
By moving the definitions to a single architecture specific header we
limit the repetition.
Make use of PAGE_SIZE, PAGE_SHIFT and PAGE_MASK defines in existing
code.
Signed-off-by: Christoph Schlameuss
Reviewed-by: Claudio Imbrenda
Revie
Add test case running code interacting with registers within a
ucontrol VM.
* Add uc_gprs test case
The test uses the same VM setup using the fixture and debug macros
introduced in earlier patches in this series.
Signed-off-by: Christoph Schlameuss
Reviewed-by: Janosch Frank
---
.../selftests
Add a test case verifying basic running and interaction of ucontrol VMs.
Fill the segment and page tables for allocated memory and map memory on
first access.
* uc_map_unmap
Store and load data to mapped and unmapped memory and use pic segment
translation handling to map memory on access.
Sig
Add functions to simply print some basic state information in selftests.
The output can be enabled by setting:
#define TH_LOG_ENABLED 1
#define DEBUG 1
* print_psw: current SIE state description and VM run state
* print_hex_bytes: print memory with some counting markers
* print_hex: PRIN
Add test suite to validate the s390x architecture specific ucontrol KVM
interface.
Make use of the selftest test harness.
* uc_cap_hpage testcase verifies that a ucontrol VM cannot be run with
hugepages.
To allow testing of the ucontrol interface the kernel needs a
non-default config containin
Add a test case manipulating s390 storage keys from within the ucontrol
VM.
Signed-off-by: Christoph Schlameuss
---
.../selftests/kvm/s390x/ucontrol_test.c | 78 +++
1 file changed, 78 insertions(+)
diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
b/tools/te
Add a test case verifying KVM_SET_USER_MEMORY_REGION and
KVM_SET_USER_MEMORY_REGION2 cannot be executed on ucontrol VMs.
Executing this test case on not patched kernels will cause a null
pointer dereference in the host kernel.
This is fixed with commit:
commit 7816e58967d0 ("kvm: s390: Reject memo
Subsequent tests do require direct manipulation of the SIE control
block. This commit introduces the SIE control block definition for use
within the selftests.
There are already definitions of this within the kernel.
This differs in two ways.
* This is the first definition of this in userspace.
*
From: Jeff Xu
the syscall remap accepts following:
sys_mremap(ptr, size, size, MREMAP_MAYMOVE | MREMAP_DONTUNMAP,
(void*) 0xdead)
when the src is sealed, the call will fail with when error code:
EPERM
Also remove the dependency on glibc for mremap(), the previous
version of
On Wed, 07 Aug 2024 12:08:15 +0800 Geliang Tang wrote:
> I did get these errors with the latest net-next and iproute2-next. For
> example, I got these errors of "bridge_mdb_port_down.sh":
>
> $ sudo ./bridge_mdb_port_down.sh
> TEST: MDB add/del entry to port with state down [ OK
On Tue, Aug 06, 2024 at 10:08:44PM -0700, Kees Cook wrote:
> On Tue, Aug 06, 2024 at 04:10:02PM +0100, Mark Brown wrote:
> > > # Running test 'Shadow stack with no token'
> It took me a while to figure out where a thread switches shstk (even
> without this series):
> kernel_clone, copy_process
On Tue, 6 Aug 2024 15:39:44 +0200
Janosch Frank wrote:
> On 8/2/24 5:59 PM, Christoph Schlameuss wrote:
> > Add a test case manipulating s390 storage keys from within the ucontrol
> > VM.
> >
> > Signed-off-by: Christoph Schlameuss
> > ---
> > .../selftests/kvm/s390x/ucontrol_test.c | 7
On 5/9/24 11:16 AM, Kees Cook wrote:
> On Wed, May 08, 2024 at 07:54:13PM -0700, John Hubbard wrote:
>> Didn't we learn recently, though, that -static-pie is gcc 8.1+, while the
>> kernel's minimum gcc version is 5?
>
> Yes, that's true. If we encounter anyone trying to build the selftests
> with
On Wed, Aug 07, 2024 at 12:08:15PM +0800, Geliang Tang wrote:
> On Tue, 2024-08-06 at 10:40 +0300, Ido Schimmel wrote:
> > On Tue, Aug 06, 2024 at 12:20:38PM +0800, Geliang Tang wrote:
> > > From: Geliang Tang
> > >
> > > So many "Address not found" messages occur at the end of forwarding
> > > t
91 matches
Mail list logo