Message ID | 20230625092842.GBZJgIyqJL/FtKW4nU@fat_crate.local |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp6825412vqr; Sun, 25 Jun 2023 02:57:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4m4AVTVgt2QeqAqL259bEfMrrqxq6+iMlnbeDxvS6jFhoIacjKwlC19nBOLAonyMJPvBGy X-Received: by 2002:a9d:6b89:0:b0:6b5:ee8f:73ab with SMTP id b9-20020a9d6b89000000b006b5ee8f73abmr12233329otq.30.1687687021438; Sun, 25 Jun 2023 02:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687687021; cv=none; d=google.com; s=arc-20160816; b=QqqszXp7E8Is83MVt1w+oCyECukkE1OTm/MHmoJ+vmvX8XDJHsyFNEFJM4mraf8XX3 6tOM1FPPnq1jkCfGzlClPWHGZYM7CFYhsgF7A6ZgSldTYxNIKEkeHdvBFHyRXtil39fd KYHu0fJ0L2nuIwbnlTxlm5wzv1n0zaBZOaSnpg61F9mtTnveejO42E85c/HjdXUvLWJE KKlfD0GiCbut1ptqVDM266jOtV8kNNIKb0G67uZaWL+k4vwN4TpBcB5U21LD6lV/eZ/F K4i970u6Jo92KlYEeBXHwwuPid6t+GLLLqoZm1vR9kntUCxPKK8wntmf3Z/gXUMYAQNW QRZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=IsuNgG5ZFUiCMYg0h5b8QUl1BEBIbDhPapDglgyw9Bo=; fh=5ZjxVYKXeWzXrQtuvh8WKOTEKQBUJ80ckFoMga5XCYE=; b=s+BUx/Rwuq6RQLxta/P1mgAdXWdnbq0E97JzkHn/nsgS6uNAireUOjw7TGh8Gi6dx4 85Jq5IJFrnPOivNYV5qcJQAz+nH86nhG3s5mmMU85M7vxd/DHyPI5pESHMW+IfP7/Ypv IjnfsSpVb3y8p8grjJM+nVU4fnHWy/M/TgdXvEtX5aIwx5JCzow/pu46coJRz3jYM+rc ONruS+lgLF35GRA6uFOQznEC8YdAtcoby9rYBe50Py6Ri3bxXNcxjUkavFk100NZrEfw 1puaBJx5fyMsP5U/AG51VIb4hFUtFKFgqw3+rVBzn+8aR2LJsHi1Cfa74dkvzYm3RwtK tsSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="P95D/pI5"; dkim=pass header.i=@alien8.de header.s=alien8 header.b=MS8k8r6Z; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a17090332d100b001b8023275edsi8899plr.113.2023.06.25.02.56.49; Sun, 25 Jun 2023 02:57:01 -0700 (PDT) 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=@alien8.de header.s=dkim header.b="P95D/pI5"; dkim=pass header.i=@alien8.de header.s=alien8 header.b=MS8k8r6Z; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231782AbjFYJ3B (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Sun, 25 Jun 2023 05:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230029AbjFYJ3A (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 25 Jun 2023 05:29:00 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE2F3BB for <linux-kernel@vger.kernel.org>; Sun, 25 Jun 2023 02:28:50 -0700 (PDT) Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 946BE1EC0882; Sun, 25 Jun 2023 11:28:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1687685329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:references; bh=IsuNgG5ZFUiCMYg0h5b8QUl1BEBIbDhPapDglgyw9Bo=; b=P95D/pI5nyCiGz1PyQvSatFM9etZ6Zq2j+pftXindCIct98fzrIPQ36MHxMM3n5hq/pb4b fYvnxqvIvP+WAkXLE7MOb8vPY6DyCG3psFgetD7o2sdXxQPddQF3+7YKdT5IQ9pkbGmDe5 IQ0h8A66/FWSiAX6xI7HbQ3St93NidY= X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FXWWoWfJ9_lE; Sun, 25 Jun 2023 09:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1687685327; bh=IsuNgG5ZFUiCMYg0h5b8QUl1BEBIbDhPapDglgyw9Bo=; h=Date:From:To:Cc:Subject:From; b=MS8k8r6Z72eIwv54//mjN6OCXTcdfk6HkaxLXPWboBn3R6xnZUHWa2Y0PDWcDvy9i 1gXvWIyu6oLmCLAdqqHt4Z57+IkbZUrCjbxZbN0Zhxa0rtbIVAgD0YicOem1+jTHA4 VvLOGMC6SxbGzM99h/+QAyINJBLgioulm+b9r34RO2p7wugb2DCJhkawxl8zeMaGZe nP38PMtxdELGvsX7UzClgwsYIcx3Ce/fos0MMMGoU+VvOHlZTPF3xFIv/oB7aK8iPI 2ijQzKCgBufpGsLb9UBurxuDjt1mTLzPrkqS6PFryYjxnlyO2r/7ijm48WZxn24KDd IZKoN36hjH9HYgVdAnudmf7QEQdAztXxpnsiohH8b6d7aKqhvWRDcvELewEARnDe+h mrE9oy+zl++rDZDPjBvCP8PCXNVckD8qdst3TSWRs8kQ3TpexA93TK+5dA4PHTUBu+ QvOFPIdmjQua6BWR1XLSHcUb/4vU2IOuRrQ6ZYHFwgazg80sashZCskvNdqf1KNQB8 qU2diHgt34xLiHxwP1d0u46ofMY/VHWXlCaHAmnW7bqNltC744H+h/0bqtjYMIaZ2E cKCK0MmB2btJ9CAQ3S5wOczvrQmDzgQhZvwLhUzz3IuNy099wJ585fBNdwmo0GJwsq o2zOtxuu4CYzh+76DSSSEwgk= Received: from zn.tnic (pd9530d32.dip0.t-ipconnect.de [217.83.13.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 00D7040E0033; Sun, 25 Jun 2023 09:28:43 +0000 (UTC) Date: Sun, 25 Jun 2023 11:28:42 +0200 From: Borislav Petkov <bp@alien8.de> To: Linus Torvalds <torvalds@linux-foundation.org> Cc: x86-ml <x86@kernel.org>, lkml <linux-kernel@vger.kernel.org> Subject: [GIT PULL] objtool/urgent for v6.4 Message-ID: <20230625092842.GBZJgIyqJL/FtKW4nU@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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?1769668106121871795?= X-GMAIL-MSGID: =?utf-8?q?1769668106121871795?= |
Series |
[GIT,PULL] objtool/urgent for v6.4
|
|
Pull-request
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tags/objtool_urgent_for_v6.4Message
Borislav Petkov
June 25, 2023, 9:28 a.m. UTC
Hi Linus, please pull one urgent objtool fix for 6.4. Thx. --- The following changes since commit 858fd168a95c5b9669aac8db6c14a9aeab446375: Linux 6.4-rc6 (2023-06-11 14:35:30 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tags/objtool_urgent_for_v6.4 for you to fetch changes up to b9f174c811e3ae4ae8959dc57e6adb9990e913f4: x86/unwind/orc: Add ELF section with ORC version identifier (2023-06-16 17:17:42 +0200) ---------------------------------------------------------------- - Add a ORC format hash to vmlinux and modules in order for other tools which use it, to detect changes to it and adapt accordingly ---------------------------------------------------------------- Omar Sandoval (1): x86/unwind/orc: Add ELF section with ORC version identifier arch/x86/Makefile | 12 ++++++++++++ arch/x86/include/asm/Kbuild | 1 + arch/x86/include/asm/orc_header.h | 19 +++++++++++++++++++ arch/x86/kernel/unwind_orc.c | 3 +++ include/asm-generic/vmlinux.lds.h | 3 +++ scripts/mod/modpost.c | 5 +++++ scripts/orc_hash.sh | 16 ++++++++++++++++ 7 files changed, 59 insertions(+) create mode 100644 arch/x86/include/asm/orc_header.h create mode 100644 scripts/orc_hash.sh
Comments
On Sun, 25 Jun 2023 at 02:28, Borislav Petkov <bp@alien8.de> wrote: > > - Add a ORC format hash to vmlinux and modules in order for other tools > which use it, to detect changes to it and adapt accordingly Hmm. That "hash" is pretty horrendous. If I read that awk script right, it will change for things like whitespace changes (or comment changes) as long as they are around those magic #defines or the 'orc_entry' definition. I've pulled this, but it all seems pretty random and hacky. Linus
The pull request you sent on Sun, 25 Jun 2023 11:28:42 +0200:
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tags/objtool_urgent_for_v6.4
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/300edd751b102715dda0fe44b4bf8442f6ccf9db
Thank you!
On Sun, Jun 25, 2023 at 10:09:25AM -0700, Linus Torvalds wrote: > On Sun, 25 Jun 2023 at 02:28, Borislav Petkov <bp@alien8.de> wrote: > > > > - Add a ORC format hash to vmlinux and modules in order for other tools > > which use it, to detect changes to it and adapt accordingly > > Hmm. That "hash" is pretty horrendous. If I read that awk script > right, it will change for things like whitespace changes (or comment > changes) as long as they are around those magic #defines or the > 'orc_entry' definition. Yes, if those lines get tail comments or someone mucks about with the whitespace, the hash changes. The advantage is that if the thing changes we can't forget to increment a version number -- and this file hasn't had many changes. The current output looks like: $ awk '/^#define ORC_(REG|TYPE)_/ { print }/^struct orc_entry {$/ { p=1 }p { print }/^}/ { p=0 }' < arch/x86/include//asm/orc_types.h #define ORC_REG_UNDEFINED 0 #define ORC_REG_PREV_SP 1 #define ORC_REG_DX 2 #define ORC_REG_DI 3 #define ORC_REG_BP 4 #define ORC_REG_SP 5 #define ORC_REG_R10 6 #define ORC_REG_R13 7 #define ORC_REG_BP_INDIRECT 8 #define ORC_REG_SP_INDIRECT 9 #define ORC_REG_MAX 15 #define ORC_TYPE_UNDEFINED 0 #define ORC_TYPE_END_OF_STACK 1 #define ORC_TYPE_CALL 2 #define ORC_TYPE_REGS 3 #define ORC_TYPE_REGS_PARTIAL 4 struct orc_entry { s16 sp_offset; s16 bp_offset; #if defined(__LITTLE_ENDIAN_BITFIELD) unsigned sp_reg:4; unsigned bp_reg:4; unsigned type:3; unsigned signal:1; #elif defined(__BIG_ENDIAN_BITFIELD) unsigned bp_reg:4; unsigned sp_reg:4; unsigned unused:4; unsigned signal:1; unsigned type:3; #endif } __packed; $ I suppose we could add a lint pass to it to clean it up and make it more consistent, but I don't expect it would buy us much. In fact, then we have the build depend on the linter being present, which is a fairly big down-side. > I've pulled this, but it all seems pretty random and hacky. Thanks! So our concern was mostly about not being able to accidentally change things and not notice the change. If you want we can add an explicit comment to that file to be careful about things. Omar's purpose is to detect change, the occasional harmless change is better than not detecting change.