From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E20143858C35; Tue, 19 Mar 2024 11:56:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E20143858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710849372; bh=+KUBAAy9ISNSnikrUxbDHUn7yDkmL2jEpS4VRqx4uyw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fb+NE7ziLF2XFkoNuHvooWfzSWG77shxmAsSvlT/tq7z8bQ1qiXFGfx3ENCuCnlVg YoJF0KlUmIhPo91h8+fYru++IltG4JVHdoFn5MhxAhKnoAP9/8Pf25GJAVRWvNRjE9 sQ92NaYDNk3MzoyRGfl1mp7b1hzlwjFtDu1es0Vo= From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/31492] ARM ldp instruction trigger bus error when kernel open option CONFIG_IO_STRICT_DEVMEM Date: Tue, 19 Mar 2024 11:56:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31492 Adhemerval Zanella changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adhemerval.zanella at lina= ro dot o | |rg --- Comment #4 from Adhemerval Zanella --- This is most likely unaligned access to a device region (due to the CONFIG_IO_STRICT_DEVMEM), which is not supported by the ISA [1]. Although t= he input is aligned, aarch64 memcpy assumes unaligned access;the size of '724' will trigger the 'copy_long' branch, which copies a multiple of 128 bytes, = with the remaining 84 bytes that it is not aligned to 8 bytes (thus potentially triggering an unaligned load of the 'copy64_from_end' code path. We had a similar issue on POWER, which prevented us from adding an unaligned memcpy optimization as default because memcpy was used in some video driver= s on non-cacheable memory and unaligned VSX operations triggered some bad performance issues (it is essentially emulated by the kernel). We had to ga= te this optimization through a tunable instead [2]. You can raise this to ARM maintainers, but I think it is unlikely that they will change the default implementation to avoid unaligned access since this= is really a performance improvement for all cases. [1] https://developer.arm.com/documentation/102376/0200/Alignment-and-endiannes= s/Alignment [2] https://sourceware.org/pipermail/libc-alpha/2017-December/089357.html --=20 You are receiving this mail because: You are on the CC list for the bug.=