lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4uECl9wQ2sqdKym@minute>
Date: Sat, 18 Jan 2025 11:35:54 +0100
From: Ivan Kokshaysky <ink@...een.parts>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
	"Maciej W. Rozycki" <macro@...am.me.uk>,
	Arnd Bergmann <arnd@...db.de>,
	Richard Henderson <richard.henderson@...aro.org>,
	Matt Turner <mattst88@...il.com>, Kees Cook <kees@...nel.org>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	linux-alpha@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Michael Cree <mcree@...on.net.nz>,
	Sam James <sam@...too.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Michael Karcher <kernel@...rcher.dialup.fu-berlin.de>,
	Chris Hofstaedtler <zeha@...ian.org>, util-linux@...r.kernel.org,
	linux-mips@...r.kernel.org, loongarch@...ts.linux.dev
Subject: Re: [PATCH v2] alpha/elf: Fix misc/setarch test of util-linux by
 removing 32bit support

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ