From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C77E3C433EF for ; Wed, 25 May 2022 11:09:41 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4L7SyD2BC5z3c8M for ; Wed, 25 May 2022 21:09:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=MkmM3JkY; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=sv@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=MkmM3JkY; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4L7SmH4K2Zz2y7V for ; Wed, 25 May 2022 21:01:03 +1000 (AEST) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24P8X8lr001819; Wed, 25 May 2022 11:00:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=content-type : message-id : date : subject : to : cc : references : from : in-reply-to : mime-version; s=pp1; bh=v30RAzu0pmztxKiLoTeEHBpD/pNQmgeE4NQFH4FjzIU=; b=MkmM3JkYlb+RjnsH1yVt2nY7/gMJQ6UvniwbEYWny3aQQ9ijiStkCNPYzAUX6cvaifdv fEJn0uivrCW+QMDt48Xx1mmsTNB91ppg+5ilh9VnjqY3UI3L5aCCpn09IYhSmt3h6bg1 /MfRBXSVxaAUrNnHW1IOt3QepylRaH+Wllrc0+aw8QdEieON8TRCkp22GtGYgStXKUz1 sLG5fZSvUXhE9tVf5VBa6ZXYNCnPRMitSB2+UU80GarQcHuYnq2Z24jKwG/8AQ2PUV69 eAEAdgFPxwIV/mCPArvNe+8dBOxQS2LROrjHWKBk8/vXnep9UWLx2PZPA5UP5KqBsY++ BQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g9fuu3w4k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 May 2022 11:00:47 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24PArNb2029847; Wed, 25 May 2022 11:00:45 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g9fuu3w39-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 May 2022 11:00:45 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24PAwkbW026506; Wed, 25 May 2022 11:00:43 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06ams.nl.ibm.com with ESMTP id 3g93uw919t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 May 2022 11:00:42 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24PAkW6G42467786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 May 2022 10:46:32 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A98F44C040; Wed, 25 May 2022 11:00:40 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A09034C044; Wed, 25 May 2022 11:00:36 +0000 (GMT) Received: from [9.43.54.165] (unknown [9.43.54.165]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 25 May 2022 11:00:36 +0000 (GMT) Content-Type: multipart/alternative; boundary="------------OiF0gun0GxmZU3zFlP9iz0et" Message-ID: Date: Wed, 25 May 2022 16:30:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [RFC PATCH v2 5/7] objtool: Enable objtool to run only on files with ftrace enabled Content-Language: en-US To: Peter Zijlstra , Christophe Leroy References: <5cb959a2-7e88-5aff-2f8e-be8fdecd002c@csgroup.eu> From: Sathvika Vasireddy In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 4YqMvogko2I9d6pEBVuF8i522KJHvBDN X-Proofpoint-GUID: ew1g5_wJwFglrHLWsTpvi7cQPaFylRc0 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-25_03,2022-05-25_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 clxscore=1015 malwarescore=0 impostorscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205250051 X-Mailman-Approved-At: Wed, 25 May 2022 21:09:00 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "aik@ozlabs.ru" , "jpoimboe@redhat.com" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , "sv@linux.ibm.com" , Paul Mackerras , "naveen.n.rao@linux.vnet.ibm.com" , "mbenes@suse.cz" , "linuxppc-dev@lists.ozlabs.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" This is a multi-part message in MIME format. --------------OiF0gun0GxmZU3zFlP9iz0et Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Peter, On 25/05/22 01:20, Peter Zijlstra wrote: > On Tue, May 24, 2022 at 06:59:50PM +0000, Christophe Leroy wrote: >> >> Le 24/05/2022 à 20:02, Peter Zijlstra a écrit : >>> On Tue, May 24, 2022 at 08:01:39PM +0200, Peter Zijlstra wrote: >>>> On Tue, May 24, 2022 at 03:17:45PM +0200, Christophe Leroy wrote: >>>>> From: Sathvika Vasireddy >>>>> >>>>> This patch makes sure objtool runs only on the object files >>>>> that have ftrace enabled, instead of running on all the object >>>>> files. >>>>> >>>>> Signed-off-by: Naveen N. Rao >>>>> Signed-off-by: Sathvika Vasireddy >>>>> Signed-off-by: Christophe Leroy >>>>> --- >>>>> scripts/Makefile.build | 4 ++-- >>>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>>> >>>>> diff --git a/scripts/Makefile.build b/scripts/Makefile.build >>>>> index 2e0c3f9c1459..06ceffd92921 100644 >>>>> --- a/scripts/Makefile.build >>>>> +++ b/scripts/Makefile.build >>>>> @@ -258,8 +258,8 @@ else >>>>> # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file >>>>> # 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a file >>>>> >>>>> -$(obj)/%.o: objtool-enabled = $(if $(filter-out y%, \ >>>>> - $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n),y) >>>>> +$(obj)/%.o: objtool-enabled = $(and $(if $(filter-out y%, $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n),y), \ >>>>> + $(if $(findstring $(strip $(CC_FLAGS_FTRACE)),$(_c_flags)),y),y) >>>> I think this breaks x86, quite a bit of files have ftrace disabled but >>>> very much must run objtool anyway. >>> Also; since the Changelog gives 0 clue as to what problem it's trying to >>> solve, I can't suggest anything. >> I asked Sathvika on the previous series, see >> https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220523175548.922671-3-sv@linux.ibm.com/ >> >> He says it is to solve the problem I reported at >> https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220318105140.43914-4-sv@linux.ibm.com/#2861128 > So on x86 we have: > > arch/x86/entry/vdso/Makefile:OBJECT_FILES_NON_STANDARD := y > > to kill objtool for the whole of the VDSO. When we run objtool on > vmlinux it isn't a problem, because the VDSO ends up as a data section > through linker scripts. Right.. Like you and Christophe mentioned, arch/powerpc/kernel/vdso/Makefile:OBJECT_FILES_NON_STANDARD := y should solve it for powerpc as well. I'll drop this patch and replace it with the above change as part of next revision series. Thanks for reviewing! - Sathvika --------------OiF0gun0GxmZU3zFlP9iz0et Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Peter,

On 25/05/22 01:20, Peter Zijlstra wrote:
On Tue, May 24, 2022 at 06:59:50PM +0000, Christophe Leroy wrote:

Le 24/05/2022 à 20:02, Peter Zijlstra a écrit :
On Tue, May 24, 2022 at 08:01:39PM +0200, Peter Zijlstra wrote:
On Tue, May 24, 2022 at 03:17:45PM +0200, Christophe Leroy wrote:
From: Sathvika Vasireddy <sv@linux.ibm.com>

This patch makes sure objtool runs only on the object files
that have ftrace enabled, instead of running on all the object
files.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
  scripts/Makefile.build | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 2e0c3f9c1459..06ceffd92921 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -258,8 +258,8 @@ else
  # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file
  # 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a file
  
-$(obj)/%.o: objtool-enabled = $(if $(filter-out y%, \
-	$(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n),y)
+$(obj)/%.o: objtool-enabled = $(and $(if $(filter-out y%, $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n),y),        \
+        $(if $(findstring $(strip $(CC_FLAGS_FTRACE)),$(_c_flags)),y),y)
I think this breaks x86, quite a bit of files have ftrace disabled but
very much must run objtool anyway.
Also; since the Changelog gives 0 clue as to what problem it's trying to
solve, I can't suggest anything.
I asked Sathvika on the previous series, see 
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220523175548.922671-3-sv@linux.ibm.com/

He says it is to solve the problem I reported at 
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220318105140.43914-4-sv@linux.ibm.com/#2861128
So on x86 we have:

arch/x86/entry/vdso/Makefile:OBJECT_FILES_NON_STANDARD       := y

to kill objtool for the whole of the VDSO. When we run objtool on
vmlinux it isn't a problem, because the VDSO ends up as a data section
through linker scripts.
Right.. Like you and Christophe mentioned, 
arch/powerpc/kernel/vdso/Makefile:OBJECT_FILES_NON_STANDARD := y
should solve it for powerpc as well.


I'll drop this patch and replace it with the above change as part of next
revision series.


Thanks for reviewing!



- Sathvika
--------------OiF0gun0GxmZU3zFlP9iz0et--