Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp428667ybb; Fri, 3 Apr 2020 05:33:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKLhemgOYrIRzeeKSt2r0XQ3ImMA9jV06YAkzdxYJgvaVJ/N4oeGuzHCMGOpWY5DUnyZzju X-Received: by 2002:a9d:6c89:: with SMTP id c9mr6000217otr.337.1585917197476; Fri, 03 Apr 2020 05:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585917197; cv=none; d=google.com; s=arc-20160816; b=vD8vddcRXeQHJI99WdXLamhylFtuI3+vdZ/z9wM3Bd1UimYlI1E8LIgeEEsTb9YaCw 31oeynYAkLSGjVGx2ltBFyiUdEZUJP0VfLFzg5lUGFCOTnPD/oJuyEaaMVZ6ly5iRznr way8i5qrJpMh8SeZ86w+qvgFLCOdxp/LpKfWVFgbiScvnPAKE6pTkE0lAc8dd+bQ8oob NkGs3VXhPEjWs+Zn7NZtYSQqL709KuvKiFDoHy9xhHR5bOM0uu2CRn1DGKWGNk6yyqFF TEAJ3tZYrEDUktfQLblYemPhy9mYf+LFbAKhpeU+JTdDAYCP2EPzRBcHKe3J0t/78HdP Iy4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=5f1+T/GNPNrXNquZYKH37XbKBFWvJqraEumhgEg6oR8=; b=goQp18dp9XQiGuMUw5j9orD/ZhMxvApIfrWB81MWaGBClyvGvH/yeisRkRAcpAqQJd Wfr9MwiTAUtl6L6bCemwya28xeF/Ul9zesQbzff7faLoZtcCv5BtAyzXdwelZ5vBZtrH 2EL8REoDmDHZZ3ecWybDnjHanLqlWwVQfVSPKFXTTdCBjxJz4QvJ9kH5QCZCahLNbTu/ erIInOmnNT7MjL+SzllLGHAyCpDSRDomDICTr1llaeSRoDJG5AEux/jhKEvsFoiNg00f 7bUV6E9aPS6HVdC+zhJOzofuAUkyqikzNxHOsQZ7YtNPExQ/rqFID8Xe7cLtAuw6ltDl tyaQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l22si3751273otd.53.2020.04.03.05.33.05; Fri, 03 Apr 2020 05:33:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403785AbgDCLve (ORCPT + 99 others); Fri, 3 Apr 2020 07:51:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:37400 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726087AbgDCLve (ORCPT ); Fri, 3 Apr 2020 07:51:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D2341AC50; Fri, 3 Apr 2020 11:51:29 +0000 (UTC) Date: Fri, 3 Apr 2020 13:51:27 +0200 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Nicholas Piggin 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 Subject: Re: [PATCH v11 3/8] powerpc/perf: consolidate read_user_stack_32 Message-ID: <20200403115127.GY25468@kitsune.suse.cz> 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> <1585913065.zoacp2kzsv.astroid@bobo.none> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1585913065.zoacp2kzsv.astroid@bobo.none> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 03, 2020 at 09:26:27PM +1000, Nicholas Piggin wrote: > Michal Such?nek's on April 3, 2020 8:52 pm: > > Hello, > > > > there are 3 variants of the function > > > > read_user_stack_64 > > > > 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 */ > >> > >> +static int read_user_stack_32(unsigned int __user *ptr, unsigned int *ret) > >> +{ > >> + return __read_user_stack(ptr, ret, sizeof(*ret)); > > Does not work for 64bit read_user_stack_32 ^ this should be 4. > > > > Other than that it should preserve the existing logic just fine. > > sizeof(int) == 4 on 64bit so it should work. > Right, the type is different for the 32bit and 64bit version. Thanks Michal