riscv: selftests: Remove mmap hint address checksThe mmap behavior that restricts the addresses returned by mmap causedunexpected behavior, so get rid of the test cases that check thatbehavior.
riscv: selftests: Remove mmap hint address checksThe mmap behavior that restricts the addresses returned by mmap causedunexpected behavior, so get rid of the test cases that check thatbehavior.Signed-off-by: Charlie Jenkins <[email protected]>Fixes: 73d05262a2ca ("selftests: riscv: Generalize mm selftests")Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Palmer Dabbelt <[email protected]>
show more ...
selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mkCentralize the _GNU_SOURCE definition to CFLAGS in lib.mk. Removeredundant defines from Makefiles that import lib.mk. Convert any usage of
selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mkCentralize the _GNU_SOURCE definition to CFLAGS in lib.mk. Removeredundant defines from Makefiles that import lib.mk. Convert any usage of"#define _GNU_SOURCE 1" to "#define _GNU_SOURCE".This uses the form "-D_GNU_SOURCE=", which is equivalent to"#define _GNU_SOURCE".Otherwise using "-D_GNU_SOURCE" is equivalent to "-D_GNU_SOURCE=1" and"#define _GNU_SOURCE 1", which is less commonly seen in source code andwould require many changes in selftests to avoid redefinition warnings.Link: https://lkml.kernel.org/r/[email protected]Signed-off-by: Edward Liaw <[email protected]>Suggested-by: John Hubbard <[email protected]>Acked-by: Shuah Khan <[email protected]>Reviewed-by: Muhammad Usama Anjum <[email protected]>Cc: Albert Ou <[email protected]>Cc: André Almeida <[email protected]>Cc: Darren Hart <[email protected]>Cc: Dave Hansen <[email protected]>Cc: Davidlohr Bueso <[email protected]>Cc: David S. Miller <[email protected]>Cc: Eric Dumazet <[email protected]>Cc: Eric W. Biederman <[email protected]>Cc: Fenghua Yu <[email protected]>Cc: Ingo Molnar <[email protected]>Cc: Jakub Kicinski <[email protected]>Cc: Jarkko Sakkinen <[email protected]>Cc: Jason Gunthorpe <[email protected]>Cc: Kees Cook <[email protected]>Cc: Kevin Tian <[email protected]>Cc: Palmer Dabbelt <[email protected]>Cc: Paolo Abeni <[email protected]>Cc: Paolo Bonzini <[email protected]>Cc: Paul Walmsley <[email protected]>Cc: Peter Zijlstra <[email protected]>Cc: Reinette Chatre <[email protected]>Cc: Sean Christopherson <[email protected]>Cc: Thomas Gleixner <[email protected]>Signed-off-by: Andrew Morton <[email protected]>
selftests: riscv: Generalize mm selftestsThe behavior of mmap on riscv is defined to not provide an address thatuses more bits than the hint address, if provided. Make the testsreflect that.Sig
selftests: riscv: Generalize mm selftestsThe behavior of mmap on riscv is defined to not provide an address thatuses more bits than the hint address, if provided. Make the testsreflect that.Signed-off-by: Charlie Jenkins <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Palmer Dabbelt <[email protected]>
tools: selftests: riscv: Fix compile warnings in mm testsWhen building the mm tests with a riscv32 compiler, we see a rangeof shift-count-overflow errors from shifting 1UL by more than 32 bitsin
tools: selftests: riscv: Fix compile warnings in mm testsWhen building the mm tests with a riscv32 compiler, we see a rangeof shift-count-overflow errors from shifting 1UL by more than 32 bitsin do_mmaps(). Since, the relevant code is only called from code thatis gated by `__riscv_xlen == 64`, we can just apply the same gatingto do_mmaps().Signed-off-by: Christoph Müllner <[email protected]>Reviewed-by: Alexandre Ghiti <[email protected]>Reviewed-by: Andrew Jones <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Palmer Dabbelt <[email protected]>
riscv: kselftests: Fix mm build by removing testcases subdirectorykselftests fails to build because the mm/testcases subdirectory is notcreated and then the compiler fails to output the binary the
riscv: kselftests: Fix mm build by removing testcases subdirectorykselftests fails to build because the mm/testcases subdirectory is notcreated and then the compiler fails to output the binary there.So fix this by simply removing this subdirectory which is not veryuseful.Signed-off-by: Alexandre Ghiti <[email protected]>Reviewed-by: Charlie Jenkins <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Palmer Dabbelt <[email protected]>
RISC-V: mm: Add tests for RISC-V mmAdd tests that enforce mmap hint address behavior. mmap should defaultto sv48. mmap will provide an address at the highest address space thatcan fit into the hi
RISC-V: mm: Add tests for RISC-V mmAdd tests that enforce mmap hint address behavior. mmap should defaultto sv48. mmap will provide an address at the highest address space thatcan fit into the hint address, unless the hint address is less than sv39and not 0, then it will return a sv39 address.These tests are split into two files: mmap_default.c and mmap_bottomup.cbecause a new process must be exec'd in order to change the mmap layout.The run_mmap.sh script sets the stack to be unlimited for themmap_bottomup.c test which triggers a bottomup layout.Signed-off-by: Charlie Jenkins <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Palmer Dabbelt <[email protected]>