On Fri, Feb 23, 2024 at 05:59:07AM +, Christophe Leroy wrote:
> Hi Erhard, hi Charlie,
>
> Le 23/02/2024 à 02:26, Erhard Furtner a écrit :
> > Greetings!
> >
> > Looks like my Talos II (running a BE kernel+system) fails some of the
> > kernels internal unit tests. One of the failing tests is
On Fri, Feb 23, 2024 at 06:58:14AM +, Christophe Leroy wrote:
>
>
> Le 23/02/2024 à 07:12, Charlie Jenkins a écrit :
> > On Fri, Feb 23, 2024 at 05:59:07AM +, Christophe Leroy wrote:
> >> Hi Erhard, hi Charlie,
> >>
> >> Le 23/02/2024 à 02:26
On Fri, Feb 23, 2024 at 09:06:56AM +, Christophe Leroy wrote:
>
>
> Le 23/02/2024 à 08:00, Charlie Jenkins a écrit :
> > On Fri, Feb 23, 2024 at 06:58:14AM +, Christophe Leroy wrote:
> >>
> >>
> >> Le 23/02/2024 à 07:12, Charlie Jenkins a écrit
On Fri, Feb 23, 2024 at 10:06:54AM +, Christophe Leroy wrote:
>
>
> Le 22/02/2024 à 03:55, Charlie Jenkins a écrit :
> > The test cases for ip_fast_csum and csum_ipv6_magic were failing on a
> > variety of architectures that are big endian or do not support
> > m
\
> - : "i" (__FILE__), "i" (__LINE__), \
> + : "i" (__FILE__), "i" (__BUG_FUNC), \
> + "i" (__LINE__), \
> "i" (flags), \
> "i" (sizeof(struct bug_entry))); \
> } while (0)
> --
> 2.39.2
>
>
> ___
> linux-riscv mailing list
> linux-ri...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
Reviewed-by: Charlie Jenkins
- Charlie
...@vger.kernel.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: linux-kselft...@vger.kernel.org
Signed-off-by: Charlie Jenkins
---
Charlie Jenkins (16):
mm: Add MAP_BELOW_HINT
riscv: mm: Do not restrict mmap address based on hint
mm
more versatile across all
architectures, define a mmap flag that allows users to define an
arbitrary upper limit on addresses returned by mmap.
Signed-off-by: Charlie Jenkins
---
include/uapi/asm-generic/mman-common.h | 1 +
tools/include/uapi/asm-generic/mman-common.h | 1 +
2 files
The hint address should not forcefully restrict the addresses returned
by mmap as this causes mmap to report ENOMEM when there is memory still
available.
Signed-off-by: Charlie Jenkins
Fixes: b5b4287accd7 ("riscv: mm: Use hint address in mmap if available")
Fixes: add2cc6b6515 (&
The flag and len param is required in arch_get_mmap_base() to implement
MAP_BELOW_HINT.
Signed-off-by: Charlie Jenkins
---
arch/arm64/include/asm/processor.h | 2 +-
arch/powerpc/include/asm/task_size_64.h | 2 +-
arch/riscv/include/asm/processor.h | 2 +-
fs/hugetlbfs/inode.c
Make the generic implementation of arch_get_mmap_base() and
arch_get_mmap_end() support MAP_BELOW_HINT.
Signed-off-by: Charlie Jenkins
---
include/linux/sched/mm.h | 34 --
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/include/linux/sched/mm.h b
When adding support for MAP_BELOW_HINT, the riscv implementation becomes
identical to the default implementation, so arch_get_mmap_base() and
arch_get_mmap_end() can be removed.
Signed-off-by: Charlie Jenkins
---
arch/riscv/include/asm/processor.h | 10 --
1 file changed, 10 deletions
Add support for MAP_BELOW_HINT to arch_get_mmap_base() and
arch_get_mmap_end().
Signed-off-by: Charlie Jenkins
---
arch/arm64/include/asm/processor.h | 34 +-
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/include/asm/processor.h
b
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 deletions(-)
diff --git a/arch/powerpc/include/asm/task_size_64
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to
addr when the flag is enabled.
Signed-off-by: Charlie Jenkins
---
arch/x86/kernel/sys_x86_64.c | 25 ++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/sys_x86_64.c b/arch
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr
when the flag is enabled.
Signed-off-by: Charlie Jenkins
---
arch/loongarch/mm/mmap.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/arch/loongarch/mm/mmap.c b/arch/loongarch/mm/mmap.c
index 889030985135
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr
when the flag is enabled.
Signed-off-by: Charlie Jenkins
---
arch/arm/mm/mmap.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
index d65d0e6ed10a..fa0c79447b78
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr
when the flag is enabled.
Signed-off-by: Charlie Jenkins
---
arch/mips/mm/mmap.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c
index 7e11d7b58761..1595fda284cd
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr
when the flag is enabled.
Signed-off-by: Charlie Jenkins
---
arch/parisc/include/uapi/asm/mman.h | 1 +
arch/parisc/kernel/sys_parisc.c | 9 +
tools/arch/parisc/include/uapi/asm/mman.h | 1 +
3
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr
when the flag is enabled.
Signed-off-by: Charlie Jenkins
---
arch/s390/mm/mmap.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
index 206756946589..29e20351ca85
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr
when the flag is enabled.
Signed-off-by: Charlie Jenkins
---
arch/sh/mm/mmap.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c
index bee329d4149a..867f6598b7d0 100644
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr
when the flag is enabled.
Signed-off-by: Charlie Jenkins
---
arch/sparc/kernel/sys_sparc_64.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
Add a selftest for MAP_BELOW_HINT that maps until it runs out of space
below the hint address.
Signed-off-by: Charlie Jenkins
---
tools/testing/selftests/mm/Makefile | 1 +
tools/testing/selftests/mm/map_below_hint.c | 29 +
2 files changed, 30 insertions
On Wed, Aug 28, 2024 at 08:34:49AM +0200, Christophe Leroy wrote:
> 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
&
On Wed, Aug 28, 2024 at 06:48:33PM +0100, Lorenzo Stoakes wrote:
> On Tue, Aug 27, 2024 at 10:49:22PM GMT, Charlie Jenkins wrote:
> > Add a selftest for MAP_BELOW_HINT that maps until it runs out of space
> > below the hint address.
> >
> > Signed-off-by: Charlie
On Wed, Aug 28, 2024 at 11:29:56AM -0700, Dave Hansen wrote:
> On 8/27/24 22:49, Charlie Jenkins wrote:
> > Some applications rely on placing data in free bits addresses allocated
> > by mmap. Various architectures (eg. x86, arm64, powerpc) restrict the
> > address returned by
On Wed, Aug 28, 2024 at 02:31:42PM -0400, Liam R. Howlett wrote:
> * Charlie Jenkins [240828 01:49]:
> > Some applications rely on placing data in free bits addresses allocated
> > by mmap. Various architectures (eg. x86, arm64, powerpc) restrict the
> > address returned by
On Wed, Aug 28, 2024 at 01:59:18PM -0700, Charlie Jenkins wrote:
> On Wed, Aug 28, 2024 at 02:31:42PM -0400, Liam R. Howlett wrote:
> > * Charlie Jenkins [240828 01:49]:
> > > Some applications rely on placing data in free bits addresses allocated
> > > by mmap. Var
On Wed, Aug 28, 2024 at 07:19:36PM +0100, Lorenzo Stoakes wrote:
> On Tue, Aug 27, 2024 at 10:49:06PM GMT, Charlie Jenkins wrote:
> > Some applications rely on placing data in free bits addresses allocated
> > by mmap. Various architectures (eg. x86, arm64, powerpc) restrict
-off-by: Charlie Jenkins
Changes in v2:
- Added much greater detail to cover letter
- Removed all code that touched architecture specific code and was able
to factor this out into all generic functions, except for flags that
needed to be added to vm_unmapped_area_info
- Made this an RFC since I
address space).
To make this behavior explicit and more versatile across all
architectures, define a mmap flag that allows users to define an
arbitrary upper limit on addresses returned by mmap.
Signed-off-by: Charlie Jenkins
---
include/uapi/asm-generic/mman-common.h | 1 +
tools/include
The hint address and mmap_flags are necessary to determine if
MAP_BELOW_HINT requirements are satisfied.
Signed-off-by: Charlie Jenkins
---
arch/alpha/kernel/osf_sys.c | 2 ++
arch/arc/mm/mmap.c | 3 +++
arch/arm/mm/mmap.c | 7 +++
arch/csky/abiv1/mmap.c
respect the provided high_limit, take the minimum of
hint+length and the given high_limit.
Signed-off-by: Charlie Jenkins
---
mm/mmap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/mmap.c b/mm/mmap.c
index 34ba0db23678..459ad380c673 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1766,6
Add a selftest for MAP_BELOW_HINT that maps until it runs out of space
below the hint address.
Signed-off-by: Charlie Jenkins
---
tools/testing/selftests/mm/Makefile | 1 +
tools/testing/selftests/mm/map_below_hint.c | 32 +
2 files changed, 33 insertions
On Thu, Aug 29, 2024 at 10:30:56AM +0200, Michal Hocko wrote:
> On Thu 29-08-24 00:15:57, Charlie Jenkins wrote:
> > Some applications rely on placing data in free bits addresses allocated
> > by mmap. Various architectures (eg. x86, arm64, powerpc) restrict the
> > address r
On Thu, Aug 29, 2024 at 10:54:25AM +0100, Lorenzo Stoakes wrote:
> On Thu, Aug 29, 2024 at 09:42:22AM GMT, Lorenzo Stoakes wrote:
> > On Thu, Aug 29, 2024 at 12:15:57AM GMT, Charlie Jenkins wrote:
> > > Some applications rely on placing data in free bits addresses allocated
>
On Thu, Aug 29, 2024 at 09:54:08AM -0700, Dave Hansen wrote:
> On 8/28/24 13:15, Charlie Jenkins wrote:
> > A way to restrict mmap() to return LAM compliant addresses in an entire
> > address space also doesn't have to be mutually exclusive with this flag.
> > This fl
On Thu, Aug 29, 2024 at 03:36:43PM -0400, Liam R. Howlett wrote:
> * Dave Hansen [240829 12:54]:
> > On 8/28/24 13:15, Charlie Jenkins wrote:
> > > A way to restrict mmap() to return LAM compliant addresses in an entire
> > > address space also doesn't have to be m
On Thu, Aug 29, 2024 at 09:48:44AM +0100, Lorenzo Stoakes wrote:
> On Thu, Aug 29, 2024 at 12:15:59AM GMT, Charlie Jenkins wrote:
>
> [snip]
>
> > diff --git a/mm/mmap.c b/mm/mmap.c
> > index d0dfc85b209b..34ba0db23678 100644
> > --- a/mm/mmap.c
> > ++
On Thu, Aug 29, 2024 at 06:26:41PM +1000, Michael Ellerman wrote:
> Charlie Jenkins writes:
> > Some applications rely on placing data in free bits addresses allocated
> > by mmap. Various architectures (eg. x86, arm64, powerpc) restrict the
> > address returned by mmap to be
On Fri, Aug 30, 2024 at 10:52:01AM +0100, Lorenzo Stoakes wrote:
> On Thu, Aug 29, 2024 at 03:16:53PM GMT, Charlie Jenkins wrote:
> > On Thu, Aug 29, 2024 at 10:54:25AM +0100, Lorenzo Stoakes wrote:
> > > On Thu, Aug 29, 2024 at 09:42:22AM GMT, Lorenzo Stoakes wrote:
> >
On Thu, Sep 05, 2024 at 09:47:47AM +0300, Kirill A. Shutemov wrote:
> On Thu, Aug 29, 2024 at 12:15:57AM -0700, Charlie Jenkins wrote:
> > Some applications rely on placing data in free bits addresses allocated
> > by mmap. Various architectures (eg. x86, arm64, powerpc) restrict
Cc: linux...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: linux...@kvack.org
Cc: linux-kselft...@vger.kernel.org
Cc: linux-abi-de...@lists.sourceforge.net
Signed-off-by: Charlie Jenkins
Changes in v2:
- Added much greater detail to cover letter
- Removed all code that touched architecture specific code an
with mmap() will bypass this restriction.
Signed-off-by: Charlie Jenkins
---
include/uapi/linux/personality.h | 1 +
mm/mmap.c| 3 +++
2 files changed, 4 insertions(+)
diff --git a/include/uapi/linux/personality.h b/include/uapi/linux/personality.h
index 49796b7756af
Add a selftest for the ADDR_LIMIT_47BIT personality flag that mmaps
until it runs out of space and ensures no addresses are allocated above
47 bits.
Signed-off-by: Charlie Jenkins
---
tools/testing/selftests/mm/.gitignore | 1 +
tools/testing/selftests/mm/Makefile
On Fri, Sep 06, 2024 at 04:59:40PM +1000, Michael Ellerman wrote:
> Charlie Jenkins writes:
> > Create a personality flag ADDR_LIMIT_47BIT to support applications
> > that wish to transition from running in environments that support at
> > most 47-bit VAs to environments th
On Fri, Sep 06, 2024 at 07:17:44AM GMT, Arnd Bergmann wrote:
> > >> On Thu, Sep 5, 2024, at 21:15, Charlie Jenkins wrote:
> > >> > Create a personality flag ADDR_LIMIT_47BIT to support applications
> > >> > that wish to transition from running in environm
On Tue, Sep 10, 2024 at 09:13:33AM +, Arnd Bergmann wrote:
> On Mon, Sep 9, 2024, at 23:22, Charlie Jenkins wrote:
> > On Fri, Sep 06, 2024 at 10:52:34AM +0100, Lorenzo Stoakes wrote:
> >> On Fri, Sep 06, 2024 at 09:14:08AM GMT, Arnd Bergmann wrote:
> >> The intent
On Tue, Sep 10, 2024 at 03:08:14PM -0400, Liam R. Howlett wrote:
> * Catalin Marinas [240906 07:44]:
> > On Fri, Sep 06, 2024 at 09:55:42AM +, Arnd Bergmann wrote:
> > > On Fri, Sep 6, 2024, at 09:14, Guo Ren wrote:
> > > > On Fri, Sep 6, 2024 at 3:18 PM Arnd Bergmann wrote:
> > > >> It's als
On Wed, Sep 11, 2024 at 07:25:08AM +, Arnd Bergmann wrote:
> On Wed, Sep 11, 2024, at 00:45, Charlie Jenkins wrote:
> > On Tue, Sep 10, 2024 at 03:08:14PM -0400, Liam R. Howlett wrote:
> >
> > I responded to Arnd in the other thread, but I am still not convinced
> >
On Wed, Sep 11, 2024 at 07:21:27PM +0100, Catalin Marinas wrote:
> On Tue, Sep 10, 2024 at 05:45:07PM -0700, Charlie Jenkins wrote:
> > On Tue, Sep 10, 2024 at 03:08:14PM -0400, Liam R. Howlett wrote:
> > > * Catalin Marinas [240906 07:44]:
> > > > On Fri, Sep 06,
On Wed, Sep 11, 2024 at 11:38:55PM +1000, Michael Ellerman wrote:
> Geert Uytterhoeven writes:
> > Hi Christophe,
> >
> > On Tue, Sep 10, 2024 at 11:21 AM Christophe Leroy
> > wrote:
> >> >>> diff --git a/include/uapi/linux/personality.h
> >> >>> b/include/uapi/linux/personality.h
> >> >>> index
On Thu, Sep 12, 2024 at 11:53:49AM +0100, Catalin Marinas wrote:
> On Wed, Sep 11, 2024 at 11:18:12PM -0700, Charlie Jenkins wrote:
> > Opting-in to the higher address space is reasonable. However, it is not
> > my preference, because the purpose of this flag is to ensure that
>
On Fri, Sep 13, 2024 at 11:08:23AM +0100, Catalin Marinas wrote:
> On Thu, Sep 12, 2024 at 02:15:59PM -0700, Charlie Jenkins wrote:
> > On Thu, Sep 12, 2024 at 11:53:49AM +0100, Catalin Marinas wrote:
> > > On Wed, Sep 11, 2024 at 11:18:12PM -0700, Charlie Jenkins wrote:
> &
On Fri, Sep 13, 2024 at 08:41:34AM +0100, Lorenzo Stoakes wrote:
> On Wed, Sep 11, 2024 at 11:18:12PM GMT, Charlie Jenkins wrote:
> > On Wed, Sep 11, 2024 at 07:21:27PM +0100, Catalin Marinas wrote:
> > > On Tue, Sep 10, 2024 at 05:45:07PM -0700, Charlie Jenkins wrote:
> >
arguments(struct task_struct *task,
> + struct pt_regs *regs,
> + const unsigned long *args)
> +{
> + memcpy(®s->gpr[3], args, 6 * sizeof(args[0]));
> +
> + /* Also copy the first argument int
uct task_struct *task, struct pt_regs
> *regs, int nr)
> +{
> + /*
> + * Unlike syscall_get_nr(), syscall_set_nr() can be called only when
> + * the target task is stopped for tracing on entering syscall, so
> + * there is no need to have the same check syscall_get
56 matches
Mail list logo