Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2809533rwb; Mon, 15 Aug 2022 11:47:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR7vR56DhQNOsuoNLDBoxZLUjyUlUZjMaPP5oNGwOwZHO/RhmZ78UD8rNRGQGMUw5FI4AvZp X-Received: by 2002:a17:906:d554:b0:731:7e0f:2b48 with SMTP id cr20-20020a170906d55400b007317e0f2b48mr10927931ejc.314.1660589239928; Mon, 15 Aug 2022 11:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589239; cv=none; d=google.com; s=arc-20160816; b=A6pr+uTahFGIzUz/VFVsjqeA/VEadJyu5JHGkfJdUTzlBF8Vhi1+IjuQzToOm4FdxQ BUVHnZI8exc4LuZj9Z67pxHF36t1bsLY2nxeMdYMH/HMLPq9pJrqDYKSwhsspk5sFL4K XudBsIFLHd6zNcsz0AisdAXkhXYwphzEJbVjlsskICKkZXp4jr02tH0spx9FqqCCCQpt pH7MIt4Oc9/uPRtb9OJTMiHxT/anauUMpXGw43ZNBy7JqEFeiJTiqUbOZFIVOj3Ezepb uy5Q4dxTyKuidQUepQ2q6nTT3+ylqdY8IGL7vTbz0qFqyG2NzbQcNtprQEx2VIAN4hxQ kMew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OzN90S1YHHxm6xsr/S5ZeymXX6iTYMCnuTXXtVAr9F4=; b=De1loXn6ZBfmyL7vNz7jwQB0duPjIbKrYDgwrKDyQd/6igq3mU6Bb/rXSng10INOQB mblUOkD0ecFqrwWs1ywDXaATQvZrLfhrmNwhb8CJGv6Pa6xRH88SzVW3yB00goKOjLAm y54UvQJMhY2u/FwnheXpwY4YtpHyJOphY1CadfYR8eo+uxEP1bHScg9IQ0dWRClK4/uY 55iLY97qAoCZdYDyrUHd/PPI6Htkc/D335UCBp2ZeEBLWv7dwx0ZPggoz1Hom8Sv5bDK Bdr5mAsnFMACIQfQAPFphQT0ZfpjFLnNNB7P2PFj/54DDM5eFv/udasewEeoGK4Hq8ub CtTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nwWhYpjH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a170906115000b00730a134ccfasi6886764eja.572.2022.08.15.11.46.53; Mon, 15 Aug 2022 11:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nwWhYpjH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241444AbiHOSYQ (ORCPT + 99 others); Mon, 15 Aug 2022 14:24:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240177AbiHOSXn (ORCPT ); Mon, 15 Aug 2022 14:23:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D4A02E9F4; Mon, 15 Aug 2022 11:17:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6EACBB81072; Mon, 15 Aug 2022 18:17:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A84E2C433D6; Mon, 15 Aug 2022 18:17:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587466; bh=7pMGTLfm7+yf402Et0WC41HMCYeZJIfscGaDIL9XAwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nwWhYpjHB3LDlJoPW1OYwI5XnRHRy0PUymWYKjw8pgTDETVLpgH0jeY8HdthP+9U5 77l4F9nrj3c/3w0xEmeudY3ktGOtN+gbEqC4MvJc6pHRo+Y5vwggmDmVrMNrxl3K3v J+DtTquH6xw5MMW9IutKJN+tf1jJuKswx5BYVQeM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.15 052/779] parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode Date: Mon, 15 Aug 2022 19:54:56 +0200 Message-Id: <20220815180339.493755603@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Helge Deller commit 6431e92fc827bdd2d28f79150d90415ba9ce0d21 upstream. For all syscalls in 32-bit compat mode on 64-bit kernels the upper 32-bits of the 64-bit registers are zeroed out, so a negative 32-bit signed value will show up as positive 64-bit signed value. This behaviour breaks the io_pgetevents_time64() syscall which expects signed 64-bit values for the "min_nr" and "nr" parameters. Fix this by switching to the compat_sys_io_pgetevents_time64() syscall, which uses "compat_long_t" types for those parameters. Cc: # v5.1+ Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- arch/parisc/kernel/syscalls/syscall.tbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/parisc/kernel/syscalls/syscall.tbl +++ b/arch/parisc/kernel/syscalls/syscall.tbl @@ -413,7 +413,7 @@ 412 32 utimensat_time64 sys_utimensat sys_utimensat 413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 -416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents +416 32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64 417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend 419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive