; failure test in the basic set.
>
> Fixes: 7b61212f2a07 ("gpiolib: Get rid of ARCH_NR_GPIOS")
> Reported-by: Pengfei Xu
> Reported-by: Yi Lai
> Closes: https://lore.kernel.org/linux-gpio/zc6ohbjdwbdt4...@xpf.sh.intel.com/
> Signed-off-by: Kent Gibson
Acked-by: Chris
Le 05/08/2024 à 10:30, Madhavan Srinivasan a écrit :
Currently exec-target.c file is linked as static and this
post a requirement to install libc dev package to build.
Without it, build-breaks when compiling selftest/powerpc/benchmark.
CC exec_target
/usr/bin/ld: cannot find -lc: No
Le 09/08/2024 à 06:25, Madhavan Srinivasan a écrit :
On 8/6/24 12:24 PM, Christophe Leroy wrote:
Le 05/08/2024 à 10:30, Madhavan Srinivasan a écrit :
Currently exec-target.c file is linked as static and this
post a requirement to install libc dev package to build.
Without it, build
. But this has no impact and can be clarified later and fixed in a
follow-up patch.
Changes in v2:
- Define VM_DROPPABLE for powerpc/32
- Fixes generic vDSO getrandom headers to enable CONFIG_COMPAT build.
- Fixed size of generation counter
- Fixed selftests to work on non x86 architectures
Chris
vDSO"): Move __get_unaligned_t and __put_unaligned_t
into a new unaligned.h living in the vdso/ include directory.
Signed-off-by: Christophe Leroy
---
include/asm-generic/unaligned.h | 11 +--
include/vdso/unaligned.h| 15 +++
2 files changed, 16 inserti
clarations as declarations are already in asm/vvar.h
Signed-off-by: Christophe Leroy
---
v2: Move x86 DEFINE_VVAR(_vdso_data) and DEFINE_VVAR(_vdso_rng_data) in vma.c
---
arch/x86/entry/vdso/vma.c| 3 +++
arch/x86/include/asm/vdso/vsyscall.h | 10 +++---
drivers/cha
, redefine them from CONFIG_PAGE_SHIFT
in the same way as commit cffaefd15a8f ("vdso: Use CONFIG_PAGE_SHIFT
in vdso/datapage.h")
Signed-off-by: Christophe Leroy
---
arch/x86/include/asm/pvclock.h | 1 +
include/vdso/helpers.h | 1 +
lib/vdso/getrandom.c | 15
Same as for gettimeofday CVDSO implementation, add c-getrandom-y
to ease the inclusion of lib/vdso/getrandom.c in architectures
VDSO builds.
Signed-off-by: Christophe Leroy
---
lib/vdso/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/vdso/Makefile b/lib/vdso/Makefile
index
ation which is already an unsigned long.
Signed-off-by: Christophe Leroy
---
include/vdso/datapage.h | 2 +-
include/vdso/getrandom.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index b85f24cac3f5..00b66a9b5778 100644
With the current implementation, __cvdso_getrandom_data() calls
memset(), which is unexpected in the VDSO.
Rewrite opaque data initialisation to avoid memset().
Signed-off-by: Christophe Leroy
---
lib/vdso/getrandom.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff
_ARCH_1 is used for VM_SAO on powerpc and VM_SAO is only for
powerpc/64.
Signed-off-by: Christophe Leroy
---
fs/proc/task_mmu.c | 4 +++-
include/linux/mm.h | 4 +++-
include/trace/events/mmflags.h | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git
To support getrandom in VDSO which is based on little endian storage,
add macros equivalent to LWZX_BE and STWX_BE for little endian
accesses.
Put them outside of __powerpc64__ #ifdef so that they can also be used
for PPC32.
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/asm
ve/restore functions when optimising the kernel for size.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/vdso/Makefile | 5 -
arch/powerpc/kernel/vdso/gettimeofday.S | 13 -
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/kernel/vdso/Makefi
In order to avoid duplication when we add new VDSO functionnalities
in C like getrandom, refactor common CFLAGS.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/vdso/Makefile | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/kernel/vdso
.088533630 seconds
syscall: 250 times in 12.952458068 seconds
Signed-off-by: Christophe Leroy
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/mman.h | 2 +-
arch/powerpc/include/asm/vdso/getrandom.h| 67 +
arch/powerpc/includ
__powerpc__ is also defined on powerpc64 so __powerpc64__ needs to be
checked first.
Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
Signed-off-by: Christophe Leroy
---
tools/testing/selftests/vDSO/vdso_config.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
di
/vdso
arch/loongarch/vdso
Don't hard-code vdso sources location in selftest Makefile,
instead create a vdso/ symbolic link in tools/arch/$arch/ and
update Makefile accordingly.
Signed-off-by: Christophe Leroy
---
tools/arch/x86/vdso | 1 +
tools/testing/selftests
rings.
Signed-off-by: Christophe Leroy
---
tools/testing/selftests/vDSO/vdso_config.h | 8 +++-
tools/testing/selftests/vDSO/vdso_test_getrandom.c | 8 ++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/vDSO/vdso_config.h
b/tools/te
so it goes
prior to glibc's include directory.
Replace -isystem by -idirafter
But this implies that now tools/include/linux/linkage.h is
included instead of include/linux/linkage.h, so define a stub
for SYM_FUNC_START() and SYM_FUNC_END().
Signed-off-by: Christophe Leroy
---
tools/include/linux/l
number of arguments and the arguments.
Signed-off-by: Christophe Leroy
---
tools/testing/selftests/vDSO/vdso_call.h | 12
tools/testing/selftests/vDSO/vdso_test_getrandom.c | 3 ++-
2 files changed, 14 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests
Add the necessary symbolic link and tell Makefile to build
vdso_test_random for powerpc.
In makefile, don't use $(uname_M) which is wrong when cross-building
for powerpc on an x86_64.
Implement the required VDSO_CALL macro to correctly handle errors.
Signed-off-by: Christophe Leroy
---
Le 26/08/2024 à 09:20, Jason A. Donenfeld a écrit :
On Thu, Aug 22, 2024 at 09:13:09AM +0200, Christophe Leroy wrote:
include/asm-generic/unaligned.h | 11 +--
include/vdso/unaligned.h| 15 +++
2 files changed, 16 insertions(+), 10 deletions(-)
create mode
Le 26/08/2024 à 09:50, Jason A. Donenfeld a écrit :
On Thu, Aug 22, 2024 at 09:13:14AM +0200, Christophe Leroy wrote:
Performing SMP atomic operations on u64 fails on powerpc32.
Random driver generation is handled as unsigned long not u64,
see for instance base_cnrg or struct crng.
Use the
Le 26/08/2024 à 10:07, Jason A. Donenfeld a écrit :
On Thu, Aug 22, 2024 at 09:13:10AM +0200, Christophe Leroy wrote:
+#define _PAGE_SIZE (1UL << CONFIG_PAGE_SHIFT)
+#define _PAGE_MASK (~(_PAGE_SIZE - 1))
If PAGE_SIZE isn't defined at this point, why not just call it PAGE_S
Le 26/08/2024 à 10:58, Jason A. Donenfeld a écrit :
On Mon, Aug 26, 2024 at 10:37:49AM +0200, Christophe Leroy wrote:
Le 26/08/2024 à 10:07, Jason A. Donenfeld a écrit :
On Thu, Aug 22, 2024 at 09:13:10AM +0200, Christophe Leroy wrote:
+#define _PAGE_SIZE (1UL << CONFIG_PAGE
Le 27/08/2024 à 16:41, Xi Ruoyao a écrit :
On Tue, 2024-08-27 at 16:15 +0200, Jason A. Donenfeld wrote:
/* snip */
gcc -std=gnu99 -D_GNU_SOURCE= -isystem
/home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../tools/include
-isystem
/home/zx2c4/Projects/random-linux/tools/test
Le 27/08/2024 à 17:00, Jason A. Donenfeld a écrit :
On Tue, Aug 27, 2024 at 04:50:59PM +0200, Christophe Leroy wrote:
Le 27/08/2024 à 16:41, Xi Ruoyao a écrit :
On Tue, 2024-08-27 at 16:15 +0200, Jason A. Donenfeld wrote:
/* snip */
gcc -std=gnu99 -D_GNU_SOURCE= -isystem
/home/zx2c4
Hi Charlie,
Le 28/08/2024 à 07:49, Charlie Jenkins a écrit :
Add support for MAP_BELOW_HINT to arch_get_mmap_base() and
arch_get_mmap_end().
Signed-off-by: Charlie Jenkins
---
arch/powerpc/include/asm/task_size_64.h | 36 +++--
1 file changed, 30 insertions(+), 6
Le 28/08/2024 à 16:49, Jason A. Donenfeld a écrit :
Hi Christophe,
On Wed, Aug 28, 2024 at 4:38 PM LEROY Christophe
wrote:
- key[0], key[1], key[2], key[3], key[4], key[5], key[6], key[7]
+ le32toh(key[0]), le32toh(key[1]), le32toh(key[2]),
le32toh(key[3]),
+
Le 28/08/2024 à 19:25, Segher Boessenkool a écrit :
Not sure about static binaries, though: do those even use the VDSO?
With "static binary" people usually mean "a binary not using any DSOs",
I think the VDSO is a DSO, also in this respect? As always, -static
builds are *way* less problem
Le 29/08/2024 à 20:02, Segher Boessenkool a écrit :
On Thu, Aug 29, 2024 at 07:36:38PM +0200, Christophe Leroy wrote:
Le 28/08/2024 à 19:25, Segher Boessenkool a écrit :
Not sure about static binaries, though: do those even use the VDSO?
With "static binary" people usual
powerpc, vDSO is neither called linux-vdso.so.1 nor linux-gate.so.1
but linux-vdso32.so.1 or linux-vdso64.so.1.
Also search those two names before giving up.
Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite")
Signed-off-by: Christophe Leroy
---
tools/testing/self
__powerpc64__ needs to be checked first in vdso_config.h
Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
Signed-off-by: Christophe Leroy
---
tools/testing/selftests/vDSO/vdso_config.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/self
57868 NOTYPE GLOBAL DEFAULT8 __kernel_time
54: 04d084 NOTYPE GLOBAL DEFAULT8 __kernel_clock_g[...]
55: 05bc52 NOTYPE GLOBAL DEFAULT8 __kernel_get_sys[...]
Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser&quo
a selftest for vDSO getcpu()")
Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
Fixes: b2f1c3db2887 ("kselftest: Extend vdso correctness test to
clock_gettime64")
Fixes: 4920a2590e91 ("selftests/vDSO: add tests for vgetrandom")
Signed-off-by: Ch
Don't duplicate parse_vdso function prototypes, include
the header instead.
Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
Signed-off-by: Christophe Leroy
---
tools/testing/selftests/vDSO/vdso_test_abi.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
dif
v2:
- Define VM_DROPPABLE for powerpc/32
- Fixes generic vDSO getrandom headers to enable CONFIG_COMPAT build.
- Fixed size of generation counter
- Fixed selftests to work on non x86 architectures
Christophe Leroy (5):
mm: Define VM_DROPPABLE for powerpc/32
powerpc/vdso32: Add crtsavres
_ARCH_1 is used for VM_SAO on powerpc and VM_SAO is only for
powerpc/64.
Signed-off-by: Christophe Leroy
---
v3: Fixed build failure reported by robots.
---
fs/proc/task_mmu.c | 4 +++-
include/linux/mm.h | 4 +++-
include/trace/events/mmflags.h | 4 ++--
3 files
ve/restore functions when optimising the kernel for size.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/vdso/Makefile | 5 -
arch/powerpc/kernel/vdso/gettimeofday.S | 13 -
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/kernel/vdso/Makefi
In order to avoid two much duplication when we add new VDSO
functionnalities in C like getrandom, refactor common CFLAGS.
Signed-off-by: Christophe Leroy
---
v3: Also refactor removed flags
---
arch/powerpc/kernel/vdso/Makefile | 32 +--
1 file changed, 13 insertions
vdso: 2500 times in 16.899318858 seconds
libc: 2500 times in 131.050596522 seconds
syscall: 2500 times in 129.794790389 seconds
Signed-off-by: Christophe Leroy
---
v3:
- Preserve r13, implies saving r5 on stack
- Split PPC64 implementation out.
---
arch/power
-off-by: Christophe Leroy
---
v3: New (split out of previous patch)
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/include/asm/mman.h | 2 +-
arch/powerpc/kernel/vdso/Makefile| 10 +-
arch/powerpc/kernel/vdso/getrandom.S | 8 ++
arch/powerpc
Le 30/08/2024 à 18:14, Jason A. Donenfeld a écrit :
On Fri, Aug 30, 2024 at 05:57:08PM +0200, Christophe Leroy wrote:
+ * r5: 8-byte counter input/output (saved on stack)
+ *
+ * r14-r15: counter
+ */
+SYM_FUNC_START(__arch_chacha20_blocks_nostack)
+ stwur1, -96(r1
Le 30/08/2024 à 18:42, Christophe Leroy a écrit :
Le 30/08/2024 à 18:14, Jason A. Donenfeld a écrit :
On Fri, Aug 30, 2024 at 05:57:08PM +0200, Christophe Leroy wrote:
+ * r5: 8-byte counter input/output (saved on stack)
+ *
+ * r14-r15: counter
+ */
+SYM_FUNC_START
Le 30/08/2024 à 18:17, Jason A. Donenfeld a écrit :
On Fri, Aug 30, 2024 at 05:57:08PM +0200, Christophe Leroy wrote:
@@ -14,6 +14,10 @@ ifeq ($(uname_M),x86_64)
TEST_GEN_PROGS += vdso_test_getrandom
TEST_GEN_PROGS += vdso_test_chacha
endif
+ifeq ($(ARCH),powerpc)
+TEST_GEN_PROGS
vDSO function is not found, just like vdso_test_getcpu or
vdso_test_gettimeofday.
Signed-off-by: Christophe Leroy
---
Based on latest random tree (0dfed8092247)
tools/arch/x86/vdso | 1 -
tools/testing/selftests/vDSO/Makefile | 10 --
tools
TAP version 13
1..1
ok 1 chacha: PASS
real0m 32.09s
user0m 31.86s
sys 0m 0.22s
Signed-off-by: Christophe Leroy
---
tools/testing/selftests/vDSO/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing
;nonce' which is not unused anymore after the
replacement of libsodium by open coded chacha implementation.
Signed-off-by: Christophe Leroy
---
.../testing/selftests/vDSO/vdso_test_chacha.c | 39 ++-
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/too
(CONFIG_X86_32) will evaluate to x86. On arm64 machines, it will
evaluate to arm64. On 32-bit x86 machines, it will evaluate to x86y,
which won't match the filter list.
Reported-by: Mark Brown
Reported-by: Christophe Leroy
Signed-off-by: Jason A. Donenfeld
---
tools/testing/selftests/vDSO/
Le 01/09/2024 à 20:02, Jason A. Donenfeld a écrit :
On Sun, Sep 01, 2024 at 08:00:30PM +0200, Christophe Leroy wrote:
Hi Jason,
Le 01/09/2024 à 15:22, Jason A. Donenfeld a écrit :
Hi Christophe,
Hmm, I'm not so sure I like this very much. I think it's important for
these tes
Fixed selftests to work on non x86 architectures
Christophe Leroy (5):
mm: Define VM_DROPPABLE for powerpc/32
powerpc/vdso32: Add crtsavres
powerpc/vdso: Refactor CFLAGS for CVDSO build
powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32
powerpc/vdso: Wire up getrandom()
_ARCH_1 is used for VM_SAO on powerpc and VM_SAO is only for
powerpc/64. It is used in combination with PROT_SAO in some parts of
code that are restricted to CONFIG_PPC64 through #ifdefs, it is
therefore possible to define VM_SAO for CONFIG_PPC64 only.
Signed-off-by: Christophe Leroy
---
v4:
ve/restore functions when optimising the kernel for size.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/vdso/Makefile | 5 -
arch/powerpc/kernel/vdso/gettimeofday.S | 13 -
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/kernel/vdso/Makefi
In order to avoid two much duplication when we add new VDSO
functionnalities in C like getrandom, refactor common CFLAGS.
Signed-off-by: Christophe Leroy
---
v3: Also refactor removed flags
---
arch/powerpc/kernel/vdso/Makefile | 32 +--
1 file changed, 13 insertions
n PPC64 so that
vdso_test_getrandom returns KSFT_SKIP instead of KSFT_FAIL.
Signed-off-by: Christophe Leroy
---
v4:
- Counter has native byte order
- Fix selftest build on ppc64le until implemented.
- On ppc64, for now implement __kernel_getrandom to return ENOSYS error
- Use stwbrx directly,
-off-by: Christophe Leroy
---
v4:
- Use __BIG_ENDIAN__ which is defined by GCC instead of CONFIG_CPU_BIG_ENDIAN
which is unknown by selftests
- Implement a cleaner/smaller output copy for little endian instead of keeping
compat macro.
v3: New (split out of previous patch)
---
arch/powerpc/Kconfig
Hi Jason,
Le 01/09/2024 à 15:22, Jason A. Donenfeld a écrit :
Hi Christophe,
Hmm, I'm not so sure I like this very much. I think it's important for
these tests to fail when an arch tries to hook up the function to the
vDSO, but it's still not exported for some reason. This also regresses
the AR
Le 02/09/2024 à 14:34, Jason A. Donenfeld a écrit :
On Mon, Sep 02, 2024 at 02:04:41PM +0200, Christophe Leroy wrote:
This first patch adds support for PPC32. As selftests cannot easily
be generated only for PPC32, and because the following patch brings
support for PPC64 anyway, this patch
Le 02/09/2024 à 14:41, Jason A. Donenfeld a écrit :
On Mon, Sep 02, 2024 at 02:04:42PM +0200, Christophe Leroy wrote:
SYM_FUNC_START(__arch_chacha20_blocks_nostack)
#ifdef __powerpc64__
- blr
+ std r5, -216(r1)
+
+ std r14, -144(r1)
+ std r15, -136(r1
Le 02/09/2024 à 14:37, Mark Brown a écrit :
On Mon, Sep 02, 2024 at 02:22:38PM +0200, Christophe Leroy wrote:
When vdso_test_getcpu doesn't find the vDSO entry point, it prints an error
text and returns KSFT_SKIP
I thought it would be more correct to have the same behavio
Le 02/09/2024 à 16:00, Jason A. Donenfeld a écrit :
On Mon, Sep 02, 2024 at 03:12:47PM +0200, Christophe Leroy wrote:
Le 02/09/2024 à 14:41, Jason A. Donenfeld a écrit :
On Mon, Sep 02, 2024 at 02:04:42PM +0200, Christophe Leroy wrote:
SYM_FUNC_START(__arch_chacha20_blocks_nostack
Le 02/09/2024 à 15:57, Jason A. Donenfeld a écrit :
On Mon, Sep 02, 2024 at 03:23:47PM +0200, Christophe Leroy wrote:
Le 02/09/2024 à 14:37, Mark Brown a écrit :
On Mon, Sep 02, 2024 at 02:22:38PM +0200, Christophe Leroy wrote:
When vdso_test_getcpu doesn't find the vDSO entry poin
Le 02/09/2024 à 16:18, Christophe Leroy a écrit :
Le 02/09/2024 à 15:57, Jason A. Donenfeld a écrit :
On Mon, Sep 02, 2024 at 03:23:47PM +0200, Christophe Leroy wrote:
Le 02/09/2024 à 14:37, Mark Brown a écrit :
On Mon, Sep 02, 2024 at 02:22:38PM +0200, Christophe Leroy wrote:
When
Hi Jason, hi Michael,
Le 02/09/2024 à 16:19, Jason A. Donenfeld a écrit :
On Mon, Sep 02, 2024 at 04:16:48PM +0200, Christophe Leroy wrote:
Can do that, but there will still be a problem with chacha selftests if
I don't opt-out the entire function content when it is ppc64. It will
PPC32, second for PPC64
- Moved selftest fixes out of this series
Changes in v2:
- Define VM_DROPPABLE for powerpc/32
- Fixes generic vDSO getrandom headers to enable CONFIG_COMPAT build.
- Fixed size of generation counter
- Fixed selftests to work on non x86 architectures
Christophe Leroy (5):
mm: D
_ARCH_1 is used for VM_SAO on powerpc and VM_SAO is only for
powerpc/64. It is used in combination with PROT_SAO in some parts of
code that are restricted to CONFIG_PPC64 through #ifdefs, it is
therefore possible to define VM_SAO for CONFIG_PPC64 only.
Signed-off-by: Christophe Leroy
---
v4:
ve/restore functions when optimising the kernel for size.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/vdso/Makefile | 5 -
arch/powerpc/kernel/vdso/gettimeofday.S | 13 -
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/kernel/vdso/Makefi
In order to avoid two much duplication when we add new VDSO
functionnalities in C like getrandom, refactor common CFLAGS.
Signed-off-by: Christophe Leroy
---
v3: Also refactor removed flags
---
arch/powerpc/kernel/vdso/Makefile | 32 +--
1 file changed, 13 insertions
gs
support for VDSO64 anyway, this patch opts out all code in
__arch_chacha20_blocks_nostack() so that vdso_test_chacha will not
fail to compile and will not crash on PPC64/PPC64LE, allthough the
selftest itself will fail.
Signed-off-by: Christophe Leroy
---
v5:
- Add back vdso symlink that vani
-by: Christophe Leroy
---
v5:
- VDSO32 for both PPC32 and PPC64 is in previous patch. This patch have the
logic for VDSO64.
v4:
- Use __BIG_ENDIAN__ which is defined by GCC instead of CONFIG_CPU_BIG_ENDIAN
which is unknown by selftests
- Implement a cleaner/smaller output copy for little endian
Le 20/09/2024 à 03:54, Yu Liao a écrit :
[Vous ne recevez pas souvent de courriers de liaoy...@huawei.com. Découvrez
pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
On 2024/9/20 0:51, Shuah Khan wrote:
diff --git a/tools/testing/selftests/vDSO/vdso_test_getran
71 matches
Mail list logo