2023-01-25 18:55:05

by Song Liu

[permalink] [raw]
Subject: [PATCH v11 1/2] x86/module: remove unused code in __apply_relocate_add

This "#if 0" block has been untouched for many years. Remove it to clean
up the code.

Suggested-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
---
arch/x86/kernel/module.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 705fb2a41d7d..1dee3ad82da2 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -188,10 +188,6 @@ static int __apply_relocate_add(Elf64_Shdr *sechdrs,
goto invalid_relocation;
val -= (u64)loc;
write(loc, &val, 4);
-#if 0
- if ((s64)val != *(s32 *)loc)
- goto overflow;
-#endif
break;
case R_X86_64_PC64:
if (*(u64 *)loc != 0)
--
2.30.2



2023-01-25 19:03:27

by Josh Poimboeuf

[permalink] [raw]
Subject: Re: [PATCH v11 1/2] x86/module: remove unused code in __apply_relocate_add

On Wed, Jan 25, 2023 at 10:54:00AM -0800, Song Liu wrote:
> This "#if 0" block has been untouched for many years. Remove it to clean
> up the code.
>
> Suggested-by: Josh Poimboeuf <[email protected]>
> Signed-off-by: Song Liu <[email protected]>
> Reviewed-by: Petr Mladek <[email protected]>

Acked-by: Josh Poimboeuf <[email protected]>

--
Josh

2023-01-27 13:46:34

by Joe Lawrence

[permalink] [raw]
Subject: Re: [PATCH v11 1/2] x86/module: remove unused code in __apply_relocate_add

On Wed, Jan 25, 2023 at 10:54:00AM -0800, Song Liu wrote:
> This "#if 0" block has been untouched for many years. Remove it to clean
> up the code.
>
> Suggested-by: Josh Poimboeuf <[email protected]>
> Signed-off-by: Song Liu <[email protected]>
> Reviewed-by: Petr Mladek <[email protected]>
> ---
> arch/x86/kernel/module.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
> index 705fb2a41d7d..1dee3ad82da2 100644
> --- a/arch/x86/kernel/module.c
> +++ b/arch/x86/kernel/module.c
> @@ -188,10 +188,6 @@ static int __apply_relocate_add(Elf64_Shdr *sechdrs,
> goto invalid_relocation;
> val -= (u64)loc;
> write(loc, &val, 4);
> -#if 0
> - if ((s64)val != *(s32 *)loc)
> - goto overflow;
> -#endif
> break;
> case R_X86_64_PC64:
> if (*(u64 *)loc != 0)
> --
> 2.30.2
>

Reviewed-by: Joe Lawrence <[email protected]>

--
Joe


2023-02-03 13:34:29

by Petr Mladek

[permalink] [raw]
Subject: Re: [PATCH v11 1/2] x86/module: remove unused code in __apply_relocate_add

On Wed 2023-01-25 10:54:00, Song Liu wrote:
> This "#if 0" block has been untouched for many years. Remove it to clean
> up the code.
>
> Suggested-by: Josh Poimboeuf <[email protected]>
> Signed-off-by: Song Liu <[email protected]>
> Reviewed-by: Petr Mladek <[email protected]>

JFYI, I have pushed the patchset into livepatching.git,
branch for-6.3/cleanup-relocations.

It has got quite a lot review and testing. And I consider Josh's ack
to be enough from the x86 maintainers side.

Best Regards,
Petr