public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
                   ` (9 preceding siblings ...)
  2019-01-01  0:00 ` [Bug default/24431] abidw " dodji at redhat dot com
@ 2019-01-01  0:00 ` dodji at seketeli dot org
  10 siblings, 0 replies; 13+ messages in thread
From: dodji at seketeli dot org @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

--- Comment #8 from dodji at seketeli dot org ---
Hello,

I am just curious.  Is this fixed by the patchset at
https://sourceware.org/ml/libabigail/2019-q2/msg00084.html or is there
still something missing?

Cheers,

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 ` maennich at google dot com
@ 2019-01-01  0:00   ` Dodji Seketeli
  0 siblings, 0 replies; 13+ messages in thread
From: Dodji Seketeli @ 2019-01-01  0:00 UTC (permalink / raw)
  To: maennich at google dot com; +Cc: libabigail

Hello,

I am just curious.  Is this fixed by the patchset at
https://sourceware.org/ml/libabigail/2019-q2/msg00084.html or is there
still something missing?

Cheers,

-- 
		Dodji

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
                   ` (3 preceding siblings ...)
  2019-01-01  0:00 ` maennich at google dot com
@ 2019-01-01  0:00 ` maennich at google dot com
  2019-01-01  0:00   ` Dodji Seketeli
  2019-01-01  0:00 ` dodji at redhat dot com
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 13+ messages in thread
From: maennich at google dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

--- Comment #6 from Matthias Maennich <maennich at google dot com> ---
Created attachment 11764
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11764&action=edit
minimal arm64 vmlinux

Somehow, this broke arm64 support when enabling "Loadable Module Support".

This the minimal way of reproducing the issue that I could find so far. It
requires a cross compiler to be present. On Debian, installing
'gcc-aarch64-linux-gnu' was sufficient.

I used v4.19, but could also reproduce with mainline.

$ git checkout v4.19
$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-linux-gnu-
$ make allnoconfig && scripts/config --file .config -e DEBUG_INFO && make
olddefconfig && make vmlinux

$ abidw vmlinux     # that works

Now enable modules:

$ scripts/config --file .config -e MODULES && make olddefconfig && make vmlinux

$ abidw vmlinux
in get_ksymtab_format at: abg-dwarf-reader.cc:7282: execution should not have
reached this point!
[1]    230211 abort      abidw vmlinux

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] abidw can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
@ 2019-01-01  0:00 ` maennich at google dot com
  2019-01-01  0:00 ` [Bug default/24431] ELF reader " maennich at google dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: maennich at google dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

--- Comment #1 from Matthias Maennich <maennich at google dot com> ---
abidw --no-linux-kernel-mode still works, but obviously treats vmlinux as a
non-kernel binary.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] abidw can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
                   ` (8 preceding siblings ...)
  2019-01-01  0:00 ` [Bug default/24431] ELF reader " dodji at redhat dot com
@ 2019-01-01  0:00 ` dodji at redhat dot com
  2019-01-01  0:00 ` [Bug default/24431] ELF reader " dodji at seketeli dot org
  10 siblings, 0 replies; 13+ messages in thread
From: dodji at redhat dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

--- Comment #2 from dodji at redhat dot com ---
Yeah, I can see this now.  So the format of the __ksymtab section changed since
that commit that you identified, and of course, I wasn't aware at all.  Thanks
for spotting that.

I guess we need to update how we read that section in the DWARF/ELF reader
then.  I am looking into this.

Thanks for reporting this!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
                   ` (5 preceding siblings ...)
  2019-01-01  0:00 ` dodji at redhat dot com
@ 2019-01-01  0:00 ` maennich at google dot com
  2019-01-01  0:00 ` [Bug default/24431] abidw " dodji at redhat dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: maennich at google dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

Matthias Maennich <maennich at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #7 from Matthias Maennich <maennich at google dot com> ---
reopening due to previous comment

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
                   ` (7 preceding siblings ...)
  2019-01-01  0:00 ` [Bug default/24431] abidw " dodji at redhat dot com
@ 2019-01-01  0:00 ` dodji at redhat dot com
  2019-01-01  0:00 ` [Bug default/24431] abidw " dodji at redhat dot com
  2019-01-01  0:00 ` [Bug default/24431] ELF reader " dodji at seketeli dot org
  10 siblings, 0 replies; 13+ messages in thread
From: dodji at redhat dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|abidw can't interpret       |ELF reader can't interpret
                   |ksymtab with Kernel 4.19+   |ksymtab with Kernel 4.19+

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
                   ` (4 preceding siblings ...)
  2019-01-01  0:00 ` maennich at google dot com
@ 2019-01-01  0:00 ` dodji at redhat dot com
  2019-01-01  0:00 ` maennich at google dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: dodji at redhat dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from dodji at redhat dot com ---
(In reply to Matthias Maennich from comment #4)
> Looks like it fixes the issue for 4.19. Unfortunately, now earlier (here
> 4.9) kernels seem to be broken in the same way as 4.19 was before.

Right.  So it looks like assuming that a kernel without relocations for the
__ksymtab is not sufficient to assume that the __ksymtab section is in the
v4.19 format, because there can be kernels built without relocation, e.g,
non-relocatable kernels.

So I wrote and checked in a new heuristic into the master branch of the git
repository at
https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=f9b2f3751262f4695a46994b96b74a6a37419b54.

This should hopefully work better.

Thanks for following up on this and sorry again for the inconvenience.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+
@ 2019-01-01  0:00 maennich at google dot com
  2019-01-01  0:00 ` [Bug default/24431] " maennich at google dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: maennich at google dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

            Bug ID: 24431
           Summary: abidw can't interpret ksymtab with Kernel 4.19+
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: maennich at google dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

Since upstream Linux Kernel commit 7290d5809571 ("module: use relative
references for __ksymtab entries") [1], abidw is not able to extract
information from the ksymtab anymore when modules are enabled.

Reproducer:

$ git checkout 7290d5809571~1
$ make allnoconfig && scripts/config --file .config -e MODULES -e DEBUG_KERNEL
-e DEBUG_INFO && make olddefconfig && make vmlinux && abidw vmlinux | head -n
10

<abi-corpus path='vmlinux' architecture='elf-intel-80386'>
  <elf-function-symbols>
    <elf-symbol name='___ratelimit' type='func-type' binding='global-binding'
visibility='default-visibility' is-defined='yes'/>
...


$ git checkout 7290d5809571
$ make allnoconfig && scripts/config --file .config -e MODULES -e DEBUG_KERNEL
-e DEBUG_INFO && make olddefconfig && make vmlinux && abidw vmlinux | head -n
10

<abi-corpus path='vmlinux' architecture='elf-intel-80386'>
  <abi-instr version='1.0' address-size='32' path='arch/x86/kernel/head32.c'
comp-dir-path='/ws/contrib/linux' language='LANG_C89'>
    <type-decl name='void' id='type-id-1'/>
...

As you can see the <elf-function-symbols> are absent from the representation.

[1]
https://github.com/torvalds/linux/commit/7290d58095712a89f845e1bca05334796dd49ed2

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
                   ` (2 preceding siblings ...)
  2019-01-01  0:00 ` dodji at redhat dot com
@ 2019-01-01  0:00 ` maennich at google dot com
  2019-01-01  0:00 ` maennich at google dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: maennich at google dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

Matthias Maennich <maennich at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Matthias Maennich <maennich at google dot com> ---
I think this is fixed by the mentioned set of patches. We can close this for
now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
  2019-01-01  0:00 ` [Bug default/24431] " maennich at google dot com
@ 2019-01-01  0:00 ` maennich at google dot com
  2019-01-01  0:00 ` dodji at redhat dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: maennich at google dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

Matthias Maennich <maennich at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #4 from Matthias Maennich <maennich at google dot com> ---
Looks like it fixes the issue for 4.19. Unfortunately, now earlier (here 4.9)
kernels seem to be broken in the same way as 4.19 was before.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] ELF reader can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
  2019-01-01  0:00 ` [Bug default/24431] " maennich at google dot com
  2019-01-01  0:00 ` [Bug default/24431] ELF reader " maennich at google dot com
@ 2019-01-01  0:00 ` dodji at redhat dot com
  2019-01-01  0:00 ` maennich at google dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: dodji at redhat dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from dodji at redhat dot com ---
So this issue should now be resolved in the master branch of the git repository
by commit
https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=ad8c2531fb93dc4c314cfe860959910967d4f271.

Please test it to see if the issue is resolved for you.

Thank you again for having taken the time to file this issue, and sorry for the
inconvenience.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug default/24431] abidw can't interpret ksymtab with Kernel 4.19+
  2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
                   ` (6 preceding siblings ...)
  2019-01-01  0:00 ` maennich at google dot com
@ 2019-01-01  0:00 ` dodji at redhat dot com
  2019-01-01  0:00 ` [Bug default/24431] ELF reader " dodji at redhat dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: dodji at redhat dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=24431

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-04-11
     Ever confirmed|0                           |1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-05-10 15:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [Bug default/24431] New: abidw can't interpret ksymtab with Kernel 4.19+ maennich at google dot com
2019-01-01  0:00 ` [Bug default/24431] " maennich at google dot com
2019-01-01  0:00 ` [Bug default/24431] ELF reader " maennich at google dot com
2019-01-01  0:00 ` dodji at redhat dot com
2019-01-01  0:00 ` maennich at google dot com
2019-01-01  0:00 ` maennich at google dot com
2019-01-01  0:00   ` Dodji Seketeli
2019-01-01  0:00 ` dodji at redhat dot com
2019-01-01  0:00 ` maennich at google dot com
2019-01-01  0:00 ` [Bug default/24431] abidw " dodji at redhat dot com
2019-01-01  0:00 ` [Bug default/24431] ELF reader " dodji at redhat dot com
2019-01-01  0:00 ` [Bug default/24431] abidw " dodji at redhat dot com
2019-01-01  0:00 ` [Bug default/24431] ELF reader " dodji at seketeli dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).