-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'objtool_urgent_for_v6.4' of git://git.kernel.org/pub/scm/l…
…inux/kernel/git/tip/tip Pull objtool fix from Borislav Petkov: - 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 * tag 'objtool_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/unwind/orc: Add ELF section with ORC version identifier
- Loading branch information
Showing
7 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
/* Copyright (c) Meta Platforms, Inc. and affiliates. */ | ||
|
||
#ifndef _ORC_HEADER_H | ||
#define _ORC_HEADER_H | ||
|
||
#include <linux/types.h> | ||
#include <linux/compiler.h> | ||
#include <asm/orc_hash.h> | ||
|
||
/* | ||
* The header is currently a 20-byte hash of the ORC entry definition; see | ||
* scripts/orc_hash.sh. | ||
*/ | ||
#define ORC_HEADER \ | ||
__used __section(".orc_header") __aligned(4) \ | ||
static const u8 orc_header[] = { ORC_HASH } | ||
|
||
#endif /* _ORC_HEADER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
|
||
set -e | ||
|
||
printf '%s' '#define ORC_HASH ' | ||
|
||
awk ' | ||
/^#define ORC_(REG|TYPE)_/ { print } | ||
/^struct orc_entry {$/ { p=1 } | ||
p { print } | ||
/^}/ { p=0 }' | | ||
sha1sum | | ||
cut -d " " -f 1 | | ||
sed 's/\([0-9a-f]\{2\}\)/0x\1,/g' |