Re: [PATCH v8] livepatch: Clear relocation targets on a module removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 18, 2023 at 5:03 AM Petr Mladek <pmladek@xxxxxxxx> wrote:
>
[...]
> >               case R_X86_64_PC32:
> >               case R_X86_64_PLT32:
> > -                     if (*(u32 *)loc != 0)
> > -                             goto invalid_relocation;
> > -                     val -= (u64)loc;
> > -                     write(loc, &val, 4);
> >  #if 0
> > -                     if ((s64)val != *(s32 *)loc)
> > +                     if ((s64)val != *(s32 *)&val)
> >                               goto overflow;
>
> This is supposed to check the to-be-written value.

Great catch! Fixed it in v9.

>
> >  #endif
> > +                     val -= (u64)loc;
>
> This is modifying the to-be-written value. It should be computed before
> the overflow check.
>
> I know that the check is not really compiled in but we should
> not break it.
>
>
> >                       break;
>
> Otherwise, it looks fine.
>
>
> Now, I agree with Miroslav that we should get an approval from x86
> maintainers. Sigh, I think that I have already asked for this earlier:
>
> !!! Please add x86@xxxxxxxxxx and linux-kernel@xxxxxxxxxxxxxxx at
> minimum into CC when sending V9 !!!

I am sorry I missed this request.

>
> The more people know about this change the better. And it is really
> important to make maintainers of the touched subsystem aware of
> proposed changes.
>
> It is a good practice to add people that are printed by
> ./scripts/get_maintainer.pl. In this case, it is:
>
> $> ./scripts/get_maintainer.pl arch/x86/kernel/module.c
> Thomas Gleixner <tglx@xxxxxxxxxxxxx> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),authored:2/12=17%,added_lines:24/74=32%,removed_lines:5/26=19%)
> Ingo Molnar <mingo@xxxxxxxxxx> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
> Borislav Petkov <bp@xxxxxxxxx> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),commit_signer:4/12=33%)
> Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
> x86@xxxxxxxxxx (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
> "H. Peter Anvin" <hpa@xxxxxxxxx> (reviewer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> (commit_signer:8/12=67%,authored:4/12=33%,added_lines:41/74=55%,removed_lines:8/26=31%)
> Kees Cook <keescook@xxxxxxxxxxxx> (commit_signer:4/12=33%)
> Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> (commit_signer:3/12=25%)
> "Jason A. Donenfeld" <Jason@xxxxxxxxx> (commit_signer:3/12=25%,authored:3/12=25%,removed_lines:3/26=12%)
> Julian Pidancet <julian.pidancet@xxxxxxxxxx> (authored:1/12=8%,added_lines:5/74=7%,removed_lines:6/26=23%)
> Ard Biesheuvel <ardb@xxxxxxxxxx> (authored:1/12=8%,removed_lines:3/26=12%)
> linux-kernel@xxxxxxxxxxxxxxx (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT))

vger.kernel.org usually drops my email when the CC list is so long.
I am trying to fix it. For v9, I will CC x86@xxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, and linux-modules@xxxxxxxxxxxxxxx.

Thanks,
Song



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux