Skip to content

Commit e0aba1c

Browse files
committed
Revert "x86/module: prepare module loading for ROX allocations of text"
jira LE-4694 Rebuild_History Non-Buildable kernel-6.12.0-55.43.1.el10_0 commit-author Mike Rapoport (Microsoft) <rppt@kernel.org> commit 1d7e707 The module code does not create a writable copy of the executable memory anymore so there is no need to handle it in module relocation and alternatives patching. This reverts commit 9bfc482. Signed-off-by: "Mike Rapoport (Microsoft)" <rppt@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250126074733.1384926-8-rppt@kernel.org (cherry picked from commit 1d7e707) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent d2cf390 commit e0aba1c

File tree

6 files changed

+117
-167
lines changed

6 files changed

+117
-167
lines changed

arch/um/kernel/um_arch.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -435,25 +435,24 @@ void __init arch_cpu_finalize_init(void)
435435
os_check_bugs();
436436
}
437437

438-
void apply_seal_endbr(s32 *start, s32 *end, struct module *mod)
438+
void apply_seal_endbr(s32 *start, s32 *end)
439439
{
440440
}
441441

442-
void apply_retpolines(s32 *start, s32 *end, struct module *mod)
442+
void apply_retpolines(s32 *start, s32 *end)
443443
{
444444
}
445445

446-
void apply_returns(s32 *start, s32 *end, struct module *mod)
446+
void apply_returns(s32 *start, s32 *end)
447447
{
448448
}
449449

450450
void apply_fineibt(s32 *start_retpoline, s32 *end_retpoline,
451-
s32 *start_cfi, s32 *end_cfi, struct module *mod)
451+
s32 *start_cfi, s32 *end_cfi)
452452
{
453453
}
454454

455-
void apply_alternatives(struct alt_instr *start, struct alt_instr *end,
456-
struct module *mod)
455+
void apply_alternatives(struct alt_instr *start, struct alt_instr *end)
457456
{
458457
}
459458

arch/x86/entry/vdso/vma.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ int __init init_vdso_image(const struct vdso_image *image)
5454

5555
apply_alternatives((struct alt_instr *)(image->data + image->alt),
5656
(struct alt_instr *)(image->data + image->alt +
57-
image->alt_len),
58-
NULL);
57+
image->alt_len));
5958

6059
return 0;
6160
}

arch/x86/include/asm/alternative.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
9696
* instructions were patched in already:
9797
*/
9898
extern int alternatives_patched;
99-
struct module;
10099

101100
extern void alternative_instructions(void);
102-
extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end,
103-
struct module *mod);
104-
extern void apply_retpolines(s32 *start, s32 *end, struct module *mod);
105-
extern void apply_returns(s32 *start, s32 *end, struct module *mod);
106-
extern void apply_seal_endbr(s32 *start, s32 *end, struct module *mod);
101+
extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
102+
extern void apply_retpolines(s32 *start, s32 *end);
103+
extern void apply_returns(s32 *start, s32 *end);
104+
extern void apply_seal_endbr(s32 *start, s32 *end);
107105
extern void apply_fineibt(s32 *start_retpoline, s32 *end_retpoine,
108-
s32 *start_cfi, s32 *end_cfi, struct module *mod);
106+
s32 *start_cfi, s32 *end_cfi);
107+
108+
struct module;
109109

110110
struct callthunk_sites {
111111
s32 *call_start, *call_end;

0 commit comments

Comments
 (0)