Re: [PATCH v2] alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support
From: Ivan Kokshaysky
Date: Sat Jan 18 2025 - 05:36:59 EST
On Sun, Jan 12, 2025 at 11:39:01PM -0600, Eric W. Biederman wrote:
...
> --- a/arch/alpha/include/asm/pgtable.h
> +++ b/arch/alpha/include/asm/pgtable.h
> @@ -360,7 +360,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
>
> extern void paging_init(void);
>
> -/* We have our own get_unmapped_area to cope with ADDR_LIMIT_32BIT. */
> +/* We have our own get_unmapped_area */
> #define HAVE_ARCH_UNMAPPED_AREA
Just remove the definition. As the comment suggests, the only reason
it exists is ADDR_LIMIT_32BIT, which is gone.
> --- a/arch/alpha/kernel/osf_sys.c
> +++ b/arch/alpha/kernel/osf_sys.c
> @@ -1210,8 +1210,7 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
> return ret;
> }
>
> -/* Get an address range which is currently unmapped. Similar to the
> - generic version except that we know how to honor ADDR_LIMIT_32BIT. */
> +/* Get an address range which is currently unmapped. */
>
> static unsigned long
> arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
> @@ -1230,13 +1229,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
> unsigned long len, unsigned long pgoff,
> unsigned long flags, vm_flags_t vm_flags)
> {
> - unsigned long limit;
> -
> - /* "32 bit" actually means 31 bit, since pointers sign extend. */
> - if (current->personality & ADDR_LIMIT_32BIT)
> - limit = 0x80000000;
> - else
> - limit = TASK_SIZE;
> + unsigned long limit = TASK_SIZE;
>
> if (len > limit)
> return -ENOMEM;
Likewise, just remove these functions. The generic_get_unmapped_area()
works fine, tested on up1500.
Ivan.