With CONFIG_CLANG_LTO, clang generates LLVM IR instead of ELF object
files. As empty.o is used for probing target properties, disable LTO
for it to produce an object file instead.
Signed-off-by: Sami Tolvanen
---
scripts/mod/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts
GNU gold may require different flags than GNU ld. Add a macro for
detecting the linker and conditionally add gold specific flags from
LDFLAGS_GOLD.
Signed-off-by: Sami Tolvanen
---
Makefile | 5 +
scripts/Kbuild.include | 4
2 files changed, 9 insertions(+)
diff --git a
when
RANDOMIZE_MODULE_REGION_FULL is selected,
2) and disables RANDOMIZE_MODULE_REGION_FULL with clang LTO.
Signed-off-by: Sami Tolvanen
---
arch/arm64/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 43ccddb7c8ec..a301fdc90319 1
CONFIG_CLANG_LTO requires the use of clang's integrated assembler, which
doesn't understand the inline assembly in aes-ce-cipher.c. Disable LTO for
the file to work around the issue.
Signed-off-by: Sami Tolvanen
---
arch/arm64/crypto/Makefile | 2 +-
1 file changed, 1 insertion(+),
when
RANDOMIZE_MODULE_REGION_FULL is selected,
2) and disables RANDOMIZE_MODULE_REGION_FULL with clang LTO.
Signed-off-by: Sami Tolvanen
---
arch/arm64/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 43ccddb7c8ec..a301fdc90319 1
9
As binutils doesn't allow macros to be redefined, this change adds C
preprocessor macros that define the assembly macros globally for binutils
and locally for clang's integrated assembler.
Suggested-by: Greg Hackmann
Suggested-by: Nick Desaulniers
Signed-off-by: Sami Tolvanen
---
arc
Allow CONFIG_CLANG_LTO to be enabled for the architecture.
Signed-off-by: Sami Tolvanen
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a301fdc90319..6ae31f0c58ee 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
CONFIG_CLANG_LTO depends on GNU gold, which can generate ADR_PREL_PG_HI21
relocations even with --fix-cortex-a53-843419.
Since ARM64_ERRATUM_843419 disables kernel support for these relocations,
disable the erratum when LTO is used.
Signed-off-by: Sami Tolvanen
---
arch/arm64/Kconfig | 1 +
1
9
As binutils doesn't allow macros to be redefined, this change adds C
preprocessor macros that define the assembly macros globally for binutils
and locally for clang's integrated assembler.
Suggested-by: Greg Hackmann
Suggested-by: Nick Desaulniers
Signed-off-by: Sami Tolvanen
---
arc
e the erratum fix is not
used even if the linker is configured to enable it by default.
Signed-off-by: Sami Tolvanen
---
arch/arm64/Makefile | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index c16bd1ab37f8..0c1fb297c98e 100644
--- a/arch/arm64/Mak
e the erratum fix is not
used even if the linker is configured to enable it by default.
Signed-off-by: Sami Tolvanen
---
arch/arm64/Makefile | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index c16bd1ab37f8..0c1fb297c98e 100644
--- a/arch/arm64/Mak
Make sure the linker doesn't remove .altinstructions or
.altinstr_replacement when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is
enabled.
Signed-off-by: Sami Tolvanen
---
arch/arm64/kernel/vmlinux.lds.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/k
This change fixes the following error message when linking with GNU
gold:
ld.gold: error: unrecognized emulation aarch64linux
Signed-off-by: Sami Tolvanen
---
arch/arm64/Makefile | 4
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index
C=clang LD=ld.gold LD_FINAL_VMLINUX=ld
Recommended versions are >= 5.0 for clang, and >= 2.27 for binutils.
Signed-off-by: Sami Tolvanen
---
.gitignore | 2 ++
Makefile | 16 -
arch/Kconfig | 32 +
scripts/Makef
From: Greg Hackmann
LLVM bug 30792 causes clang's AArch64 backend to crash compiling
arch/arm64/crypto/aes-ce-cipher.c. Replacing -mgeneral-regs-only with
-mno-implicit-float is the suggested workaround.
Signed-off-by: Greg Hackmann
Cc: Matthias Kaehlcke
Signed-off-by: Sami Tol
With CONFIG_CLANG_LTO, we produce LLVM IR instead of object files. Since LTO
is not really needed here and the Makefile assumes we produce an object file,
disable LTO for libstub.
Signed-off-by: Sami Tolvanen
---
drivers/firmware/efi/libstub/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1
gnore, and
a __norecordmcount attribute for moving functions to this section.
Signed-off-by: Sami Tolvanen
---
arch/Kconfig | 2 +-
include/asm-generic/vmlinux.lds.h | 2 +-
include/linux/compiler-clang.h| 7 +++
include/linux/compiler.h | 4
kernel/
With CONFIG_CLANG_LTO, we produce LLVM IR instead of object files. Since LTO
is not really needed here and the Makefile assumes we produce an object file,
disable LTO for libstub.
Signed-off-by: Sami Tolvanen
---
drivers/firmware/efi/libstub/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1
Don't remove .head.text or .exitcall.exit when linking with --gc-sections,
and include .init.text.* in .init.text and .init.rodata.* in .init.rodata.
Signed-off-by: Sami Tolvanen
---
include/asm-generic/vmlinux.lds.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --
ld issues
with KASLR, for example.
Greg Hackmann (1):
arm64: use -mno-implicit-float instead of -mgeneral-regs-only
Sami Tolvanen (14):
kbuild: add ld-name macro and support for GNU gold
kbuild: fix LD_DEAD_CODE_DATA_ELIMINATION with GNU gold
kbuild: add support for clang LTO
kbuild: fix
On Fri, Nov 03, 2017 at 05:51:56PM +, Mark Rutland wrote:
> Which tree are you testing with?
I've tested that this builds on top of Linus' current tree.
> I had to create an aarch64-linux-gnu-clang wrapper, too. I'm not sure if
> there's build system help to avoid needing that?
This appears
On Fri, Nov 03, 2017 at 07:26:35PM +, Mark Rutland wrote:
> I guess that in Google you haven't tested on a platform with EL2
> available?
Correct. I'll look into this and include a fix in v2. Does this work on a
clang build without LTO?
Sami
On Fri, Nov 03, 2017 at 12:06:15PM -0700, Kees Cook wrote:
> Should a clang version test be included, since we know at least 5.0 is
> need (with this fix)? There are distros with much earlier versions of
> clang, for example...
Greg knows better, but I remember him mentioning that upstream clang
d
On Fri, Nov 03, 2017 at 08:09:42PM +, Ard Biesheuvel wrote:
> This is not true. Even when RANDOMIZE_MODULE_REGION_FULL is not
> enabled, we may need module PLTs.
Got it. PLTs themselves are not a problem with gold, only the bug when
processing a linker script of this particular format. I'll se
On Fri, Nov 03, 2017 at 11:41:57PM +0300, Yury Norov wrote:
> Also, IIUC, this patch is not related to LTO, because if ld.gold doesn't
> recognize -maarch64linux with LTO, it will not recognize it in non-LTO
> build. Am I right?
That's correct. ld.gold --help says -m is obsolete, but at the same t
On Mon, Apr 9, 2018 at 10:02 AM Greg Hackmann wrote:
> Sami, what are the plans for upstreaming this work?
CFI is a clang-specific feature that depends on LTO. Based on the earlier
LTO discussion, we decided to collect some more evidence that clang's LTO
doesn't actually break anything in the ker
:
VCPU:000804fc20001221
This change adds -fno-jump-tables to arm64/hyp to work around the
bug.
Suggested-by: AKASHI Takahiro
Signed-off-by: Sami Tolvanen
---
arch/arm64/kvm/hyp/Makefile | 4
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/kvm/hyp/Makefile b/arch
set_reset_devices() to the variable .init.text:$x.0
This change adds a call to is_valid_name to find_elf_symbol, similarly
to how it's already used in find_elf_symbol2.
Signed-off-by: Sami Tolvanen
---
scripts/mod/modpost.c | 50 ++-
1 file changed, 26 inser
const char *name)
> +{
> + /*
> +* Since all syscall functions have __riscv_ prefix, we must skip it.
> +* However, as we described above, we decided to ignore compat
> +* syscalls, so we don't care about __riscv_compat_ prefix here.
> +*/
> + return !strcmp(sym + 8, name);
> +}
Good catch, thanks for fixing this!
Reviewed-by: Sami Tolvanen
Sami
compatibility.
Signed-off-by: Sami Tolvanen
---
tools/Makefile | 11 +--
tools/gendwarfksyms/Build | 2 +
tools/gendwarfksyms/Makefile| 49 +++
tools/gendwarfksyms/gendwarfksyms.c | 128
tools/gendwarfksyms
l.org/lkml/2023061155.1349375-1-g...@garyguo.net/
[2]
https://lore.kernel.org/rust-for-linux/20231118025748.2778044-1-mmau...@google.com/
[3]
https://lore.kernel.org/rust-for-linux/cagsqo005hriuzdeppcifdqg9zfdjrwahpble4x7-myfjscn...@mail.gmail.com/
Sami
Sami Tolvanen (15):
tools: Add gen
ols, where only one name appears in the
debugging information.
Signed-off-by: Sami Tolvanen
---
tools/gendwarfksyms/Build | 1 +
tools/gendwarfksyms/gendwarfksyms.c | 2 +
tools/gendwarfksyms/gendwarfksyms.h | 17
tools/gendwarfksyms/symbols.c
emove13assert_failed
0x985f94dd
...
Note that type strings are not yet expanded, so the CRCs can only
distinguish between functions and variables for now.
Signed-off-by: Sami Tolvanen
---
tools/gendwarfksyms/Build | 1 +
tools/gendwarfksyms/crc32.c | 69
ug vmlinux.o
Output:
gendwarfksyms: symbol_read_list: adding { 4b0, "loops_per_jiffy" }
gendwarfksyms: process_modules: vmlinux.o
gendwarfksyms: process_exported_symbols: loops_per_jiffy (@ 4b0)
variable base_type unsigned long byte_size(8);
#SYMVER loops_per_jiffy 0xc694aefc
Signed-off
Basic types in DWARF repeat frequently and traversing the DIEs using
libdw is relatively slow. Add a simple hashtable based cache for the
processed DIEs.
Signed-off-by: Sami Tolvanen
---
tools/gendwarfksyms/Build | 1 +
tools/gendwarfksyms/cache.c | 147
Add support for expanding DWARF type modifiers, such as pointers,
const values etc., and typedefs. These types all have DW_AT_type
attribute pointing the underlying type, and thus produce similar
output.
Signed-off-by: Sami Tolvanen
---
tools/gendwarfksyms/gendwarfksyms.h | 3 ++
tools
byte_size(1)};
Signed-off-by: Sami Tolvanen
---
tools/gendwarfksyms/cache.c | 13 +
tools/gendwarfksyms/gendwarfksyms.c | 3 +++
tools/gendwarfksyms/gendwarfksyms.h | 5 -
tools/gendwarfksyms/types.c | 22 ++
4 files changed, 42 insertions(+), 1
oid;
Signed-off-by: Sami Tolvanen
---
tools/gendwarfksyms/gendwarfksyms.h | 1 +
tools/gendwarfksyms/types.c | 58 -
2 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/tools/gendwarfksyms/gendwarfksyms.h
b/tools/gendwarfksyms/gendwarfksyms.h
in
Add support for expanding DW_TAG_array_type, and the subrange type
indicating array size.
Example output with --debug:
variable array_type [34] {
pointer_type {
const_type {
base_type char byte_size(1)
}
}
};
Signed-off-by: Sami Tolvanen
---
tools
levels
inside the pointer. This should be plenty for catching ABI differences
and stops us from pulling in half the kernel for structs that contain
pointers to large structs like task_struct.
Signed-off-by: Sami Tolvanen
---
tools/gendwarfksyms/cache.c | 49
tools
Understanding the operation and caching of the tool can be somewhat
challenging without a debugger. Add inline debugging information with
the --inline-debug command, which adds highlighted tags to the --debug
output with information about cache states etc.
Signed-off-by: Sami Tolvanen
---
tools
if needed.
Suggested-by: Matthew Maurer
Signed-off-by: Sami Tolvanen
---
scripts/mod/Makefile | 4 +-
scripts/mod/modpost.c | 20 ++-
scripts/mod/modpost.h | 20 +++
scripts/mod/symhash.c | 327 ++
4 files changed, 364 insertions(+), 7 deletions(-)
When checking modversions for symbol names longer than MODULE_NAME_LEN,
look for the hashed symbol name instead. This is needed for Rust modules,
which frequently use symbol names longer than the maximum length
supported by struct modversion_info.
Suggested-by: Matthew Maurer
Signed-off-by: Sami
Use gendwarfksyms to generate symbol versions for exported Rust symbols,
and allow CONFIG_MODVERSIONS to be enabled with CONFIG_RUST, assuming the
debugging information needed by gendwarfksyms is also available.
Signed-off-by: Sami Tolvanen
---
Makefile | 6 ++
init/Kconfig | 2
e_type void;
Signed-off-by: Sami Tolvanen
---
tools/gendwarfksyms/gendwarfksyms.h | 5 ++
tools/gendwarfksyms/types.c | 127 +++-
2 files changed, 130 insertions(+), 2 deletions(-)
diff --git a/tools/gendwarfksyms/gendwarfksyms.h
b/tools/gendwarfksyms/gend
Hi Masahiro,
On Wed, Jun 19, 2024 at 01:28:21AM +0900, Masahiro Yamada wrote:
> I am surprised at someone who attempts to add another variant of genksyms.
The options are rather limited if we want Rust modules that are
compatible with modversions. We either come up with a way to version
Rust symb
On Wed, Jun 19, 2024 at 01:47:13AM +0900, Masahiro Yamada wrote:
> On Tue, Jun 18, 2024 at 2:58 AM Sami Tolvanen wrote:
> >
> > +#define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory")
>
>
>
>
> I know this is a copy-
On Wed, Jun 19, 2024 at 04:03:45AM +0900, Masahiro Yamada wrote:
> On Wed, Jun 19, 2024 at 2:18 AM Greg Kroah-Hartman
> wrote:
> >
> > On Wed, Jun 19, 2024 at 01:50:36AM +0900, Masahiro Yamada wrote:
> > > On Wed, Jun 19, 2024 at 1:44 AM Greg Kroah-Hartman
> > > wrote:
> > > >
> > > > That's cool
Hi Luis,
On Tue, Jun 18, 2024 at 12:42:51PM -0700, Luis Chamberlain wrote:
> On Mon, Jun 17, 2024 at 05:58:19PM +0000, Sami Tolvanen wrote:
> > The first 12 patches of this series add a small tool for computing
> > symbol versions from DWARF, called gendwarfksyms. When passe
Hi Luis,
On Fri, Jun 28, 2024 at 10:36 AM Luis Chamberlain wrote:
>
> On Fri, Jun 28, 2024 at 02:23:49PM +0200, Miroslav Benes wrote:
> > On Fri, 7 Jun 2024, Song Liu wrote:
> >
> > > Hi Miroslav,
> > >
> > > Thanks for reviewing the patch!
> > >
> > > I think it is possible. Currently, kallsyms_
On Mon, Jul 8, 2024 at 2:33 PM Luis Chamberlain wrote:
>
> Looking at this again its not to me why Masahiro Yamada's suggestion on
> that old patch series to just increase the length and put long symbols
> names into its own section [0] could not be embraced with a new kconfig
> option, so new ker
Hi Petr,
On Wed, Jul 10, 2024 at 7:30 AM Petr Pavlu wrote:
>
> On 6/17/24 19:58, Sami Tolvanen wrote:
> > Hi folks,
> >
> > This series implements CONFIG_MODVERSIONS for Rust, an important
> > feature for distributions like Android that want to ship Rust
>
On Tue, Jul 16, 2024 at 12:12 AM Greg Kroah-Hartman
wrote:
>
> > After replacement:
> >
> > union {
> > u64 new_member;
> > struct {
> > u8 __kabi_reserved_1[8];
> > };
> > }
>
> Note, such a thing would only be for the distros that w
Hi Luis,
On Thu, Jul 18, 2024 at 5:15 PM Luis Chamberlain wrote:
>
> On Tue, Jul 09, 2024 at 12:08:16PM +0200, Miguel Ojeda wrote:
> > On Mon, Jul 8, 2024 at 11:42 PM Luis Chamberlain wrote:
> > >
> > > The rationale here is that a rust binding means commitment then also
> > > from fresh blood t
Hi Petr,
On Mon, Jul 22, 2024 at 8:20 AM Petr Pavlu wrote:
>
> From my perspective, I'm okay if gendwarfksyms doesn't provide
> functionality to compare a new object file with its reference symtypes
> file.
>
> As mentioned, genksyms has this functionality but I actually think the
> way it works
Hi Petr,
On Thu, Aug 1, 2024 at 4:22 AM Petr Pavlu wrote:
>
> STG is an interesting tool. I've played with it a bit last year. To be
> frank, I was surprised to see a new tool being proposed by Google to
> generate modversion CRCs from DWARF instead of potentially extending
> your STG project for
Hi,
On Wed, Aug 7, 2024 at 3:08 AM Masami Hiramatsu wrote:
>
> On Wed, 7 Aug 2024 00:19:20 +
> Song Liu wrote:
>
> > Do you mean we do not want patch 3/3, but would like to keep 1/3 and part
> > of 2/3 (remove the _without_suffix APIs)? If this is the case, we are
> > undoing the change by S
anges in the first
place, this series looks reasonable to me. Thanks for cleaning this
up!
Reviewed-by: Sami Tolvanen
Sami
data structure fields and declaration-onl
structures. Also added examples for using these features.
- Added a GENDWARFKSYMS option and hooked up kbuild support
for both C and assembly code. Note that with gendwarfksyms,
we have to actually build a temporary .o file for calculating
assem
Add a basic DWARF parser, which uses libdw to traverse the debugging
information in an object file and looks for functions and variables.
In follow-up patches, this will be expanded to produce symbol versions
for CONFIG_MODVERSIONS from DWARF.
Signed-off-by: Sami Tolvanen
---
kernel/module
Add support for passing a list of exported symbols to gendwarfksyms
via stdin and filter out non-exported symbols from the output.
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/Makefile| 1 +
scripts/gendwarfksyms/dwarf.c | 53 ++-
scripts/gendwarfksyms
d-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/gendwarfksyms.c | 2 +
scripts/gendwarfksyms/gendwarfksyms.h | 7 ++
scripts/gendwarfksyms/symbols.c | 161 +-
3 files changed, 165 insertions(+), 5 deletions(-)
diff --git a/scripts/gendwarfksyms/gendwarfksyms
xternal_symbol);
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/dwarf.c | 26 +-
scripts/gendwarfksyms/gendwarfksyms.h | 6 ++
scripts/gendwarfksyms/symbols.c | 16
3 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/scripts
base_type unsigned long byte_size(8) encoding(7);
...
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/dwarf.c | 121 +-
1 file changed, 120 insertions(+), 1 deletion(-)
diff --git a/scripts/gendwarfksyms/dwarf.c b/scripts/gendwarfksyms/dwarf.c
index
-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/die.c | 13 +
scripts/gendwarfksyms/dwarf.c | 76 +--
scripts/gendwarfksyms/gendwarfksyms.h | 7 ++-
3 files changed, 92 insertions(+), 4 deletions(-)
diff --git a/scripts/gendwarfksyms/die.c b/scripts
Basic types in DWARF repeat frequently and traversing the DIEs using
libdw is relatively slow. Add a simple hashtable based cache for the
processed DIEs.
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/Makefile| 1 +
scripts/gendwarfksyms/die.c | 170
ype void;
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/dwarf.c | 57 ++-
scripts/gendwarfksyms/gendwarfksyms.h | 1 +
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/scripts/gendwarfksyms/dwarf.c b/scripts/gendwarfksyms/dwarf.c
in
(8)
};
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/dwarf.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/scripts/gendwarfksyms/dwarf.c b/scripts/gendwarfksyms/dwarf.c
index c81652426be8..4ec69fce95f3 100644
--- a/scripts/gendwarfksyms/dwarf.c
&str {
member pointer_type {
base_type u8 byte_size(1) encoding(7)
} data_member_location(0),
member base_type usize byte_size(8) encoding(7) data_member_location(8),
} byte_size(16) alignment(8)
},
)
-> base_type void;
Signed-off-by: Sami Tolvanen
-
levels. This should be plenty for detecting ABI
differences, but it stops us from pulling in half the kernel for
types that contain pointers to large kernel data structures, like
task_struct, for example.
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/Makefile| 1 +
scripts
.
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/dwarf.c | 19 +--
scripts/gendwarfksyms/gendwarfksyms.c | 9 +
scripts/gendwarfksyms/gendwarfksyms.h | 14 ++
3 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/scripts/gendwarfksyms
references are
wrapped in single quotes. E.g.:
s#'core::result::Result'
2. The actual type definition is the simple parsed DWARF format we
output with --dump-dies, not the preprocessed C-style format
genksyms produces.
Signed-off-by: Sami Tolvanen
---
scripts/gen
Add a basic CRC32 implementation adapted from genksyms, and produce
matching output from symtypes strings in type_map.
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/Makefile| 1 +
scripts/gendwarfksyms/crc32.c | 69 ++
scripts/gendwarfksyms/crc32.h
g --stable, the definition is ignored and we again
have the original symbol version:
subprogram(
formal_parameter pointer_type {
structure_type struct0 {
}
} byte_size(8),
)
-> base_type int byte_size(4) encoding(5);
#SYMVER func 0x7e8284f9
Signed-off-b
g int byte_size(8) encoding(5) data_member_location(0),
member base_type long int byte_size(8) encoding(5) data_member_location(8),
} byte_size(16);
#SYMVER exported 0x67997f89
Signed-off-by: Sami Tolvanen
---
scripts/gendwarfksyms/dwarf.c | 148 +-
sc
igned-off-by: Sami Tolvanen
---
include/linux/export.h | 15 +++
1 file changed, 15 insertions(+)
diff --git a/include/linux/export.h b/include/linux/export.h
index 0bbd02fd351d..cf71d3202e5b 100644
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -52,9 +52,24 @@
refers to struct pt_regs, make sure it's visible.
Signed-off-by: Sami Tolvanen
---
arch/x86/include/asm/asm-prototypes.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/asm-prototypes.h
b/arch/x86/include/asm/asm-prototypes.h
index 25466c4d2134..c82e68c8b7c2 1
When MODVERSIONS is enabled, allow selecting gendwarfksyms as the
implementation, but default to genksyms.
Signed-off-by: Sami Tolvanen
---
kernel/module/Kconfig | 25 -
scripts/Makefile | 2 +-
scripts/Makefile.build | 34 --
3
Hi Matt,
On Tue, Aug 6, 2024 at 9:25 PM Matthew Maurer wrote:
>
[...]
> +void modversion_ext_start(const struct load_info *info,
> + struct modversion_info_ext *start)
> +{
> + unsigned int crc_idx = info->index.vers_ext_crc;
> + unsigned int name_idx = info->i
Hi Sedat,
On Thu, Aug 15, 2024 at 8:14 PM Sedat Dilek wrote:
>
> so this work is on top of Linux v6.11-rc3
Correct. git format-patch also adds the base commit to the end of the
cover letter.
> can you tag it as gendwarfksyms-v2?
Sure. Here you go:
https://github.com/samitolvanen/linux/commits
Hi Greg,
On Fri, Aug 16, 2024 at 12:20 AM Greg Kroah-Hartman
wrote:
>
> On Thu, Aug 15, 2024 at 05:39:20PM +, Sami Tolvanen wrote:
> > Distributions that want to maintain a stable kABI need the ability to
> > add reserved fields to kernel data structures that they anti
Hi Benno,
On Sat, Aug 17, 2024 at 01:19:55PM +, Benno Lossin wrote:
>
> For this use-case (the one in the patch), I don't really know if we want
> to copy the approach from C. Do we even support exporting kABI from
> Rust? If yes, then we I would recommend we tag it in the source code
> inste
On Tue, Aug 20, 2024 at 3:48 AM Mark Rutland wrote:
>
> On Tue, Aug 20, 2024 at 10:03:30AM +0900, Masami Hiramatsu wrote:
> > On Mon, 19 Aug 2024 12:02:44 -0400
> > Steven Rostedt wrote:
> >
> > > On Tue, 20 Aug 2024 00:56:49 +0900
> > > Masami Hiramatsu (Google) wrote:
> > > >
> > > > >
> > > >
On Mon, Aug 19, 2024 at 10:17 PM Benno Lossin wrote:
>
> On 19.08.24 21:38, Sami Tolvanen wrote:
> >
> > This definitely looks cleaner than unions in Rust, but how would this
> > scheme be visible in DWARF? You might also need to expand the annotation
> > to allo
On Tue, Aug 20, 2024 at 5:21 PM Masami Hiramatsu wrote:
>
> On Wed, 21 Aug 2024 08:43:51 +0900
> Masami Hiramatsu (Google) wrote:
>
> > On Tue, 20 Aug 2024 18:11:09 -0400
> > Steven Rostedt wrote:
> >
> > > On Wed, 21 Aug 2024 07:05:39 +0900
> > > Masami Hiramatsu (Google) wrote:
> > >
> > >
>
On Wed, Aug 21, 2024 at 4:31 AM Benno Lossin wrote:
>
> On 20.08.24 22:03, Matthew Maurer wrote:
> >>> The way `KAbiReserved` is implemented is via a `union` (maybe a bit
> >>> ironic, considering what I said in my other replies, but in this case,
> >>> we would provide a safe abstraction over thi
t and C code for modules so we can ensure we get proper
> reviews for both parts of the code and so that we can scale.
>
> Add those who have stepped up to help.
>
> Signed-off-by: Luis Chamberlain
Acked-by: Sami Tolvanen
Sami
Hi Jon,
On Thu, Aug 22, 2024 at 9:43 AM Jonathan Corbet wrote:
>
> Sami Tolvanen writes:
>
> > The first 16 patches of this series add a small tool for computing
> > symbol versions from DWARF, called gendwarfksyms. When passed a
> > list of exported symbols a
Hi Kris,
On Thu, Aug 22, 2024 at 02:19:39PM -0400, Kris Van Hees wrote:
> diff --git a/scripts/generate_builtin_ranges.awk
> b/scripts/generate_builtin_ranges.awk
> new file mode 100755
> index ..68df05fd3036
> --- /dev/null
> +++ b/scripts/generate_builtin_ranges.awk
> @@ -0,0 +1,505
On Fri, Aug 23, 2024 at 10:06 AM Kris Van Hees wrote:
>
> On Fri, Aug 23, 2024 at 04:53:29PM +, Sami Tolvanen wrote:
> > Hi Kris,
> >
> > On Thu, Aug 22, 2024 at 02:19:39PM -0400, Kris Van Hees wrote:
> > > diff --git a/scripts/generate_bu
On Thu, Aug 22, 2024 at 11:53 PM Greg Kroah-Hartman
wrote:
>
> On Thu, Aug 22, 2024 at 12:00:15PM +, Benno Lossin wrote:
> > > Here's one example in the android tree where 4 64bit fields are reserved
> > > for future abi changes:
> > >
> > > https://android.googlesource.com/kernel/common/
Hi Petr,
On Mon, Aug 26, 2024 at 10:42 AM Petr Pavlu wrote:
>
> On 8/15/24 19:39, Sami Tolvanen wrote:
> > +static int parse_options(int argc, const char **argv)
> > +{
> > + for (int i = 1; i < argc; i++) {
> > + bool flag = false;
> >
Hi Greg,
On Fri, Aug 16, 2024 at 12:14 AM Greg Kroah-Hartman
wrote:
>
> On Thu, Aug 15, 2024 at 05:39:05PM +, Sami Tolvanen wrote:
> > --- /dev/null
> > +++ b/scripts/gendwarfksyms/dwarf.c
> > @@ -0,0 +1,87 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later
&g
Hi Petr,
On Tue, Aug 27, 2024 at 2:16 AM Petr Pavlu wrote:
>
> On 8/15/24 19:39, Sami Tolvanen wrote:
> > +static bool is_export_symbol(struct state *state, Dwarf_Die *die)
> > +{
> > + Dwarf_Die *source = die;
> > + Dwarf_Die origin;
> > +
> &
Hi Petr,
On Tue, Aug 27, 2024 at 12:40 PM Petr Pavlu wrote:
>
> On 8/15/24 19:39, Sami Tolvanen wrote:
> > +static inline u32 symbol_addr_hash(const struct symbol_addr *addr)
> > +{
> > + return jhash(addr, sizeof(struct symbol_addr), 0);
>
> I would be c
On Wed, Aug 28, 2024 at 02:31:05PM +0200, Petr Pavlu wrote:
> On 8/26/24 20:47, Sami Tolvanen wrote:
> > How do you propose using the function? This loop goes through multiple
> > input files, should we need them, and we iterate through all the CUs
> > in process_modules.
&
Hi Masahiro,
On Thu, Aug 29, 2024 at 02:45:03AM +0900, Masahiro Yamada wrote:
> On Fri, Aug 16, 2024 at 2:39 AM Sami Tolvanen wrote:
> > +static int usage(void)
> > +{
> > + error("usage: gendwarfksyms [options] elf-object-file ...");
>
>
>
>
On Thu, Aug 29, 2024 at 03:16:21AM +0900, Masahiro Yamada wrote:
> On Fri, Aug 16, 2024 at 2:39 AM Sami Tolvanen wrote:
> > @@ -105,6 +105,8 @@ int main(int argc, const char **argv)
> > if (parse_options(argc, argv) < 0)
> > return usage(
On Thu, Aug 29, 2024 at 03:22:25AM +0900, Masahiro Yamada wrote:
> On Fri, Aug 16, 2024 at 2:39 AM Sami Tolvanen wrote:
> > int symbol_read_exports(FILE *file)
> > @@ -57,13 +93,14 @@ int symbol_read_exports(FILE *file)
> >
On Wed, Aug 28, 2024 at 04:15:03PM +0900, Masahiro Yamada wrote:
> On Wed, Aug 28, 2024 at 3:50 PM Masahiro Yamada wrote:
> >
> > On Fri, Aug 16, 2024 at 2:39 AM Sami Tolvanen
> > wrote:
> > >
> > > The compiler may choose not to emit type information in
1 - 100 of 1035 matches
Mail list logo