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: <5396604.TRferrWZgF@wuerfel>
Date:	Wed, 11 Mar 2015 13:47:36 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Alexander Graf <agraf@...e.de>, Will Deacon <will.deacon@....com>,
	Catalin Marinas <Catalin.Marinas@....com>,
	Michael Matz <matz@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Dirk Müller <dmueller@...e.com>,
	Suravee Suthikulanit <suravee.suthikulpanit@....com>,
	Andreas Schwab <schwab@...e.de>
Subject: Re: [PATCH] arm64: Enable CONFIG_COMPAT also for 64k page size

On Wednesday 11 March 2015 06:24:16 Alexander Graf wrote:
> So after recompiling all of the distribution with newer binutils we now
> have an openSUSE Factory tree that has 64k aligned 32bit binaries.
> 
> Unfortunately however, the 32bit glibc has a bogus mmap() implementation
> that hard codes 4k page size.
> 
> With the patch below applied to glibc, I can successfully run 32bit user
> space on Seattle with 64k PAGE_SIZE though. So I guess we'll need to fix
> up glibc next.
> 
> Do you know of anyone who's fluent enough in 32bit ARM assembly to
> convert the hard coded assumptions in there to instead use a variable
> that takes the actual host page size into account?

I believe this is a kernel bug, and the kernel API for 32-bit emulation
should always take the pgoff argument in 4KB units instead of PAGE_SIZE
units, see the implementation of sys_mmap2 in
arch/powerpc/kernel/sys_ppc32.c.

All user space programs that call mmap2 still need to make sure that
their arguments are PAGE_SIZE aligned, but the libc need not care
about this here.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ