> On Aug 23, 2024, at 13:57, Charlie Jenkins wrote:
>
> On Fri, Aug 23, 2024 at 01:28:18PM +0800, Yangyu Chen wrote:
>>
>>
>>> On Aug 23, 2024, at 12:39, Charlie Jenkins wrote:
>>>
>>> On Thu, Aug 22, 2024 at 10:51:54AM +0800, Yangyu Chen wrote:
> On Aug 22, 2024, at 06:17,
On Fri, Aug 23, 2024 at 01:28:18PM +0800, Yangyu Chen wrote:
>
>
> > On Aug 23, 2024, at 12:39, Charlie Jenkins wrote:
> >
> > On Thu, Aug 22, 2024 at 10:51:54AM +0800, Yangyu Chen wrote:
> >>
> >>
> >>> On Aug 22, 2024, at 06:17, Palmer Dabbelt wrote:
> >>>
> >>> On Mon, 19 Aug 2024 18:58:
The error message descirbing the required modules is inaccurate.
Currently, only "SKIP: Need act_mirred module" is printed when any of
the modules are missing. As a result, users might only include that
module; however, three modules are required.
Fix the error message to show any/all modules nee
> On Aug 23, 2024, at 12:39, Charlie Jenkins wrote:
>
> On Thu, Aug 22, 2024 at 10:51:54AM +0800, Yangyu Chen wrote:
>>
>>
>>> On Aug 22, 2024, at 06:17, Palmer Dabbelt wrote:
>>>
>>> On Mon, 19 Aug 2024 18:58:18 PDT (-0700), rsworkt...@outlook.com wrote:
On 2024-08-20 01:00, Charlie
On Thu, Aug 22, 2024 at 10:51:54AM +0800, Yangyu Chen wrote:
>
>
> > On Aug 22, 2024, at 06:17, Palmer Dabbelt wrote:
> >
> > On Mon, 19 Aug 2024 18:58:18 PDT (-0700), rsworkt...@outlook.com wrote:
> >> On 2024-08-20 01:00, Charlie Jenkins wrote:
> >>> On Mon, Aug 19, 2024 at 01:55:57PM +0800,
Hi Eugene,
kernel test robot noticed the following build warnings:
[auto build test WARNING on shuah-kselftest/next]
[also build test WARNING on shuah-kselftest/fixes tiwai-sound/for-next
tiwai-sound/for-linus bpf-next/master bpf/master linus/master v6.11-rc3
next-20240816]
[If your patch is ap
On Fri, Jul 26, 2024 at 03:14:36PM +0800, David Gow wrote:
> On Thu, 25 Jul 2024 at 04:14, Kees Cook wrote:
> >
> > Based on feedback from Linus[1] and follow-up discussions, change the
> > suggested file naming for KUnit tests.
> >
> > Link:
> > https://lore.kernel.org/lkml/CAHk-=wgim6pNiGTBMhP8
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Wed, 21 Aug 2024 22:49:00 +0530 you wrote:
> 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
On Thu, Aug 22, 2024 at 2:24 AM Tony Ambardar wrote:
>
> From: Tony Ambardar
>
> Fix missing newlines and extraneous terminal spaces in messages.
>
> Signed-off-by: Tony Ambardar
> ---
> tools/lib/bpf/btf.c | 7 ---
> tools/lib/bpf/btf_dump.c | 2 +-
> tools/lib/bpf/btf_relocat
I ran out of time looking through this, I'll try to get back to this
patch set later today or tomorrow. So please don't repost, but see my
comments below.
On Thu, Aug 22, 2024 at 2:25 AM Tony Ambardar wrote:
>
> From: Tony Ambardar
>
> Support for handling BTF data of either endianness was added
On Wed, Aug 21, 2024 at 6:00 PM Michal Wajdeczko
wrote:
>
>
>
> On 21.08.2024 23:22, Rae Moar wrote:
> > On Wed, Aug 21, 2024 at 10:43 AM Michal Wajdeczko
> > wrote:
> >>
> >> Add example how to use KUNIT_FIXED_STUB_REDIRECT and compare its
> >> usage with the KUNIT_STATIC_STUB_REDIRECT. Also sho
Sean Christopherson writes:
> On Mon, Feb 27, 2023, Ackerley Tng wrote:
>> This provides alignment macros for use in selftests.
>>
>> Also clean up tools/include/linux/bitmap.h's inline definition of
>> IS_ALIGNED().
>>
>> Signed-off-by: Ackerley Tng
>> ---
>
> FYI, an almost-equivalent change
On Mon, Feb 27, 2023, Ackerley Tng wrote:
> This provides alignment macros for use in selftests.
>
> Also clean up tools/include/linux/bitmap.h's inline definition of
> IS_ALIGNED().
>
> Signed-off-by: Ackerley Tng
> ---
FYI, an almost-equivalent change went through net/, commit 10a04ff09bcc ("
On some machines with a large number of CPUs there is a sizable delay
between an atomic replace occurring and when sysfs updates accordingly.
This fix uses 'loop_until' to wait for the atomic replace to unload all
previous livepatches.
Signed-off-by: Ryan Sullivan
---
tools/testing/selftests/liv
On Thu, Aug 22, 2024 at 06:19:38PM +0100, Catalin Marinas wrote:
> On Thu, Aug 22, 2024 at 05:44:19PM +0100, Mark Brown wrote:
> > On Thu, Aug 22, 2024 at 05:12:30PM +0100, Catalin Marinas wrote:
> > > On Thu, Aug 22, 2024 at 02:15:22AM +0100, Mark Brown wrote:
> >
> > > > +static bool is_invalid_
On 8/22/24 12:34, Ryan Sullivan wrote:
> Uses 'loop_until' to wait for the atomic replace to unload all previous
> livepatches, as on some machines with a large number of CPUs there is a
> sizable delay between the atomic replace ocurring and when sysfs
> updates accordingly.
>
Small nit: flip th
On Thu, Aug 22, 2024 at 05:44:19PM +0100, Mark Brown wrote:
> On Thu, Aug 22, 2024 at 05:12:30PM +0100, Catalin Marinas wrote:
> > On Thu, Aug 22, 2024 at 02:15:22AM +0100, Mark Brown wrote:
>
> > > +static bool is_invalid_gcs_access(struct vm_area_struct *vma, u64 esr)
>
> > > + } else if (unlik
On Thu, Aug 22, 2024 at 05:12:30PM +0100, Catalin Marinas wrote:
> On Thu, Aug 22, 2024 at 02:15:22AM +0100, Mark Brown wrote:
> > +static bool is_invalid_gcs_access(struct vm_area_struct *vma, u64 esr)
> > + } else if (unlikely(vma->vm_flags & VM_SHADOW_STACK)) {
> > + /* Only GCS op
Uses 'loop_until' to wait for the atomic replace to unload all previous
livepatches, as on some machines with a large number of CPUs there is a
sizable delay between the atomic replace ocurring and when sysfs
updates accordingly.
Signed-off-by: Ryan Sullivan
---
tools/testing/selftests/livepatch
On 8/20/2024 1:24 AM, Aithal, Srikanth wrote:
> On 8/17/2024 12:53 AM, Pratik R. Sampat wrote:
>> From: Michael Roth
>>
>> SEV, SEV-ES, and SNP have a few corner cases where there is potential
>> for KVM_PRE_FAULT_MEMORY to behave differently depending on when it is
>> issued during initial gue
On Thu, Aug 22, 2024 at 04:44:12PM +0100, Catalin Marinas wrote:
> On Thu, Aug 22, 2024 at 02:15:21AM +0100, Mark Brown wrote:
> > +void do_el0_gcs(struct pt_regs *regs, unsigned long esr)
> > +{
> > + force_signal_inject(SIGSEGV, SEGV_CPERR, regs->pc, 0);
> > +}
> Just double checking: a GCSPO
Hi Ilpo,
On 8/22/24 1:11 AM, Ilpo Järvinen wrote:
Building resctrl selftest fails on ARM because it uses __cpuid_count()
that fails the build with error:
CC resctrl_tests
In file included from resctrl.h:24,
from cat_test.c:11:
In function 'arch_supports_noncont_cat',
Hi Ilpo,
On 8/22/24 1:11 AM, Ilpo Järvinen wrote:
To avoid warnings when __cpuid_count() is an empty stub, always
initialize ecx because it is used in the return statement.
Signed-off-by: Ilpo Järvinen
Reviewed-by: Muhammad Usama Anjum
---
Acked-by: Reinette Chatre
Reinette
Hi Ilpo,
On 8/22/24 1:11 AM, Ilpo Järvinen wrote:
arch_supports_noncont_cat() checks if vendor is ARCH_AMD and if that is
not true, ARCH_INTEL is assumed which might not be true either because
get_vendor() can also return zero if neither AMD nor Intel is detected.
Generalize the vendor check us
On Thu, Aug 22, 2024 at 05:17:14PM +0100, Catalin Marinas wrote:
> > /*
> > -* Ensure that GCS changes are observable by/from other PEs in
> > -* case of migration.
> > +* Ensure that GCS memory effects of the 'prev' thread are
> > +* ordered before other memory accesses with r
On Thu, Aug 22, 2024 at 02:15:24AM +0100, Mark Brown wrote:
> @@ -512,10 +538,16 @@ static void gcs_thread_switch(struct task_struct *next)
> gcs_set_el0_mode(next);
>
> /*
> - * Ensure that GCS changes are observable by/from other PEs in
> - * case of migration.
> +
On Thu, Aug 22, 2024 at 02:15:23AM +0100, Mark Brown wrote:
> There are two registers controlling the GCS state of EL0, GCSPR_EL0 which
> is the current GCS pointer and GCSCRE0_EL1 which has enable bits for the
> specific GCS functionality enabled for EL0. Manage these on context switch
> and proce
On Thu, Aug 22, 2024 at 02:15:22AM +0100, Mark Brown wrote:
> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> index 451ba7cbd5ad..3ada31c2ac12 100644
> --- a/arch/arm64/mm/fault.c
> +++ b/arch/arm64/mm/fault.c
> @@ -486,6 +486,14 @@ static void do_bad_area(unsigned long far, unsigned l
On Thu, Aug 22, 2024 at 02:15:21AM +0100, Mark Brown wrote:
> +static void noinstr el0_gcs(struct pt_regs *regs, unsigned long esr)
> +{
> + enter_from_user_mode(regs);
> + local_daif_restore(DAIF_PROCCTX);
> + do_el0_gcs(regs, esr);
> + exit_to_user_mode(regs);
> +}
> +
> static v
Add a regset for POE containing POR_EL0.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Mark Brown
Reviewed-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
---
arch/arm64/kernel/ptrace.c | 46 ++
include/uapi/linux/elf.h |
Check that when POE is enabled, the POR_EL0 register is accessible.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Mark Brown
Cc: Shuah Khan
Reviewed-by: Mark Brown
---
tools/testing/selftests/arm64/abi/hwcap.c | 14 ++
1 file changed, 14 insertions(+)
diff -
Add new system registers:
- POR_EL1
- POR_EL0
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Marc Zyngier
Cc: Oliver Upton
Cc: Shuah Khan
Reviewed-by: Mark Brown
---
tools/testing/selftests/kvm/aarch64/get-reg-list.c | 14 ++
1 file changed, 14 insertions
The encoding of the pkey register differs on arm64, than on x86/ppc. On those
platforms, a bit in the register is used to disable permissions, for arm64, a
bit enabled in the register indicates that the permission is allowed.
This drops two asserts of the form:
assert(read_pkey_reg() <= o
Ensure that we get signal context for POR_EL0 if and only if POE is present
on the system.
Copied from the TPIDR2 test.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Mark Brown
Cc: Shuah Khan
Reviewed-by: Mark Brown
Acked-by: Shuah Khan
---
.../testing/selftests/arm64/
Teach the signal frame parsing about the new POE frame, avoids warning when it
is generated.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Mark Brown
Cc: Shuah Khan
Reviewed-by: Mark Brown
---
tools/testing/selftests/arm64/signal/testcases/testcases.c | 4
1 file ch
This indicates if the system supports POE. This is a CPUCAP_BOOT_CPU_FEATURE
as the boot CPU will enable POE if it has it, so secondary CPUs must also
have this feature.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Acked-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
---
arm64's fpregs are not at a constant offset from sigcontext. Since this is
not an important part of the test, don't print the fpregs pointer on arm64.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Andrew Morton
Cc: Shuah Khan
Cc: Dave Hansen
Cc: Aneesh Kumar K.V
Acked-by
Put this function in the header so that it can be used by other tests, without
needing to link to testcases.c.
This will be used by selftest/mm/protection_keys.c
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Andrew Morton
Cc: Shuah Khan
Cc: Dave Hansen
Cc: Aneesh Kumar K
Allow EL0 or EL1 to access POR_EL0 without being trapped to EL2.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Acked-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
---
arch/arm64/include/asm/el2_setup.h | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff
Now that PKEYs support has been implemented, enable it for CPUs that
support S1POE.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Acked-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
---
arch/arm64/include/asm/pkeys.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Now that support for POE and Protection Keys has been implemented, add a
config to allow users to actually enable it.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Anshuman Khandual
Acked-by: Catalin Marinas
---
arch/arm64/Kconfig | 23 +++
1
Permission Indirection Extension and Permission Overlay Extension can be
enabled independently.
When PIE is disabled and POE is enabled, the permissions set by POR_EL0 will be
applied on top of the permissions set in the PTE.
When both PIE and POE are enabled, the permissions set by POR_EL0 will
VM_PKEY_BIT[012] will use VM_HIGH_ARCH_[012], move the MTE VM flags to
accommodate this.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Acked-by: Catalin Marinas
---
include/linux/mm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git include/linux/mm.h incl
Add PKEY support to signals, by saving and restoring POR_EL0 from the
stackframe.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Mark Brown
Acked-by: Szabolcs Nagy
Reviewed-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
---
arch/arm64/include/uapi/asm/sigco
Implement the PKEYS interface, using the Permission Overlay Extension.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Catalin Marinas
---
arch/arm64/include/asm/mmu.h | 1 +
arch/arm64/include/asm/mmu_context.h | 46 +++-
arch/arm64/include/asm/p
We do not want take POE into account when clearing the MTE tags.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
---
arch/arm64/include/asm/pgtable.h | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
d
When a PTE is modified, the POIndex must be masked off so that it can be
modified.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
---
arch/arm64/include/asm/pgtable.h | 3 ++-
1 file changed, 2 insertions(+), 1 delet
If a memory fault occurs that is due to an overlay/pkey fault, report that to
userspace with a SEGV_PKUERR.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Catalin Marinas
---
arch/arm64/include/asm/traps.h | 1 +
arch/arm64/kernel/traps.c | 6
arch/arm6
Modify arch_calc_vm_prot_bits() and vm_get_page_prot() such that the pkey
value is set in the vm_flags and then into the pgprot value.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
---
arch/arm64/include/asm/mman.h | 10 +-
arch/arm64/mm/mmap.c | 11 +++
The 3-bit POIndex is stored in the PTE at bits 60..62.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Acked-by: Catalin Marinas
---
arch/arm64/include/asm/pgtable-hwdef.h | 10 ++
1 file changed, 10 insertions(+)
diff --git arch/arm64/include/asm/pgtable-hwdef.h
arch/
POR_EL0 is a register that can be modified by userspace directly,
so it must be context switched.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Catalin Marinas
---
arch/arm64/include/asm/cpufeature.h | 6 ++
arch/arm64/include/asm/processor.h | 1 +
arch/ar
Expose a HWCAP and ID_AA64MMFR3_EL1_S1POE to userspace, so they can be used to
check if the CPU supports the feature.
Signed-off-by: Joey Gouly
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
---
Documentation/arch/arm64/elf_hwcaps.rst | 2 ++
Add the missing sanitisation of ID_AA64MMFR3_EL1, making sure we
solely expose S1POE and TCRX (we currently don't support anything
else).
[joey: Took Marc's patch for S1PIE, and changed it for S1POE]
Signed-off-by: Marc Zyngier
Signed-off-by: Joey Gouly
---
arch/arm64/kvm/sys_regs.c | 6 +-
FEAT_ATS1E1A introduces a new instruction: `at s1e1a`.
This is an address translation, without permission checks.
POE allows read permissions to be removed from S1 by the guest. This means
that an `at` instruction could fail, and not get the IPA.
Switch to using `at s1e1a` so that KVM can get th
To allow using newer instructions that current assemblers don't know about,
replace the `at` instruction with the underlying SYS instruction.
Signed-off-by: Joey Gouly
Cc: Marc Zyngier
Cc: Oliver Upton
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Marc Zyngier
---
arch/arm64/include/asm/
Define the new system registers that POE introduces and context switch them.
Signed-off-by: Joey Gouly
Cc: Marc Zyngier
Cc: Oliver Upton
Cc: Catalin Marinas
Cc: Will Deacon
Reviewed-by: Marc Zyngier
---
arch/arm64/include/asm/kvm_host.h | 4
arch/arm64/include/asm/vncr_mappin
The new config option specifies how many bits are in each PKEY.
Signed-off-by: Joey Gouly
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Borislav Petkov
Cc: Dave Hansen
Cc: H. Peter Anvin
Cc: x...@kernel.org
Acked-by: Dave Hansen
---
arch/x86/Kconfig | 4
1 file changed, 4 insertions(+)
dif
Use the new CONFIG_ARCH_PKEY_BITS to simplify setting these bits
for different architectures.
Signed-off-by: Joey Gouly
Cc: Andrew Morton
Cc: linux-fsde...@vger.kernel.org
Cc: linux...@kvack.org
Acked-by: Dave Hansen
Reviewed-by: Anshuman Khandual
---
fs/proc/task_mmu.c | 2 ++
include/linu
The new config option specifies how many bits are in each PKEY.
Signed-off-by: Joey Gouly
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: "Aneesh Kumar K.V"
Cc: "Naveen N. Rao"
Cc: linuxppc-...@lists.ozlabs.org
Acked-by: Michael Ellerman
---
arch/powerpc/Kconfig | 4
Hi all,
This series implements the Permission Overlay Extension introduced in 2022
VMSA enhancements [1]. It is based on v6.11-rc4.
Changes since v4[2]:
- Added Acks and R-bs, thanks!
- KVM:
- Move POR_EL{0,1} handling inside TCR_EL2 blocks
- Add vi
These three implementations of map_pages() all succeed if a mapping is
requested with no read or write. Since they return back to __iommu_map()
leaving the mapped output as 0 it triggers an infinite loop. Therefore
nothing is using no-access protection bits.
Further, VFIO and iommufd rely on iommu
I noticed some bugs here while working on iommupt. Fix them up.
Joerg, can you pick this both for your -rc branch?
Thanks,
Jason
Jason Gunthorpe (2):
iommufd: Do not allow creating areas without READ or WRITE
iommu: Do not return 0 from map_pages if it doesn't do anything
drivers/iommu/io-
This results in passing 0 or just IOMMU_CACHE to iommu_map(). Most of
the page table formats don't like this:
amdv1 - -EINVAL
armv7s - returns 0, doesn't update mapped
arm-lpae - returns 0 doesn't update mapped
dart - returns 0, doesn't update mapped
VT-D - returns -EINVAL
Unfortunately
Use defer scopes to manage qdisc lifetime.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/sch_red_ets.sh | 32 +--
.../drivers/net/mlxsw/sch_red_root.sh | 24 ++
2 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/tools/testing/sel
Tests interrupted part-way through leave behind a running mausezahn. Use
defer to schedule a traffic stop after traffic is started.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/sch_tbf_core.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/t
Tests interrupted part-way through leave behind a running mausezahn. Use
defer to schedule a traffic stop after traffic is started. Mark the
functions that run traffic as defer-scoped, such that the traffic is
stopped right after the function returns.
Signed-off-by: Petr Machata
---
.../drivers/
Instead of having a suite of dedicated cleanup functions, use the defer
framework to schedule cleanups right as their setup functions are run.
This makes a dedicated cleanup() moot, instead fall back to the
lib.sh-provided one, which invokes the necessary defer cleanups as well.
Signed-off-by: Pe
In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule
cleanup with defer()"), a defer helper was added to Python selftests.
The idea is to keep cleanup commands close to their dirtying counterparts,
thereby making it more transparent what is cleaning up what, making it
harder to miss
Recently, a defer helper was added to Python selftests. The idea is to keep
cleanup commands close to their dirtying counterparts, thereby making it
more transparent what is cleaning up what, making it harder to miss a
cleanup, and make the whole cleanup business exception safe. All these
benefits
On Wed, 21 Aug 2024 21:54:42 -0600
Shuah Khan wrote:
> On 8/21/24 13:09, Steven Rostedt wrote:
> > From: Steven Rostedt
> >
> > Masami reported a bug when running function graph tracing then the
> > function profiler. The following commands would cause a kernel crash:
> >
> ># cd /sys/kern
Diagnostic message for failed KUNIT_ASSERT|EXPECT_EQ shows in
case of integers only raw values, like for this example:
bool flag;
KUNIT_EXPECT_EQ(test, -ENODATA, kstrtobool("dunno", &flag));
we will get:
[ ] Expected -61 == kstrtobool("dunno", &flag), but
[ ] kstrtobool("dunno", &fla
Diagnostic message for failed KUNIT_ASSERT|EXPECT_PTR_EQ|NE|NULL
shows only raw pointer value, like for this example:
void *ptr1 = ERR_PTR(-ENOMEM);
void *ptr2 = NULL;
KUNIT_EXPECT_PTR_EQ(test, ptr1, ptr2);
KUNIT_EXPECT_NULL(test, ptr1);
we will get:
[ ] Expected ptr1 == ptr2, but
[
v1: https://patchwork.kernel.org/project/linux-kselftest/list/?series=881867
v2: keep numerical values (David)
Cc: David Gow
Cc: Rae Moar
Michal Wajdeczko (3):
kunit: Improve format of the NOT_ERR_OR_NULL assertion
kunit: Improve format of the PTR_EQ|NE|NULL assertion
kunit: Improve forma
Diagnostic message for failed KUNIT_ASSERT|EXPECT_NOT_ERR_OR_NULL
shows only raw error code, like for this example:
void *myptr = ERR_PTR(-ENOMEM);
KUNIT_EXPECT_NOT_ERR_OR_NULL(test, myptr);
we will get:
[ ] Expected myptr is not error, but is: -12
but we can improve it by using more frie
On 8/22/24 17:30, Yang Ruibin wrote:
To correctly detect whether mmap is successful, must use if
(map_ptr == MAP_FAILED)to avoid incorrectly handling a valid
mapping.Fix mmap() error paths to check for MAP_FAILED.
Shouldn't you have written "avoid processing the return value
from a failed mm
The test is motivated by the following observation:
Raise a signal, jump to signal handler. The ucontext_t structure dumped
by kernel to userspace has a uc_sigmask field having the mask of blocked
signals. If you run a fresh minimalistic program doing this, this field
is empty, even if you block s
Rename sigaltstack to generic signal directory, to allow adding more
signal tests in the future.
Signed-off-by: Dev Jain
Reviewed-by: Mark Brown
---
tools/testing/selftests/Makefile| 2 +-
tools/testing/selftests/{sigaltstack => signal}/.gitignore | 0
tools
This patch series is motivated by the following observation:
Raise a signal, jump to signal handler. The ucontext_t structure dumped
by kernel to userspace has a uc_sigmask field having the mask of blocked
signals. If you run a fresh minimalistic program doing this, this field
is empty, even if yo
On 8/22/24 17:39, Dev Jain wrote:
Rename sigaltstack to signal, and rename the existing test to
sigaltstack.c.
Sorry, hastily copied the commit message from the previous
iteration :) will send again, kindly ignore this.
Signed-off-by: Dev Jain
Reviewed-by: Mark Brown
---
tools/testing
The test is motivated by the following observation:
Raise a signal, jump to signal handler. The ucontext_t structure dumped
by kernel to userspace has a uc_sigmask field having the mask of blocked
signals. If you run a fresh minimalistic program doing this, this field
is empty, even if you block s
Rename sigaltstack to signal, and rename the existing test to
sigaltstack.c.
Signed-off-by: Dev Jain
Reviewed-by: Mark Brown
---
tools/testing/selftests/Makefile| 2 +-
tools/testing/selftests/{sigaltstack => signal}/.gitignore | 0
tools/testing/selftests/{
This patch series is motivated by the following observation:
Raise a signal, jump to signal handler. The ucontext_t structure dumped
by kernel to userspace has a uc_sigmask field having the mask of blocked
signals. If you run a fresh minimalistic program doing this, this field
is empty, even if yo
To correctly detect whether mmap is successful, must use if
(map_ptr == MAP_FAILED)to avoid incorrectly handling a valid
mapping.Fix mmap() error paths to check for MAP_FAILED.
Signed-off-by: Yang Ruibin <11162...@vivo.com>
---
tools/testing/selftests/mm/ksm_tests.c | 2 +-
tools/testing/self
On Thu, Aug 22, 2024 at 02:15:21AM +0100, Mark Brown wrote:
> A new exception code is defined for GCS specific faults other than
> standard load/store faults, for example GCS token validation failures,
> add handling for this. These faults are reported to userspace as
> segfaults with code SEGV_CPE
On Thu, Aug 22, 2024 at 02:15:20AM +0100, Mark Brown wrote:
> Provide a hwcap to enable userspace to detect support for GCS.
>
> Reviewed-by: Thiago Jung Bauermann
> Signed-off-by: Mark Brown
Reviewed-by: Catalin Marinas
On Thu, Aug 22, 2024 at 02:15:19AM +0100, Mark Brown wrote:
> Hook up an override for GCS, allowing it to be disabled from the command
> line by specifying arm64.nogcs in case there are problems.
>
> Reviewed-by: Thiago Jung Bauermann
> Signed-off-by: Mark Brown
Reviewed-by: Catalin Marinas
On 8/22/24 08:33, Shuah Khan wrote:
On 8/21/24 00:15, Dev Jain wrote:
Rename sigaltstack to signal, and rename the existing test to
sigaltstack.c.
Can you elaborate on the benefits if renaming the test?
Also you have such a good information in the cover-letter for this
patch - it would be g
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni :
On Tue, 20 Aug 2024 18:22:27 -0700 you wrote:
> A few tests check if nettest exists in the $PATH before adding
> $PWD to $PATH and re-checking. They don't discard stderr on
> the first check (and nettest is built as part
On Thu, Aug 22, 2024 at 02:15:17AM +0100, Mark Brown wrote:
> diff --git a/arch/arm64/include/asm/mman.h b/arch/arm64/include/asm/mman.h
> index c21849ffdd88..37dfd2882f04 100644
> --- a/arch/arm64/include/asm/mman.h
> +++ b/arch/arm64/include/asm/mman.h
> @@ -61,6 +61,15 @@ static inline bool arch
On Thu, Aug 22, 2024 at 02:15:16AM +0100, Mark Brown wrote:
> Use VM_HIGH_ARCH_5 for guarded control stack pages.
>
> Reviewed-by: Thiago Jung Bauermann
> Signed-off-by: Mark Brown
Reviewed-by: Catalin Marinas
On Wed, Aug 21, 2024 at 10:44:30PM +0100, Dmitry Safonov wrote:
> On Wed, 21 Aug 2024 at 20:11, Simon Horman wrote:
> >
> > On Thu, Aug 15, 2024 at 10:32:29PM +0100, Dmitry Safonov via B4 Relay wrote:
> > > From: Dmitry Safonov <0x7f454...@gmail.com>
> > >
> > > It turns to be that open_netns() is
On Wed, Aug 21, 2024 at 10:35:10PM +0100, Dmitry Safonov wrote:
> Hi Simon,
>
> On Wed, 21 Aug 2024 at 20:10, Simon Horman wrote:
> >
> > On Thu, Aug 15, 2024 at 10:32:27PM +0100, Dmitry Safonov via B4 Relay wrote:
> > > From: Dmitry Safonov <0x7f454...@gmail.com>
> > >
> > > Instead of pre-alloc
On Thu, Aug 22, 2024 at 02:15:09AM +0100, Mark Brown wrote:
> Add some documentation of the userspace ABI for Guarded Control Stacks.
>
> Reviewed-by: Thiago Jung Bauermann
> Signed-off-by: Mark Brown
Reviewed-by: Catalin Marinas
Adds a selftest that creates two virtual interfaces, assigns one to a
new namespace, and assigns IP addresses to both.
It listens on the destination interface using socat and configures a
dynamic target on netconsole, pointing to the destination IP address.
The test then checks if the message was
Hi Sean,
Thank you for reviewing my patches.
On 8/17/2024 1:07 AM, Sean Christopherson wrote:
> On Tue, Jul 09, 2024, Manali Shukla wrote:
>> Malicious guests can cause bus locks to degrade the performance of
>
> I would say "misbehaving", I bet the overwhelming majority of bus locks in
> pract
From: Tony Ambardar
Update Makefile build rules to compile BPF programs with target endianness
rather than host byte-order. With recent changes, this allows building the
full selftests/bpf suite hosted on x86_64 and targeting s390x or mips64eb
for example.
Signed-off-by: Tony Ambardar
---
tool
From: Tony Ambardar
Support for handling BTF data of either endianness was added in [1], but
did not include BTF.ext data for lack of use cases. Later, support for
static linking [2] provided a use case, but this feature and later ones
were restricted to native-endian usage.
Add support for BTF.
From: Tony Ambardar
Track target endianness in 'struct bpf_gen' and process in-memory data in
native byte-order, but on finalization convert the embedded loader BPF
insns to target endianness.
The light skeleton also includes a target-accessed data blob which is
heterogeneous and thus difficult
From: Tony Ambardar
Allow static linking object files of either endianness, checking that input
files have consistent byte-order, and setting output endianness from input.
Linking requires in-memory processing of programs, relocations, sections,
etc. in native endianness, and output conversion t
From: Tony Ambardar
Allow bpf_object__open() to access files of either endianness, and convert
included BPF programs to native byte-order in-memory for introspection.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/libbpf.c | 21 +++--
tools/lib/bpf/libbpf_internal.h |
1 - 100 of 130 matches
Mail list logo