From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 072B7385C424; Sat, 17 Feb 2024 08:27:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 072B7385C424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708158452; bh=TFc5b10RUnhOOfJGU2WfZ2sGapWN9Lbs4eECCwYy4X0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SV4crePPq7qTUZ+F1xS82VngvaUpt29sJ6NitKfcVrkaJEn/Jgl6+WqmbeEHfmmhy 4944QsOdZDPzsbFCLPRZRLOsAJtGrNJGyjiQL3NwfGOtfb3kPHmGwccd4onX207f3e WgU4iZwo7lpxcf5h28x3F1j5jBIUG4PRWpEi9zJU= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/29770] prctl does not match manual page ABI on powerpc64le-linux-gnu Date: Sat, 17 Feb 2024 08:27:27 +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: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: fweimer at redhat dot com X-Bugzilla-Target-Milestone: 2.40 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: target_milestone resolution bug_status 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=3D29770 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.40 Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #5 from Florian Weimer --- Fixed for 2.40 via: commit 6a04404521ac4119ae36827eeb288ea84eee7cf6 Author: Florian Weimer Date: Sat Feb 17 09:17:04 2024 +0100 Linux: Switch back to assembly syscall wrapper for prctl (bug 29770) Commit ff026950e280bc3e9487b41b460fb31bc5b57721 ("Add a C wrapper for prctl [BZ #25896]") replaced the assembler wrapper with a C function. However, on powerpc64le-linux-gnu, the C variadic function implementation requires extra work in the caller to set up the parameter save area. Calling a function that needs a parameter save area without one (because the prototype used indicates the function is not variadic) corrupts the caller's stack. The Linux manual pages project documents prctl as a non-variadic function. This has resulted in various projects over the years using non-variadic prototypes, including the sanitizer libraries in LLVm and GCC (GCC PR 113728). This commit switches back to the assembler implementation on most targets and only keeps the C implementation for x86-64 x32. Also add the __prctl_time64 alias from commit b39ffab860cd743a82c91946619f1b8158b0b65e ("Linux: Add time64 alias for prctl") to sysdeps/unix/sysv/linux/syscalls.list; it was not yet present in commit ff026950e280bc3e9487b41b460fb31bc5b57721. This restores the old ABI on powerpc64le-linux-gnu, thus fixing bug 29770. Reviewed-By: Simon Chopin We can consider backporting. --=20 You are receiving this mail because: You are on the CC list for the bug.=