From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 689292604B for ; Mon, 24 Jun 2024 14:53:21 +0200 (CEST) Received: (qmail 17719 invoked by uid 550); 24 Jun 2024 12:53:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 17670 invoked from network); 24 Jun 2024 12:53:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1719233588; x=1719319988; bh=xWKRucLiTm pWwmmRX8FZ+pQR2gzXCPeFFp5WbUeFfbU=; b=hj8g+3OooVka8gNBjbWNY0qyAL Z6vhvHJoz9J9I0++1woXG7Ge7EifFpbLdlmvrkBZicJ0Vuzhe4E65yfemaw0dpnz ezbi2d09aLDF7ImuAp7ePDjUCcxqHHTdYBm1BZek/TB0JoKaPQYXQIQoZ6Ju8mOB wJHI0OVjjjp4u23oFnNEB7nzInWRR+TgaFrQTVv59rGbcP+I49knsJba70p5D5dX Q5dWWoC06j/c71Hvbmvv7UXEBlX1BHogMWVK0cFu3TYfKqxJtX6AOJv/ZHj8k8Wz mczS6v5JUo7LbjeTVmLp9rK2m7s3ayQKBQJwHt4h6ceJB75BnOFzmPxvTpcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1719233588; x=1719319988; bh=xWKRucLiTmpWwmmRX8FZ+pQR2gzX CPeFFp5WbUeFfbU=; b=ZCi/NfA7A/RQ9uffYWdnOth3zq0Nr7nYZ6oyyv9JWPOj xm28gfJIalTQ9/Kdb3z5NDEv5ViTQHpwDzh6N2EeBHUDTVkRXgciUBMMS7AkgJUj m/mZbf+ejaW10hmpd2gpqA98HnK/cBDtPVX3x7KTkifmry6qtJLpqiIaPkXjblZ4 K7U1Q9y0NRupMUuTkp76UIKEdKjVDI2+kJz8w5XDLyPvrBl9f3pDL8siN6LnFZYc NHOsGh9Hg19uIehl2i3Z+NCBcSIcICMOlvBqO5de2EYJe0DcK20O5S+BIXOjPhfU Ags7pPfYnlnunrnOo2Ffj4stHt2oG0X14wweQw4qyQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeguddgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-522-ga39cca1d5-fm-20240610.002-ga39cca1d MIME-Version: 1.0 Message-Id: In-Reply-To: <20240620162316.3674955-3-arnd@kernel.org> References: <20240620162316.3674955-1-arnd@kernel.org> <20240620162316.3674955-3-arnd@kernel.org> Date: Mon, 24 Jun 2024 14:52:47 +0200 From: "Arnd Bergmann" To: "Arnd Bergmann" , Linux-Arch , linux-kernel@vger.kernel.org Cc: "Thomas Bogendoerfer" , linux-mips@vger.kernel.org, "Helge Deller" , linux-parisc@vger.kernel.org, "David S . Miller" , "Andreas Larsson" , sparclinux@vger.kernel.org, "Michael Ellerman" , "Nicholas Piggin" , "Christophe Leroy" , "Naveen N. Rao" , linuxppc-dev@lists.ozlabs.org, "Brian Cain" , linux-hexagon@vger.kernel.org, guoren , "linux-csky@vger.kernel.org" , "Heiko Carstens" , linux-s390@vger.kernel.org, "Rich Felker" , "John Paul Adrian Glaubitz" , linux-sh@vger.kernel.org, "H. Peter Anvin" , "Alexander Viro" , "Christian Brauner" , linux-fsdevel@vger.kernel.org, "Xi Ruoyao" , "musl@lists.openwall.com" , "LTP List" , stable@vger.kernel.org Content-Type: text/plain Subject: [musl] Re: [PATCH 02/15] syscalls: fix compat_sys_io_pgetevents_time64 usage On Thu, Jun 20, 2024, at 18:23, Arnd Bergmann wrote: > From: Arnd Bergmann > > Using sys_io_pgetevents() as the entry point for compat mode tasks > works almost correctly, but misses the sign extension for the min_nr > and nr arguments. > > This was addressed on parisc by switching to > compat_sys_io_pgetevents_time64() in commit 6431e92fc827 ("parisc: > io_pgetevents_time64() needs compat syscall in 32-bit compat mode"), > as well as by using more sophisticated system call wrappers on x86 and > s390. However, arm64, mips, powerpc, sparc and riscv still have the > same bug. > > Changes all of them over to use compat_sys_io_pgetevents_time64() > like parisc already does. This was clearly the intention when the > function was originally added, but it got hooked up incorrectly in > the tables. > > Cc: stable@vger.kernel.org > Fixes: 48166e6ea47d ("y2038: add 64-bit time_t syscalls to all 32-bit > architectures") > Signed-off-by: Arnd Bergmann > --- > arch/arm64/include/asm/unistd32.h | 2 +- > arch/mips/kernel/syscalls/syscall_n32.tbl | 2 +- > arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +- > arch/powerpc/kernel/syscalls/syscall.tbl | 2 +- > arch/s390/kernel/syscalls/syscall.tbl | 2 +- > arch/sparc/kernel/syscalls/syscall.tbl | 2 +- > arch/x86/entry/syscalls/syscall_32.tbl | 2 +- > include/uapi/asm-generic/unistd.h | 2 +- > 8 files changed, 8 insertions(+), 8 deletions(-) The build bot reported a randconfig regressions with this patch, which I've now fixed up like this: diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index d7eee421d4bc..b696b85ac63e 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -46,8 +46,8 @@ COND_SYSCALL(io_getevents_time32); COND_SYSCALL(io_getevents); COND_SYSCALL(io_pgetevents_time32); COND_SYSCALL(io_pgetevents); -COND_SYSCALL_COMPAT(io_pgetevents_time32); COND_SYSCALL_COMPAT(io_pgetevents); +COND_SYSCALL_COMPAT(io_pgetevents_time64); COND_SYSCALL(io_uring_setup); COND_SYSCALL(io_uring_enter); COND_SYSCALL(io_uring_register); This was already broken on parisc the same way, but the mistake in sys_ni.c turned into a link failure for every compat architecture after my patch. Arnd