Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp374033ybb; Fri, 3 Apr 2020 04:30:01 -0700 (PDT) X-Google-Smtp-Source: APiQypLra1XvdYg6HeH60dQnCnxEh460yoJteV9Yv5dgcK0Io6BRUhWiG9F6felimHeE9a4Z/umB X-Received: by 2002:a9d:1a2:: with SMTP id e31mr6371557ote.30.1585913401484; Fri, 03 Apr 2020 04:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585913401; cv=none; d=google.com; s=arc-20160816; b=zlsMzxB72ezY1CYn/0cpgIzeDWVUhNmx6YlHKvJyBkNrkUyzAIEOQi8Q5OuMkBwntm K0AoSf0n33FKX8uq8a9WXRj2xgSVUuDp3hsZmp1Kd9M0+CIIcz6bA+D7bel5Xx38b4sh QJUR5YK2R8EljyzIIIOu/3Uu/VGNZ7Z9Ne08mhxHX6n78Wkh+xKlynB1ddqDHQreG74d zDBx7XXDy2d3FR/ttqOpbxBkc6k/DXlCyVDuW2sFbPEUKLncx4mmp1Bsirg0dGOSdmTY Iv843cpkJtn8CRmlt2HyI0R+ssg7piUpJWSWBoTFtoomid694R73L9QyWfOSxysqDC+A YRQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :user-agent:mime-version:in-reply-to:references:cc:to:subject:from :date:dkim-signature; bh=8EqiMbUsXYeG9yH6GqFnb0WQImnRkyrpeOIRXy5bX+0=; b=ikNClHcOSxpIeFZDCQXphjvsw18mNeubPfR17QgsNk71jsRk/JhWs0mKDsqwzPN338 3tMpQjqWLF8ZAwR9aMeV3YdmLOJOV6vBsKQCkkMn8Y9LQJgpHYTCsRDFqf6NTMbU7SGX 1f8z/+tUhzB/ABXxkfJngdIYDqsZ7fNHP86zC0kSNQDaL5CIzL3CWLYk+b1xlQRJw03G 3kEYy64Fqn727I+m65bW7wvo15IwJxyp7bjt+oD/hSb9tf52/VG7LAlBGTV22IgbarQL vsI6V6oTgB4ue4qfR2ei/V7Obd430Zr8Gqnt7MKm+txFiReGZyoRoFhhfnTX4zgwIGBn Z1lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="n/ujB5Gb"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f129si3483277oia.243.2020.04.03.04.29.47; Fri, 03 Apr 2020 04:30:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="n/ujB5Gb"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403798AbgDCL0m (ORCPT + 99 others); Fri, 3 Apr 2020 07:26:42 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:34407 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403790AbgDCL0l (ORCPT ); Fri, 3 Apr 2020 07:26:41 -0400 Received: by mail-pf1-f193.google.com with SMTP id v23so446269pfm.1; Fri, 03 Apr 2020 04:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :user-agent:message-id:content-transfer-encoding; bh=8EqiMbUsXYeG9yH6GqFnb0WQImnRkyrpeOIRXy5bX+0=; b=n/ujB5GbtIIpbt3JflYJx+9+oBcaF5c6KIp2t3My3cerGsvea2wlvqx4T4GBWLZn/x 6c4lG13Ay3ceCx/YTEaoXxuHxXNcK3MkLBtPiNn9JAx78bp7rqI0tzqzT6Zc5nVkHC2M QFPDCR6rLgWcaDD4LN9c47ZwPY9mNb59XBqU0e1thgST/aP8zvsIGehqq4yfOWwOX25a WVyQjpuSgxtxnwWmR0sfV3n9aKR89qu3utHcN/lZhR7zD4ttXeh2safDhzIulTBaYrwH kDsfUCYO33j0J2Ldrai+o1EWiBca4nyZ6Jw4E2VczAEwIopatLexrwJnUuqK590fw7Hz /D8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:user-agent:message-id:content-transfer-encoding; bh=8EqiMbUsXYeG9yH6GqFnb0WQImnRkyrpeOIRXy5bX+0=; b=hTYPwhirFzp+3MoRbgMA4E6nQoHZ1DRYZsUvozfLIJanteZIKemYZlqMVv2Rh55heG 3vTKFqLNEaPMHS6rE3Qayd/288NO/FjYaUMs6w6vpcnBKtmKOMIZ2uh0D3vvzaaeY7+b KvAWOyD2ZuCwLAnFj5w3dy4JrPbqf45k9Rm0OiiS8XdhYl5nFQ6oSYAKEyo/tTxDpnPz Gh59HpcO8c/axFoQDVrUzDA/phbO5MDp98PxgFPZfj7Mv/ulMUdvls16NZplx9cZBZPm bdR5ba042BpJ9fwTmOQm9D1a1qo3Y5GOLP9gHz1GISrUkndSavqqb/cqp0kgW6mCe2B1 ELmQ== X-Gm-Message-State: AGi0PuadLjlE7sVIgiFSy7va/uEhyklfOCzOjXTF1g6Z95ponpE9EyLE EKjzGn8hpJpe68UhRSxE4Y4= X-Received: by 2002:a63:5fd8:: with SMTP id t207mr7477349pgb.186.1585913199745; Fri, 03 Apr 2020 04:26:39 -0700 (PDT) Received: from localhost (60-241-117-97.tpgi.com.au. [60.241.117.97]) by smtp.gmail.com with ESMTPSA id l5sm5173615pgt.10.2020.04.03.04.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 04:26:39 -0700 (PDT) Date: Fri, 03 Apr 2020 21:26:27 +1000 From: Nicholas Piggin Subject: Re: [PATCH v11 3/8] powerpc/perf: consolidate read_user_stack_32 To: Michal =?iso-8859-1?q?Such=E1nek?= Cc: Arnaldo Carvalho de Melo , Alexander Shishkin , Allison Randal , Andy Shevchenko , Arnd Bergmann , Thiago Jung Bauermann , Benjamin Herrenschmidt , Sebastian Andrzej Siewior , Claudio Carvalho , Christophe Leroy , "David S. Miller" , "Eric W. Biederman" , Eric Richter , Greg Kroah-Hartman , Gustavo Luiz Duarte , Hari Bathini , Jordan Niethe , Jiri Olsa , Jonathan Cameron , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Mark Rutland , Masahiro Yamada , Mauro Carvalho Chehab , Michael Neuling , Ingo Molnar , Michael Ellerman , Namhyung Kim , Nayna Jain , Paul Mackerras , Peter Zijlstra , Rob Herring , Thomas Gleixner , Valentin Schneider , Alexander Viro References: <20200225173541.1549955-1-npiggin@gmail.com> <184347595442b4ca664613008a09e8cea7188c36.1584620202.git.msuchanek@suse.de> <1585039473.da4762n2s0.astroid@bobo.none> <20200324193833.GH25468@kitsune.suse.cz> <1585896170.ohti800w9v.astroid@bobo.none> <20200403105234.GX25468@kitsune.suse.cz> In-Reply-To: <20200403105234.GX25468@kitsune.suse.cz> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1585913065.zoacp2kzsv.astroid@bobo.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Such=C3=A1nek's on April 3, 2020 8:52 pm: > Hello, >=20 > there are 3 variants of the function >=20 > read_user_stack_64 >=20 > 32bit read_user_stack_32 > 64bit read_user_Stack_32 Right. > On Fri, Apr 03, 2020 at 05:13:25PM +1000, Nicholas Piggin wrote: [...] >> #endif /* CONFIG_PPC64 */ >> =20 >> +static int read_user_stack_32(unsigned int __user *ptr, unsigned int *r= et) >> +{ >> + return __read_user_stack(ptr, ret, sizeof(*ret)); > Does not work for 64bit read_user_stack_32 ^ this should be 4. >=20 > Other than that it should preserve the existing logic just fine. sizeof(int) =3D=3D 4 on 64bit so it should work. Thanks, Nick =