Thread (3 messages) 3 messages, 2 authors, 2017-08-08

Re: [PATCH] libkmod-elf: resolve CRC if module is built with MODULE_REL_CRCS

From: Ard Biesheuvel <hidden>
Date: 2017-07-19 19:10:20
Also in: lkml

Possibly related (same subject, not in this thread)

On 19 July 2017 at 20:04, Yauheni Kaliuta [off-list ref] wrote:
Hi, Lucas!
quoted
quoted
quoted
quoted
quoted
On Wed, 19 Jul 2017 10:51:44 -0700, Lucas De Marchi  wrote:
 > On Wed, Jul 19, 2017 at 7:56 AM, Yauheni Kaliuta
 > [off-list ref] wrote:
 >> Normally exported symbol's crc is stored as absolute (SHN_ABS)
 >> value of special named symbol __crc_<symbol name>.
 >>
 >> When the kernel and modules are built with the config option
 >> CONFIG_MODULE_REL_CRCS, all the CRCs are put in a special section
 >> and the __crc_<symbol name> symbols values are offsets in the
 >> section. See patch description of the commit:
 >>
 >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56067812d5b0e737ac2063e94a50f76b810d6ca3
 >>
 >> Add kmod support of this configuration.

[...]

 > LGTM. I'll give this a try and apply.

Thanks! I would also like to get some feedback from the kernel feature
author, Ard Biesheuvel, that this does not miss other usecases.
Hi all,

The patch looks correct to me. My only comment is that
kmod_elf_resolve_crc() should probably return a uint32_t instead,
given the size of a CRC32.

In any case,

Reviewed-by: Ard Biesheuvel <redacted>

Thanks,
Ard.

 > Do you think it's possible to build an out-of-tree module with this
 > option so we can add one to the testsuite?

I'll check what I can do.

The problem is seen if you run depmod with -e -E, which I guess is not used
too often.

--
WBR,
Yauheni Kaliuta
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help