Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp957646rwb; Tue, 29 Nov 2022 07:19:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf6cFfQLsI4U4uAFZUsc/B0ZXl+NS7S6eYanD4dNYG8XXTltzLMjApTD+VecZhmUbvMlbhNE X-Received: by 2002:a05:6402:68c:b0:461:b506:6b8a with SMTP id f12-20020a056402068c00b00461b5066b8amr52136126edy.208.1669735186910; Tue, 29 Nov 2022 07:19:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669735186; cv=none; d=google.com; s=arc-20160816; b=i6k4ADiUI4GvYFX/VenHPRLfBuwzeh8Sx4E8naZYqzv+qMl7tAQppD+gO5IUSEP6oS 5HJ3pH3akTqMQuTLZNsSCktXZ9d6Q8hUH7lupXmzCxPkeB0WiRdgovMHrozEtjlA+Qjn cA+9kHOLmBadnrGKWUblM7I6qoQ/xBr4pmaXWPQzgKQIEXw9y+vwvTv+FHGt8H705wA0 lXtflY8yBHnyqHkEpygtUuXRXpmxMRMM0sVYk0vySdq+pcGeWrVzXG6TVEs1sZyvqIJ2 b+Rwm02OJMhneGJnet7EfQvLysnUwNRwJt4QexK94IC8MW6fpWa+5CPcECRfO3t7ghMp ICOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=6DM+s6wNaCi7olYeyp2LZ8PKgJ1P1Ksw181EifA6oxE=; b=VIEQlwPBSjFM27CrDbR8DpMGB7nmZKTNeTqf4dz/XtikI99VS7uBDstpg4TPPRQ533 N4EesZYaEObeeTRBMcPARlRg8E6bKaJSH5QUehNjeEzDxBQsL3u6Mf+WT4Mwu25N2f4m EBLcoDa7QsFfhMl/AwXr57rYfPn9VxxE1zCc2+i7Kr+osa4urQqKGpvb4ebo1EtmSLNh o4rgy03f7NqMqaVYvtbQ/Ph13WIu3PgZEoXhD5ip5FyeWTDaPki0g+znVWTUKGyVd/MP zBBb/DfWa5f6s0ijnIIRlxGO49w3tvjAwYBzD7R8D3JVS+bLDagADzBGq3sBBISWQkH3 in3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=mc1mq92b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc36-20020a1709071c2400b007ae8d01144dsi12940241ejc.717.2022.11.29.07.19.21; Tue, 29 Nov 2022 07:19:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=mc1mq92b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233627AbiK2PNy (ORCPT + 85 others); Tue, 29 Nov 2022 10:13:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbiK2PNw (ORCPT ); Tue, 29 Nov 2022 10:13:52 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 709F9DFFB; Tue, 29 Nov 2022 07:13:51 -0800 (PST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ATF5BLa007838; Tue, 29 Nov 2022 15:13:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=6DM+s6wNaCi7olYeyp2LZ8PKgJ1P1Ksw181EifA6oxE=; b=mc1mq92bTJoaeKiyFeaY3lLG6+NUU4aeg6hAze4ZHzuwHVk7cuLtaUi1GMwTOLeYjrdi VvSiEYHPEEzGeo1glTlZ3dntAgk2WNLwMzLGXqpXDV/z4G25VO/hEFo3P1MmvvJGw0pK 0KhNiIqRcPpr0cS+8am/i3h33mo0BBslda1bJB1Hyrmp/TTc2GNrmcAj3Of4lhRVIb2u VEB39LlSGytmtVk0Zse97DrZm1x+HGricSFM5tMVy1XdkwGzF5t+OBYlCJsR5DIpCJ3/ CNiEbd6tc4Y1uEA0wsPiq3APO+Q32/2Y3/c7rbj9OC3iXbS9Rb4wgiuLoL8Z7ejAxEZl oA== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m5mdhg6p9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Nov 2022 15:13:33 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2ATF5aCK005278; Tue, 29 Nov 2022 15:13:31 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 3m3ae9c8gb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Nov 2022 15:13:31 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2ATFDTtn1180394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Nov 2022 15:13:29 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EAA2D11C04A; Tue, 29 Nov 2022 15:13:28 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 01D8B11C04C; Tue, 29 Nov 2022 15:13:27 +0000 (GMT) Received: from [9.109.198.140] (unknown [9.109.198.140]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 29 Nov 2022 15:13:26 +0000 (GMT) Message-ID: <6cdad32e-782d-5bb5-f7e9-a44fb0b6444d@linux.ibm.com> Date: Tue, 29 Nov 2022 20:43:25 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: linux-next: build warnings after merge of the powerpc-objtool tree Content-Language: en-US To: Stephen Rothwell , Michael Ellerman , PowerPC Cc: Christophe Leroy , Linux Kernel Mailing List , Linux Next Mailing List , "Naveen N. Rao" , Sathvika Vasireddy References: <20221125143012.6426c2b9@canb.auug.org.au> From: Sathvika Vasireddy In-Reply-To: <20221125143012.6426c2b9@canb.auug.org.au> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: F2lH_XEpazIbiNeK9BvuK-gXke5aRu4x X-Proofpoint-GUID: F2lH_XEpazIbiNeK9BvuK-gXke5aRu4x Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-29_09,2022-11-29_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 malwarescore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 clxscore=1011 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211290083 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, On 25/11/22 09:00, Stephen Rothwell wrote: > Hi all, > > After merging the powerpc-objtool tree, today's linux-next build (powerpc > pseries_le_defconfig) produced these warnings: > > arch/powerpc/kernel/head_64.o: warning: objtool: end_first_256B(): can't find starting instruction > arch/powerpc/kernel/optprobes_head.o: warning: objtool: optprobe_template_end(): can't find starting instruction > > I have no idea what started this (they may have been there yesterday). I was able to recreate the above mentioned warnings with pseries_le_defconfig and powernv_defconfig. The regression report also mentions a warning (https://lore.kernel.org/oe-kbuild-all/202211282102.QUr7HHrW-lkp@intel.com/) seen with arch/powerpc/kernel/kvm_emul.S assembly file.  [1] arch/powerpc/kernel/optprobes_head.o: warning: objtool: optprobe_template_end(): can't find starting instruction  [2] arch/powerpc/kernel/kvm_emul.o: warning: objtool: kvm_template_end(): can't find starting instruction  [3] arch/powerpc/kernel/head_64.o: warning: objtool: end_first_256B(): can't find starting instruction The warnings [1] and [2] go away after adding 'nop' instruction. Below diff fixes it for me: diff --git a/arch/powerpc/kernel/optprobes_head.S b/arch/powerpc/kernel/optprobes_head.S index cd4e7bc32609..ea4e3bd82f4f 100644 --- a/arch/powerpc/kernel/optprobes_head.S +++ b/arch/powerpc/kernel/optprobes_head.S @@ -134,3 +134,4 @@ optprobe_template_ret:         .global optprobe_template_end  optprobe_template_end: +       nop diff --git a/arch/powerpc/kernel/kvm_emul.S b/arch/powerpc/kernel/kvm_emul.S index 7af6f8b50c5d..41fd664e3ba0 100644 --- a/arch/powerpc/kernel/kvm_emul.S +++ b/arch/powerpc/kernel/kvm_emul.S @@ -352,3 +352,4 @@ kvm_tmp_end:  .global kvm_template_end  kvm_template_end: +       nop For warning [3], objtool is throwing can't find starting instruction warning because it finds that the symbol (end_first_256B) is zero sized, and such symbols are not added to the rbtree. I tried to fix it by adding a 'nop' instruction (pasted diff below), but that resulted in a kernel build failure. diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 874efd25cc45..d48850fe159f 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S @@ -192,6 +192,7 @@ __secondary_hold:         EMIT_BUG_ENTRY 0b, __FILE__, __LINE__, 0  #endif  CLOSE_FIXED_SECTION(first_256B) +nop  /*   * On server, we include the exception vectors code here as it diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 26f8fef53c72..f7517d443e9b 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -3104,9 +3104,13 @@ __end_interrupts:  DEFINE_FIXED_SYMBOL(__end_interrupts, virt_trampolines)  CLOSE_FIXED_SECTION(real_vectors); +nop  CLOSE_FIXED_SECTION(real_trampolines); +nop  CLOSE_FIXED_SECTION(virt_vectors); +nop  CLOSE_FIXED_SECTION(virt_trampolines); +nop  USE_TEXT_SECTION() I'm not very sure on how to address this particular warning (arch/powerpc/kernel/head_64.o: warning: objtool: end_first_256B(): can't find starting instruction). Given that there are no calls to _mcount, one workaround is to skip objtool from running on arch/powerpc/kernel/head_64.o file. The below diff works for me: diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 9b6146056e48..9ef6a040d875 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -219,3 +219,5 @@ $(obj)/vdso64_wrapper.o : $(obj)/vdso/vdso64.so.dbg  # for cleaning  subdir- += vdso + +OBJECT_FILES_NON_STANDARD_head_64.o := y Thanks, Sathvika