Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1864496rwb; Fri, 19 Aug 2022 10:39:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR5S4jqSbTyLI9w7gw8QBH9aq/LbAz/4l0sUBuX5hPRtqsfrnE/SfVJtOpz+3d+qdVaq1+bq X-Received: by 2002:a17:90b:38c8:b0:1fa:c125:bd9b with SMTP id nn8-20020a17090b38c800b001fac125bd9bmr12004303pjb.219.1660930771152; Fri, 19 Aug 2022 10:39:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930771; cv=none; d=google.com; s=arc-20160816; b=OwUaxF4AboIAj9h6jPJZbNI4zJx/FdwptTZFy4yfVdwuUrbVSDg/BOpe+1hU/IEs81 Is6/rQvudXT7VwuMiZ8htCWLo5K+oQGWne5hs426FyNzx8eQjXECKOb7uYbg07tzqfOr BkkIenJ2XPCh1f6m0ZbS8WgKSjRTEbvOoWzMwkLCQuNS/y37cERpxtx+ktwJXmYIZFKf 3u1d5lmVecXCwu8I0k/0iL7QoxSJdjiZPV2Z6P6V7GiB+F795hTz0Lnlwwr68HCgN9FG f3pZxnX8d9WKo1vXyBFH0tCSUudquC5MDjBRj3JLSrVn9MIidJp8bD49RiGOmlx06a1c Od7A== 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=yd/n8ABxcV8ED9zYEVJEbLYUAU1vF720Q8AUKFq3S6wir1Y2HylXKxujKO1sXRILkH 0aI0dyPjlzYaMQgiEAr7Tz3rmMRTfAhEe/KtC6IEg7Ln0yvvJe/5i0W8IjCtVNEOlTKc ffeJ82gOyVE0ebPcOMCCs43J8x4ld5CbhgoPj57/0U2SHAJkYuVV3pFA3ngKlJbtlcY/ 9njrKeEQ368KoogoUAgwQ8CT9T0OkqeTH6k+HWEVrEXtCgdSPvG3i3o+viC+EQpA2DJG 9S4gxxIIpln6x1eFbnPdC83m5sUlWnyRCICOdnh0aCwfrsNj5zHhO8MvlLj22k/XUwVM +Tug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CquJTd0u; 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 lk9-20020a17090b33c900b001f540d802besi5141656pjb.131.2022.08.19.10.39.20; Fri, 19 Aug 2022 10:39:31 -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=CquJTd0u; 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 S1350341AbiHSPuN (ORCPT + 99 others); Fri, 19 Aug 2022 11:50:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350308AbiHSPte (ORCPT ); Fri, 19 Aug 2022 11:49:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94FF510476C; Fri, 19 Aug 2022 08:47:41 -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 3DE3D61639; Fri, 19 Aug 2022 15:47:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43F18C433D6; Fri, 19 Aug 2022 15:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924059; bh=7pMGTLfm7+yf402Et0WC41HMCYeZJIfscGaDIL9XAwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CquJTd0uBeS41JzGA4Imsdx03v58CmpfK5VHxt548WBSRuBlKosY6spujP+TjtHqo I6NbJrFj5dd3hTToo8nNJE+648Ifq137D2csMi/PiDuflfh3p923YIySRnJ4bZoJlr 75vP5U08iwZZx77y51d8LG03pLb4DUcOtGS9OwLo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.10 041/545] parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode Date: Fri, 19 Aug 2022 17:36:51 +0200 Message-Id: <20220819153831.064206223@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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