Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove tools binaries from repo #2

Closed
wants to merge 1 commit into from
Closed

remove tools binaries from repo #2

wants to merge 1 commit into from

Conversation

sjenning
Copy link
Contributor

Signed-off-by: Seth Jennings sjenning@redhat.com

Signed-off-by: Seth Jennings <sjenning@redhat.com>
@sjenning sjenning closed this Feb 11, 2014
jpoimboe referenced this pull request in jpoimboe/kpatch Oct 4, 2014
When patching a kernel module, if we can't find a needed dynrela symbol,
it's either 1) exported or 2) provided by another .o in the patch
module.  This implements #2.
sm00th added a commit to sm00th/kpatch that referenced this pull request Feb 14, 2022
Yet another hack, which needs to be addressed properly. Without this create-diff-object segfaults in kpatch_is_core_module_symbol() trying
to compare rela->sym->name which has been zeroed by kelf_patched teardown.

 #0  0x00007ffff7f10c0e in __strcmp_avx2 () from /lib64/libc.so.6
 dynup#1  0x000000000040a09d in kpatch_is_core_module_symbol (name=0x0)
     at create-diff-object.c:3130
 dynup#2  0x000000000040a209 in need_dynrela (table=0x95c52c80,
     sec=0x95c52300, rela=0xa7648330)
     at create-diff-object.c:3186
 dynup#3  0x000000000040a463 in kpatch_create_intermediate_sections
     (kelf=0x4dbc940,
         table=0x95c52c80, objname=0x7fffffffd8a1 "vmlinux",
             pmod_name=0x7fffffffd8f9
             "livepatch_0001_cmdline_test_patch")
         at create-diff-object.c:3350
 dynup#4  0x000000000040c206 in main (argc=8, argv=0x7fffffffd428) at
     create-diff-object.c:3954

Signed-off-by: Artem Savkov <asavkov@redhat.com>
jpoimboe added a commit that referenced this pull request Apr 7, 2022
A seg fault was reported:

  Program received signal SIGSEGV, Segmentation fault.
  0x00007ffff7f18c8e in __strcmp_avx2 () from /lib64/libc.so.6
  Missing separate debuginfos, use: dnf debuginfo-install elfutils-libelf-0.186-1.fc34.x86_64 zlib-1.2.11-26.fc34.x86_64
  (gdb) bt
  #0  0x00007ffff7f18c8e in __strcmp_avx2 () from /lib64/libc.so.6
  #1  0x000000000040a0f7 in kpatch_is_core_module_symbol (name=0x0) at create-diff-object.c:3060
  #2  0x000000000040a267 in need_dynrela (kelf=0x4669a0, table=0x92af30, sec=0x6d6b20, rela=0x8c7fd0) at create-diff-object.c:3117
  #3  0x000000000040a4cc in kpatch_create_intermediate_sections (kelf=0x4669a0, table=0x92af30, objname=0x7fffffffcfc6 "vmlinux", pmod_name=0x7fffffffd020 "livepatch_a") at create-diff-object.c:3281
  #4  0x000000000040c7c5 in main (argc=8, argv=0x7fffffffca48) at create-diff-object.c:3931

It happened because 'rela->sym->name' was NULL, and
kpatch_is_core_module_symbol() tried to dereference it.

Here's the corresponding relocation:

  Relocation section [455] '.rela.debug_loclists' for section [454] '.debug_loclists' at offset 0xd0478 contains 2432 entries:
    Offset              Type            Value               Addend Name
    ...
    0x000000000000aad6  X86_64_64       000000000000000000     +32 .LC55
    ...

That '.LC55' symbol lives in the following section:

  [104] .rodata.btf_show_end_aggr_type.str1.8 PROGBITS     0000000000000000 00003ef0 00000021  1 AMS    0   0  8

The problem is that the symbol wasn't included in the output file
(though its corresponding section was).  So it got zeroed by
kpatch_elf_teardown(), which was designed to trigger seg faults to help
find bugs like this.

The string literal sections which hold the '.LCx' string symbols are
already being included.  Include their symbols as well.

Fixes #1257.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
wardenjohn pushed a commit to wardenjohn/kpatch that referenced this pull request Dec 13, 2023
This is a combination of 2 commits.
This is the 1st commit message:

Support Anolis OS in a more elegant way

There are many different distribution of linux kernel.
However, it may not be good to support one new distribution
just by adding a judgment condition. Therefore, I move it into
a function. In the future, if a new distribution need to be supported,
it may be more elegant.

This is the commit message dynup#2:

fix the bug of wrong shell condition and contains more distro

This commit fix the fowlling problem:
1. move SUPPORTED_DISTRO to SUPPORTED_RPM_DISTROS
2. fix the wrong ID of "Anolis" to "anolis" in SUPPORTED_RPM_DISTROS
3. change distro in function to local variable
4. rename is_supported_distro to is_supported_rpm_distro; print_supported_distro
to print_supported_rpm_distro
5. fix the bug of return value of is_supported_rpm_distro
6. contains ubuntu and debian release in print_supported_rpm_distro, and adjust the vmlinux search logic at the same time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant