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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 537E9C433F5 for ; Tue, 24 May 2022 10:16:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234675AbiEXKP5 (ORCPT ); Tue, 24 May 2022 06:15:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbiEXKPx (ORCPT ); Tue, 24 May 2022 06:15:53 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2896F7E1D1 for ; Tue, 24 May 2022 03:15:52 -0700 (PDT) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24OA6mHZ014857; Tue, 24 May 2022 10:15:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : subject : to : cc : references : in-reply-to : mime-version : message-id : content-type : content-transfer-encoding; s=pp1; bh=2XZ1WUugb0+bzkv/oIVhLNr19Fk0qAaWlx4k0tucVUo=; b=CbdI0N6INX3IgU8qoH2aCnho8huUEdIQGCjRIZas9SzT7rM4yLHiK3Pk8nyy9h3PTXVP 8aqnX3CqWLXjzuqHuNiIfGQsGWdFLU/1buPqtfWH21hkB1ikwZ+FJBwdh1MUHbSxdb6M /9QkCdTWoINSZDnm3CR9/n3BcFKEAeKzRihASQxNHw7Eb4yTo5lQ7t2CDy9r2Tym5KCs Vm3fuVpwp38plo+u4cO211Dtv3eU67cdiftbUNPaNqSD7n9JssYIdniFw+OTAwlSRSaE G08feC/KaPysS6XAQbIajZZa5PhzaJ+t/b7HVkW58jB/xDFyWqojUf2TX2vqBie2W8m8 Nw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3g8v6j1gdw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 10:15:27 +0000 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24OA9pex024172; Tue, 24 May 2022 10:15:27 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3g8v6j1gd5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 10:15:27 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24OA8KdI005623; Tue, 24 May 2022 10:15:25 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3g6qq948fa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 10:15:25 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24OAFMCp41877890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 May 2022 10:15:23 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B39AB4204F; Tue, 24 May 2022 10:15:22 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F0C042041; Tue, 24 May 2022 10:15:22 +0000 (GMT) Received: from localhost (unknown [9.199.154.182]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 24 May 2022 10:15:22 +0000 (GMT) Date: Tue, 24 May 2022 15:45:20 +0530 From: "Naveen N. Rao" Subject: Re: [RFC PATCH 1/4] objtool: Add --mnop as an option to --mcount To: Christophe Leroy , "linuxppc-dev@lists.ozlabs.org" , Sathvika Vasireddy Cc: "aik@ozlabs.ru" , "jpoimboe@redhat.com" , "linux-kernel@vger.kernel.org" , "mbenes@suse.cz" , "mpe@ellerman.id.au" , "peterz@infradead.org" , "rostedt@goodmis.org" References: <20220523175548.922671-1-sv@linux.ibm.com> <20220523175548.922671-2-sv@linux.ibm.com> <26c7bfc8-3089-034a-70c0-8857d7cd3a99@csgroup.eu> In-Reply-To: <26c7bfc8-3089-034a-70c0-8857d7cd3a99@csgroup.eu> MIME-Version: 1.0 User-Agent: astroid/4d6b06ad (https://github.com/astroidmail/astroid) Message-Id: <1653386854.o7nss9hzc9.naveen@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: LcReRrfGxPgKstSwunxeCTJ3vHJvcc5b X-Proofpoint-ORIG-GUID: foRDD5U1AKCkYPI3EQhEuPv_b1KM-j40 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-24_06,2022-05-23_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 mlxlogscore=828 phishscore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205240051 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy wrote: >=20 >=20 > Le 23/05/2022 =C3=A0 19:55, Sathvika Vasireddy a =C3=A9crit=C2=A0: >> Architectures can select HAVE_NOP_MCOUNT if they choose >> to nop out mcount call sites. If that config option is >> selected, then --mnop is passed as an option to objtool, >> along with --mcount. >>=20 >=20 > Is there a reason not to nop out mcount call sites on powerpc as well ? Yes, if there are functions that are out of range of _mcount(), then the=20 linker would have inserted long branch trampolines. We detect such cases=20 during boot. But, if we nop out the _mcount call sites during build=20 time, we will need some other way to identify these. - Naveen 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 0DECFC433EF for ; Tue, 24 May 2022 10:16:30 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4L6qqK3SDqz3c7s for ; Tue, 24 May 2022 20:16:29 +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=CbdI0N6I; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=naveen.n.rao@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=CbdI0N6I; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 4L6qpX0y08z30D0 for ; Tue, 24 May 2022 20:15:47 +1000 (AEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24OA6mHZ014857; Tue, 24 May 2022 10:15:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : subject : to : cc : references : in-reply-to : mime-version : message-id : content-type : content-transfer-encoding; s=pp1; bh=2XZ1WUugb0+bzkv/oIVhLNr19Fk0qAaWlx4k0tucVUo=; b=CbdI0N6INX3IgU8qoH2aCnho8huUEdIQGCjRIZas9SzT7rM4yLHiK3Pk8nyy9h3PTXVP 8aqnX3CqWLXjzuqHuNiIfGQsGWdFLU/1buPqtfWH21hkB1ikwZ+FJBwdh1MUHbSxdb6M /9QkCdTWoINSZDnm3CR9/n3BcFKEAeKzRihASQxNHw7Eb4yTo5lQ7t2CDy9r2Tym5KCs Vm3fuVpwp38plo+u4cO211Dtv3eU67cdiftbUNPaNqSD7n9JssYIdniFw+OTAwlSRSaE G08feC/KaPysS6XAQbIajZZa5PhzaJ+t/b7HVkW58jB/xDFyWqojUf2TX2vqBie2W8m8 Nw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3g8v6j1gdw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 10:15:27 +0000 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24OA9pex024172; Tue, 24 May 2022 10:15:27 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3g8v6j1gd5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 10:15:27 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24OA8KdI005623; Tue, 24 May 2022 10:15:25 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3g6qq948fa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 10:15:25 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24OAFMCp41877890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 May 2022 10:15:23 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B39AB4204F; Tue, 24 May 2022 10:15:22 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F0C042041; Tue, 24 May 2022 10:15:22 +0000 (GMT) Received: from localhost (unknown [9.199.154.182]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 24 May 2022 10:15:22 +0000 (GMT) Date: Tue, 24 May 2022 15:45:20 +0530 From: "Naveen N. Rao" Subject: Re: [RFC PATCH 1/4] objtool: Add --mnop as an option to --mcount To: Christophe Leroy , "linuxppc-dev@lists.ozlabs.org" , Sathvika Vasireddy References: <20220523175548.922671-1-sv@linux.ibm.com> <20220523175548.922671-2-sv@linux.ibm.com> <26c7bfc8-3089-034a-70c0-8857d7cd3a99@csgroup.eu> In-Reply-To: <26c7bfc8-3089-034a-70c0-8857d7cd3a99@csgroup.eu> MIME-Version: 1.0 User-Agent: astroid/4d6b06ad (https://github.com/astroidmail/astroid) Message-Id: <1653386854.o7nss9hzc9.naveen@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: LcReRrfGxPgKstSwunxeCTJ3vHJvcc5b X-Proofpoint-ORIG-GUID: foRDD5U1AKCkYPI3EQhEuPv_b1KM-j40 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-24_06,2022-05-23_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 mlxlogscore=828 phishscore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205240051 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" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , "peterz@infradead.org" , "jpoimboe@redhat.com" , "mbenes@suse.cz" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Christophe Leroy wrote: >=20 >=20 > Le 23/05/2022 =C3=A0 19:55, Sathvika Vasireddy a =C3=A9crit=C2=A0: >> Architectures can select HAVE_NOP_MCOUNT if they choose >> to nop out mcount call sites. If that config option is >> selected, then --mnop is passed as an option to objtool, >> along with --mcount. >>=20 >=20 > Is there a reason not to nop out mcount call sites on powerpc as well ? Yes, if there are functions that are out of range of _mcount(), then the=20 linker would have inserted long branch trampolines. We detect such cases=20 during boot. But, if we nop out the _mcount call sites during build=20 time, we will need some other way to identify these. - Naveen