* [PATCH 5.10] module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD
@ 2022-05-23 4:39 Joerg Vehlow
2022-05-23 15:15 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Joerg Vehlow @ 2022-05-23 4:39 UTC (permalink / raw)
To: linux-stable, Luis Chamberlain; +Cc: Joerg Vehlow
Hi,
this mainline patch 33121347fb1c359bd6e3e680b9f2c6ced5734a8 should be
applied to 5.15 as well.
Without loading of some modules fails, if
1. MODULE_UNLOAD=n
2. Architecture is aarch64 (maybe others as well)
3. KASLR is active
Without this patch the symbol .exit.text is not relocated and when the
linker generated a relative 32 bit relocation(PREL32) and the module is
loaded far enough away from the default loading address, it will trigger
a relocation overflow like this:
module algif_hash: overflow in relocation type 261 val ffff800010051c20
This happens to all modules, that use BUG in the exit section or if the
compiler generates a jump table in the exit section.
Thanks,
Joerg
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5.10] module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD
2022-05-23 4:39 [PATCH 5.10] module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD Joerg Vehlow
@ 2022-05-23 15:15 ` Greg KH
2022-05-23 15:17 ` Joerg Vehlow
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2022-05-23 15:15 UTC (permalink / raw)
To: Joerg Vehlow; +Cc: linux-stable, Luis Chamberlain, Joerg Vehlow
On Mon, May 23, 2022 at 06:39:48AM +0200, Joerg Vehlow wrote:
> Hi,
>
> this mainline patch 33121347fb1c359bd6e3e680b9f2c6ced5734a8 should be
> applied to 5.15 as well.
You mean 5.10, right? It's already in 5.13 and newer releases
> Without loading of some modules fails, if
> 1. MODULE_UNLOAD=n
> 2. Architecture is aarch64 (maybe others as well)
> 3. KASLR is active
>
> Without this patch the symbol .exit.text is not relocated and when the
> linker generated a relative 32 bit relocation(PREL32) and the module is
> loaded far enough away from the default loading address, it will trigger
> a relocation overflow like this:
>
> module algif_hash: overflow in relocation type 261 val ffff800010051c20
>
> This happens to all modules, that use BUG in the exit section or if the
> compiler generates a jump table in the exit section.
Now queued up for 5.10.y, thanks.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5.10] module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD
2022-05-23 15:15 ` Greg KH
@ 2022-05-23 15:17 ` Joerg Vehlow
0 siblings, 0 replies; 3+ messages in thread
From: Joerg Vehlow @ 2022-05-23 15:17 UTC (permalink / raw)
To: Greg KH; +Cc: linux-stable, Luis Chamberlain, Joerg Vehlow
Hi Greg,
Am 5/23/2022 um 5:15 PM schrieb Greg KH:
> On Mon, May 23, 2022 at 06:39:48AM +0200, Joerg Vehlow wrote:
>> Hi,
>>
>> this mainline patch 33121347fb1c359bd6e3e680b9f2c6ced5734a8 should be
>> applied to 5.15 as well.
>
> You mean 5.10, right? It's already in 5.13 and newer releases
Yes of course, I even put it correct in the subject...
>
>> Without loading of some modules fails, if
>> 1. MODULE_UNLOAD=n
>> 2. Architecture is aarch64 (maybe others as well)
>> 3. KASLR is active
>>
>> Without this patch the symbol .exit.text is not relocated and when the
>> linker generated a relative 32 bit relocation(PREL32) and the module is
>> loaded far enough away from the default loading address, it will trigger
>> a relocation overflow like this:
>>
>> module algif_hash: overflow in relocation type 261 val ffff800010051c20
>>
>> This happens to all modules, that use BUG in the exit section or if the
>> compiler generates a jump table in the exit section.
>
> Now queued up for 5.10.y, thanks.
Thanks
>
> greg k-h
Joerg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-23 15:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 4:39 [PATCH 5.10] module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD Joerg Vehlow
2022-05-23 15:15 ` Greg KH
2022-05-23 15:17 ` Joerg Vehlow
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 NNTP newsgroup(s).