From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28822 invoked by alias); 19 Jan 2015 17:55:21 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28736 invoked by uid 48); 19 Jan 2015 17:55:14 -0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/64435] [5 Regression] Bootstrap failure in libsanitizer on AArch64 with Linux kernel <= 3.15 Date: Mon, 19 Jan 2015 17:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: major X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01870.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64435 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu.org --- Comment #15 from Andrew Pinski --- (In reply to Jakub Jelinek from comment #14) > https://github.com/torvalds/linux/blob/master/arch/arm64/include/asm/memory.h > https://github.com/torvalds/linux/blob/master/arch/arm64/Kconfig > reveals that aarch64 can be on Linux configured to support 39, 42 or 48 bits > virtual address space. The current libsanitizer/asan/ and > gcc/config/aarch64/aarch64.c (aarch64_asan_shadow_offset) seems to be okay > only for the 39 bits virtual address space, while Fedora/RHEL apparently use > 42 bits VA. Wonder if aarch64 couldn't use a layout closer to what x86_64 > uses for asan, with shadow offset low 0x7fff8000, which is flexible to > different sizes of the virtual address space. Right selecting 64k pages causes this. Asan is known to be broken with the different virtual address space due page size differences. PowerPC has a similar issue IIRC. x86_64 does not have this issue as there is only one page size and not different virtual address spaces there. I think ASAN for AARCH64 needs testing on multiple virtual address sizes before it can be turned on by default. Note most distros uses 64k pages (Fedora for an example) but some don't MontaVista CG7 for X-gene does not due to needing to allow ARMv7 programs to run.