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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1f1453927318478bf5404ad9e2b692b9e5630221.camel@xry111.site>
Date: Sat, 06 Jul 2024 22:46:50 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Huacai Chen <chenhuacai@...nel.org>
Cc: WANG Xuerui <kernel@...0n.name>, Jinyang He <hejinyang@...ngson.cn>, 
 Youling Tang <tangyouling@...inos.cn>, Tiezhu Yang
 <yangtiezhu@...ngson.cn>, Fangrui Song <maskray@...gle.com>,  Nathan
 Chancellor <nathan@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>,
  loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
 llvm@...ts.linux.dev
Subject: Re: [PATCH 2/2] LoongArch: Add support for relocating the kernel
 with RELR relocation

On Sat, 2024-07-06 at 21:49 +0800, Huacai Chen wrote:
> On Sat, Jul 6, 2024 at 6:34 PM Xi Ruoyao <xry111@...111.site> wrote:
> > 
> > On Sat, 2024-07-06 at 18:29 +0800, Huacai Chen wrote:
> > 
> > /* snip */
> > 
> > > > diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> > > > index ddc042895d01..03b3ef5edd24 100644
> > > > --- a/arch/loongarch/Kconfig
> > > > +++ b/arch/loongarch/Kconfig
> > > > @@ -607,6 +607,7 @@ config
> > > > ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
> > > > 
> > > >  config RELOCATABLE
> > > >         bool "Relocatable kernel"
> > > > +       select ARCH_HAS_RELR
> > > Why is this selection under RELOCATABLE? I know ARM64 is the same,
> > > but
> > > why?
> > 
> > Because if we just select it in CONFIG_LOONGARCH instead of
> > CONFIG_RELOCATABLE, the users who have disabled CONFIG_RELOCATABLE
> > will
> > still see the entry for RELR in their configuration interface.  And
> > they'll ask "hey what's this for?  Why my kernel needs relocation?"
> RELR is not a similar conception to RELA, it is only used for
> relocatable kernel?

It replaces R_LARCH_RELATIVE relocs in RELA (basically represent the
same info in a much more compact form).  For non-relocatable kernel both
RELR and RELA shouldn't exist.

-- 
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ