lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNARNVu_HMH7MRm5t2d+uMfpsYki7FWhZeF7+nDVtPEo_Yw@mail.gmail.com>
Date:   Sun, 21 May 2023 22:11:48 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     linux-kbuild@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>
Subject: Re: [PATCH] modpost: error out if addend_*_rel() is not implemented
 for REL arch

On Fri, May 12, 2023 at 1:25 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> The section mismatch check relies on the relocation entries.
>
> For REL, the addend value is implicit, so we need some code to compute
> it. Currently, EM_386, EM_ARM, and EM_MIPS are supported. This commit
> makes sure we covered all the cases.
>
> I believe the other architectures use RELA, where the explicit r_addend
> field exists.
>
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---

Applied to linux-kbuild.



>
>  scripts/mod/modpost.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 95da374cc534..44309d463a49 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1442,6 +1442,8 @@ static void section_rel(const char *modname, struct elf_info *elf,
>                         if (addend_mips_rel(elf, sechdr, &r))
>                                 continue;
>                         break;
> +               default:
> +                       fatal("Please add code to calculate addend for this architecture\n");
>                 }
>                 sym = elf->symtab_start + r_sym;
>                 /* Skip special sections */
> --
> 2.39.2
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ