Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2889794rwb; Mon, 15 Aug 2022 13:23:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR4vWdFMvSFebmG37blQYqvs+TCydPUg3Bw41UzSzL5pi3gZWNgrDZQqV6EXEWdQF9hlnPRA X-Received: by 2002:a17:907:60c7:b0:731:4b42:4e3e with SMTP id hv7-20020a17090760c700b007314b424e3emr11446812ejc.236.1660595026857; Mon, 15 Aug 2022 13:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660595026; cv=none; d=google.com; s=arc-20160816; b=OhgK2VSe+b75AgkEtVPuUXaCWozpASGSMRn4rZwrPsuAv0768F3MFjlahy4K0ihjDB qNvH+jfRFTAM8DV6RtyD28OkL/7Hopac/nNTQmM5c6sHhN9QxrcHSRAJECR//snIeqcb 2s8qSUhHIghFlgzy2K9OwgZuI3ys1IENL+xSMRAF4w8ijllZqrA4fU24tk4lvspGkwEV sVXyFA+xOeHBXU2MiOn/lWlB9Z46yjPBNwz8UCzPFPiZYE4Bui94fzdSxJkM4GqApR8o TmC5CGLmDceDc28OACIEid+WKJwPQYYSUcQRkCJhvj50rPAmnGIBLq3suhrbSuFI36om Xl0Q== 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=f8Ea4vZoRP9BSuev4C4H1eqrR/a6ubfxbMymdI676KfhDkSd+KEPuOG5vYaLWaV8Oc 2YQ9lFrwRiZDUKmgPKCRRAo8yGFo0g2orBhKmKckPKtqCm9gMVSOfww1dgUEbhjoVLtW tgewtZxGF0hWwbnkA6jQSaMyp7jK4C+3B0gufbLUTN0H19ZRWKAnN97Y6u+4X3so90aT pypMF9ZBJGPP1AFjx3ZcBogLtb7tCl2Dpl5iGNAjMLe3HJ7Lz50Xv0loeXgUaZaLcwpS hGYsXZDMZT7Ap2ebvNrKNgM5v3HriJ9KAGMLjMJZFwbtDXBswobwAWMqJLt0TTLJVFdP 20gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YyciSNjT; 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 c7-20020a05640227c700b0043be28d93adsi9381842ede.261.2022.08.15.13.23.16; Mon, 15 Aug 2022 13:23:46 -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=YyciSNjT; 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 S1346350AbiHOUOZ (ORCPT + 99 others); Mon, 15 Aug 2022 16:14:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346214AbiHOULD (ORCPT ); Mon, 15 Aug 2022 16:11:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DF7AAE77; Mon, 15 Aug 2022 11:57:07 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 1B49F6125B; Mon, 15 Aug 2022 18:57:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 223E3C433D6; Mon, 15 Aug 2022 18:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589826; bh=7pMGTLfm7+yf402Et0WC41HMCYeZJIfscGaDIL9XAwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YyciSNjTFsVI903KLmbs2BIgr4Ob/GesIhUJtBubxDfUypYJSwgl8FY+NqKFjugRk E3qhbQM+/ZGyZBlKicbhZm1oGoW1QJsUWuDBa5KnwWL4/QaE/iYwjfz1/KAcf3AbP3 s5sqhBm7gLYEHWwEJu47dLC46VsZnKGYSSBEllyk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.18 0059/1095] parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode Date: Mon, 15 Aug 2022 19:50:58 +0200 Message-Id: <20220815180431.926297776@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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