Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3022926rwb; Mon, 15 Aug 2022 16:20:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Y8eLFP43e3Rl9j/7BqWQFiRHsOVJSU0uOrv1f4/ixaREOEr9rNJhAS0mnLmF9+QhqXF0U X-Received: by 2002:a05:6a00:a8f:b0:530:3c05:4644 with SMTP id b15-20020a056a000a8f00b005303c054644mr18419536pfl.79.1660605614969; Mon, 15 Aug 2022 16:20:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605614; cv=none; d=google.com; s=arc-20160816; b=yjgk13+Y0sKHFY28lYWR8NP49n9mwT2lVxrMOKAjbtok1Bk6yu2e3A0M+LD1vxXrW6 GsAV0W34EHpW0fulUnoJ+HruwEEtKjUSTRhsr2TNwRa/DG5aWt6jzNixowFDyBLWKwsa lDAMtACgbl+QcBF2bw2whczjV8ZxViF5mx6EmZYJSiYK5fW4kY+84EdQJsj3LFOl3V4/ 9Nh2yW+7Fdsf9DHILpmg8h4YiZ5EkHr4JgrQfFzF2OC6+cY8FZybCO8oqY7FaZEGFX2f eU2jCMdkDOtwy1fxuX0KlDTwi65OQnNLFQpkDKJNDoFzvY/I/LlBaScYmDIHtuReete0 nHIg== 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=HjLkrC79OBgOrnzYR0QfG//+eGndT+7P4CrX+eKYaWwM8j5mua/l1F755TbOWyS17+ OZqhhEaXkD685aD92+rmbDr8P9tgzRorkuusOTDDE62j2SvFVkngxdnOMjgmqU7LVaHt I3InHWtjVaQ9PkRfpjwm9S21pfnzEJnhkMODvqizH+RdvYS1qW7pZLmbkOUvWlxqpQMZ a7Uy8FE8B/Hd0c6wEkHyMT1xC6rWaq4bGuKLkXEvYmxD/AwOs6dfYhZ0O9/3bclAqKid 0Q2r61P61hFB27Q054NY+A6X8DCD6KcOCoQx8AjxvYxjGNRAqtcorbnuWS6ZvZu+XmcD HQcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pLYEiN1b; 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 m16-20020a170902db1000b0016d2d5c251dsi13173859plx.329.2022.08.15.16.20.04; Mon, 15 Aug 2022 16:20:14 -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=pLYEiN1b; 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 S242813AbiHOWEO (ORCPT + 99 others); Mon, 15 Aug 2022 18:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349854AbiHOWBo (ORCPT ); Mon, 15 Aug 2022 18:01:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2848A11231A; Mon, 15 Aug 2022 12:36:02 -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 74506610A3; Mon, 15 Aug 2022 19:35:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BDE2C433D6; Mon, 15 Aug 2022 19:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592149; bh=7pMGTLfm7+yf402Et0WC41HMCYeZJIfscGaDIL9XAwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pLYEiN1blvSX/UtvFEhXrGI7WY+7ieHWi6kl613C3vNtzsm1oYKJCE5GciAH9E9PG 0W7yZx6Z88rr9n1FyX7OFQWny+bP40vlBA7ZnD2GhGktz3KjQIK9nzgdJGVhFboVxz HbULCuASlfK12FAeKlqX47lOqv22ekTEd5+MuvKU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.19 0066/1157] parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode Date: Mon, 15 Aug 2022 19:50:22 +0200 Message-Id: <20220815180442.147588821@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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