Message ID | 20221124122931.266df8c7@canb.auug.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3132811wrr; Wed, 23 Nov 2022 17:37:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf5F/5UUdM3HCYIn6gPEpluyoUbYH/0CPu41T9M4z6vRM6rpcTFRaZebJNXG1rHvIkaI6yBV X-Received: by 2002:aa7:d648:0:b0:46a:aa4:8a17 with SMTP id v8-20020aa7d648000000b0046a0aa48a17mr6892495edr.416.1669253825671; Wed, 23 Nov 2022 17:37:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669253825; cv=none; d=google.com; s=arc-20160816; b=mCfrYjGPjhLYILVbHbSGRhomSzk+Aj361k6QQFYD00nsGm2DjZQKVSSWr7YfYSVj1s lbVVnBcAIs2CsWhOlkOJBS0MN78sOSyOasoxI2Y07zE2NEaBy0uSaFwlE/g0qtSyWc/4 a9Kmih0s8FUg30Cux9V7DxCxIoh/RfK2/1XVwpol/LcMXX1k/MHqT1wYncq8Xa9f3C+s udzpcBm2/Q2it1BwkEWzXCjXTio8T1My/6+5db35ayE1GV1RIUV0BvD9XPWGeSXmmQ7c Q8c9i0L+dH+UFsrsyWecPTcNuKId7b6hlMHwIAE5tBAgV8ltXZT738APt+V+/XPl5ys7 sKNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=JBoFldnbFkQx64zlIrUVvIYpX+G+3s4hlaGLmsO4DLc=; b=Ws5mhDNoibIuwva/26qR7bXBNKXl8md3ZJ+LJlX+VbenpxLBdGMp35W4h4WKZuTdo6 /WsIRfdl3GlTCBMGNlNzjDs/2P0rYQnUJgw+8gCNcch8yMrvhKvj6ZJCb1cgKu3xiwfu TAFm/uZ8scJugKjFcsSXDOJLhL/cpLHJKx7GSYgtoq6DILO5kZcX3XKuG2a593MSk5sW VTWqEkDKn2wIAzAWKFiNm278sjsQG1PN16C8ar2YuAzyTRz7E2+XWOX/o4QotKGWdrpx AD1klhzybzlDbtg/+xs55ouRosBLfnoC9XI4qwrIdBYlsDBErR3HRVQlAoiGarVNVT2t Y7xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=CmW7wn48; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd14-20020a1709069b8e00b0077d562462f5si1032162ejc.381.2022.11.23.17.36.42; Wed, 23 Nov 2022 17:37:05 -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=@canb.auug.org.au header.s=201702 header.b=CmW7wn48; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229927AbiKXB3v (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Wed, 23 Nov 2022 20:29:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbiKXB3n (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 23 Nov 2022 20:29:43 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 053867CB8A; Wed, 23 Nov 2022 17:29:41 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4NHgQS5PfWz4x2c; Thu, 24 Nov 2022 12:29:36 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1669253377; bh=JBoFldnbFkQx64zlIrUVvIYpX+G+3s4hlaGLmsO4DLc=; h=Date:From:To:Cc:Subject:From; b=CmW7wn482iyoUrRheIscrEyn6EGtgKfYyL6ulcErqB3VafsnutmmWgnDZ18WmCqWu HB4R/G7DpoGcZWestJx3AxYrx5+eB1nrbWwxM1EkVy6QgHL41/bH0nHXck8viqvNb6 T1rWTUGFu402173F6e5tvwjmAtEUbHRruukTKn8g/3iDQ8jSh4DeVuy+Zcf1tpcQLd LuQpWtvFxkAx3+vQ7zGQPKLwnQs5YfVl6NOTFo7lAv52FpMlET36+P6QHQcBprDz50 nuUVB+TXLZAURbB1SAxREtmhUsX8R3CNnXgKq4m1tDz3/aE1gbj4kbela6T5go8v8/ ID2qwCrcBPJSA== Date: Thu, 24 Nov 2022 12:29:31 +1100 From: Stephen Rothwell <sfr@canb.auug.org.au> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Peter Zijlstra <peterz@infradead.org>, Michael Ellerman <mpe@ellerman.id.au> Cc: PowerPC <linuxppc-dev@lists.ozlabs.org>, Christophe Leroy <christophe.leroy@csgroup.eu>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org> Subject: linux-next: manual merge of the tip tree with the powerpc-objtool tree Message-ID: <20221124122931.266df8c7@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/=_lk_MtKlnjXeIX3zrvFugy"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750339499552893604?= X-GMAIL-MSGID: =?utf-8?q?1750339499552893604?= |
Series |
linux-next: manual merge of the tip tree with the powerpc-objtool tree
|
|
Commit Message
Stephen Rothwell
Nov. 24, 2022, 1:29 a.m. UTC
Hi all, Today's linux-next merge of the tip tree got a conflict in: tools/objtool/check.c between commit: efb11fdb3e1a ("objtool: Fix SEGFAULT") from the powerpc-objtool tree and commit: dbcdbdfdf137 ("objtool: Rework instruction -> symbol mapping") from the tip tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Comments
Le 24/11/2022 à 02:29, Stephen Rothwell a écrit : > Hi all, > > Today's linux-next merge of the tip tree got a conflict in: > > tools/objtool/check.c > > between commit: > > efb11fdb3e1a ("objtool: Fix SEGFAULT") > > from the powerpc-objtool tree and commit: > > dbcdbdfdf137 ("objtool: Rework instruction -> symbol mapping") > > from the tip tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. > Maybe it would be better to perform the check of insn inside the new insn_func() then ? Christophe
Christophe Leroy <christophe.leroy@csgroup.eu> writes: > Le 24/11/2022 à 02:29, Stephen Rothwell a écrit : >> Hi all, >> >> Today's linux-next merge of the tip tree got a conflict in: >> >> tools/objtool/check.c >> >> between commit: >> >> efb11fdb3e1a ("objtool: Fix SEGFAULT") >> >> from the powerpc-objtool tree and commit: >> >> dbcdbdfdf137 ("objtool: Rework instruction -> symbol mapping") >> >> from the tip tree. >> >> I fixed it up (see below) and can carry the fix as necessary. This >> is now fixed as far as linux-next is concerned, but any non trivial >> conflicts should be mentioned to your upstream maintainer when your tree >> is submitted for merging. You may also want to consider cooperating >> with the maintainer of the conflicting tree to minimise any particularly >> complex conflicts. >> > > Maybe it would be better to perform the check of insn inside the new > insn_func() then ? I don't think it would. Many of the other uses of insn_func() know that insn is not NULL, because they've already checked it or have dereferenced some other member of insn before the call. So in those cases checking it in insn_func() would be redundant. But ultimately up to the objtool maintainers. cheers
Hi all, On Thu, 24 Nov 2022 12:29:31 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > Today's linux-next merge of the tip tree got a conflict in: > > tools/objtool/check.c > > between commit: > > efb11fdb3e1a ("objtool: Fix SEGFAULT") > > from the powerpc-objtool tree and commit: > > dbcdbdfdf137 ("objtool: Rework instruction -> symbol mapping") > > from the tip tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. > > -- > Cheers, > Stephen Rothwell > > diff --cc tools/objtool/check.c > index 7580c66ca5c8,4f1a7384426b..000000000000 > --- a/tools/objtool/check.c > +++ b/tools/objtool/check.c > @@@ -207,7 -204,7 +204,7 @@@ static bool __dead_end_function(struct > return false; > > insn = find_insn(file, func->sec, func->offset); > - if (!insn || !insn->func) > - if (!insn_func(insn)) > ++ if (!insn || !insn_func(insn)) > return false; > > func_for_each_insn(file, func, insn) { > @@@ -850,11 -861,73 +861,73 @@@ static int create_ibt_endbr_seal_sectio > return 0; > } > > + static int create_cfi_sections(struct objtool_file *file) > + { > + struct section *sec, *s; > + struct symbol *sym; > + unsigned int *loc; > + int idx; > + > + sec = find_section_by_name(file->elf, ".cfi_sites"); > + if (sec) { > + INIT_LIST_HEAD(&file->call_list); > + WARN("file already has .cfi_sites section, skipping"); > + return 0; > + } > + > + idx = 0; > + for_each_sec(file, s) { > + if (!s->text) > + continue; > + > + list_for_each_entry(sym, &s->symbol_list, list) { > + if (sym->type != STT_FUNC) > + continue; > + > + if (strncmp(sym->name, "__cfi_", 6)) > + continue; > + > + idx++; > + } > + } > + > + sec = elf_create_section(file->elf, ".cfi_sites", 0, sizeof(unsigned int), idx); > + if (!sec) > + return -1; > + > + idx = 0; > + for_each_sec(file, s) { > + if (!s->text) > + continue; > + > + list_for_each_entry(sym, &s->symbol_list, list) { > + if (sym->type != STT_FUNC) > + continue; > + > + if (strncmp(sym->name, "__cfi_", 6)) > + continue; > + > + loc = (unsigned int *)sec->data->d_buf + idx; > + memset(loc, 0, sizeof(unsigned int)); > + > + if (elf_add_reloc_to_insn(file->elf, sec, > + idx * sizeof(unsigned int), > + R_X86_64_PC32, > + s, sym->offset)) > + return -1; > + > + idx++; > + } > + } > + > + return 0; > + } > + > static int create_mcount_loc_sections(struct objtool_file *file) > { > - struct section *sec; > - unsigned long *loc; > + int addrsize = elf_class_addrsize(file->elf); > struct instruction *insn; > + struct section *sec; > int idx; > > sec = find_section_by_name(file->elf, "__mcount_loc"); This is now a conflict between the powerpc tree and Linus' tree.
diff --cc tools/objtool/check.c index 7580c66ca5c8,4f1a7384426b..000000000000 --- a/tools/objtool/check.c