Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp235625imm; Fri, 21 Sep 2018 13:25:37 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda4pQ+jOiFtVDJAkcXsyHBjNa0HkHbHFOJ4GX1p/sOWxdWedODDFJlCXgoy2tf1GkcmIIIr X-Received: by 2002:a63:4702:: with SMTP id u2-v6mr41741787pga.95.1537561536960; Fri, 21 Sep 2018 13:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537561536; cv=none; d=google.com; s=arc-20160816; b=PdpNwmozEOeLc/TWqigoJyUoEsVClw9w8Tm1L0ZYj5gRcOgMCVbEkaNXYQWt5w6/Fc ENf4O2GZfc4K7oYySxRp33ppxsTiw7CJ0lZypyW8Rl25KbO7GtW0869n0+eKJ1W1YGUS qS4Zd1O9pqNdfZqf758lxOz2PHoKon6rHpGFD4aUrIixTTwLDNJ5Oj+rY1Gc84UxjOsn zA83W8Kcwa6N+QBDtvm+1YKuVx7vw7OC1KhxdN2olaU7ha3SmbBijOinSs1iNtuOUGwv P0wnEsG0+UDU7kLoMrZsyMLD6aJIRK561ZC6H3/2VnxglZ+aaIr4L50j0DGAKhRFq71X sVHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=turcFLNwLGDebeys6gL7wXN0JEU0q8H83U9J8lClBDU=; b=0xYNQ590UVYC2c3N4vS+fw8JFttdUZnLrz10wdLwY1aOhcAuMpR0xSrvUulTASvA+R cXW+F6TTSPzP7L4VrcfZ6KYTHjmUKREYz6P7oj2qbWZrlbzyqsV2Neo5dO7WFc0L10qE nQG2K78DnajpAVcoNWgslEQBQCPIv+k+uVB6oyBypPpnoTW4jZGjZDc3emm2Oo1xWld+ 84uqbdwIoT7X68sqcmfBulswVI6YvJSlxWx+kKLuz9j5eNZCsL3mYDZJMSL8aYCcVpfl 2zN1s3gbfgYVJiLG7etiFjz+tEfcL3or210w/3uFWdFmj7xoveYtbqImbNcSp6YDkw40 bL6w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25-v6si6021908pgl.146.2018.09.21.13.25.21; Fri, 21 Sep 2018 13:25:36 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391457AbeIVCOy (ORCPT + 99 others); Fri, 21 Sep 2018 22:14:54 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41740 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390726AbeIVCOx (ORCPT ); Fri, 21 Sep 2018 22:14:53 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8LKOEnN012990 for ; Fri, 21 Sep 2018 16:24:23 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mn5eydbha-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 21 Sep 2018 16:24:23 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Sep 2018 14:24:22 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 21 Sep 2018 14:24:20 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8LKOJdd6160536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 21 Sep 2018 13:24:19 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 24570BE054; Fri, 21 Sep 2018 14:24:19 -0600 (MDT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7CF1CBE059; Fri, 21 Sep 2018 14:24:18 -0600 (MDT) Received: from localhost (unknown [9.80.102.110]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTPS; Fri, 21 Sep 2018 14:24:18 -0600 (MDT) Date: Fri, 21 Sep 2018 17:24:15 -0300 From: Murilo Opsfelder Araujo To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v3 1/3] powerpc/process: fix casting and missing header References: <113d4a559f6eec448b253bf5f0b4f2a8ffb187af.1536327756.git.christophe.leroy@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <113d4a559f6eec448b253bf5f0b4f2a8ffb187af.1536327756.git.christophe.leroy@c-s.fr> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 x-cbid: 18092120-0012-0000-0000-000016B93741 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009747; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01091682; UDB=6.00564082; IPR=6.00871705; MB=3.00023441; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-21 20:24:22 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18092120-0013-0000-0000-0000547CB6E1 Message-Id: <20180921202415.GA19940@kermit-br-ibm-com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-21_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809210197 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 07, 2018 at 01:47:29PM +0000, Christophe Leroy wrote: > This patch fixes the following warnings. The first ones are leftovers > from when __get_user() was replaced by probe_kernel_address(). > > The last one is from when show_user_instructions() was added. > > arch/powerpc/kernel/process.c:1287:22: warning: incorrect type in argument 2 (different address spaces) > arch/powerpc/kernel/process.c:1287:22: expected void const *src > arch/powerpc/kernel/process.c:1287:22: got unsigned int [noderef] * > arch/powerpc/kernel/process.c:1319:21: warning: incorrect type in argument 2 (different address spaces) > arch/powerpc/kernel/process.c:1319:21: expected void const *src > arch/powerpc/kernel/process.c:1319:21: got unsigned int [noderef] * > arch/powerpc/kernel/process.c:1302:6: warning: symbol 'show_user_instructions' was not declared. Should it be static? > > Fixes: 7b051f665c32d ("powerpc: Use probe_kernel_address in show_instructions") > Fixes: 88b0fe1757359 ("powerpc: Add show_user_instructions()") > Signed-off-by: Christophe Leroy Smoke test passed. Thank you. Reviewed-by: Murilo Opsfelder Araujo > --- > v3: new in v3 to fix sparse warnings reported by snowpatch on the serie > > arch/powerpc/kernel/process.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c > index 913c5725cdb2..e108e1ef2b85 100644 > --- a/arch/powerpc/kernel/process.c > +++ b/arch/powerpc/kernel/process.c > @@ -65,6 +65,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -1284,7 +1285,7 @@ static void show_instructions(struct pt_regs *regs) > #endif > > if (!__kernel_text_address(pc) || > - probe_kernel_address((unsigned int __user *)pc, instr)) { > + probe_kernel_address((const void *)pc, instr)) { > pr_cont("XXXXXXXX "); > } else { > if (regs->nip == pc) > @@ -1316,7 +1317,7 @@ void show_user_instructions(struct pt_regs *regs) > pr_info("%s[%d]: code: ", current->comm, current->pid); > } > > - if (probe_kernel_address((unsigned int __user *)pc, instr)) { > + if (probe_kernel_address((const void *)pc, instr)) { > pr_cont("XXXXXXXX "); > } else { > if (regs->nip == pc) > -- > 2.13.3 > -- Murilo