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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAS9HtgL=sDn25BeCxSTz6Hg1x+cYbCe54oxy74S4y2Ogw@mail.gmail.com>
Date: Wed, 23 Oct 2024 15:48:09 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Rong Xu <xur@...gle.com>
Cc: Alice Ryhl <aliceryhl@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>, 
	Arnd Bergmann <arnd@...db.de>, Bill Wendling <morbo@...gle.com>, Borislav Petkov <bp@...en8.de>, 
	Breno Leitao <leitao@...ian.org>, Brian Gerst <brgerst@...il.com>, 
	Dave Hansen <dave.hansen@...ux.intel.com>, David Li <davidxl@...gle.com>, 
	Han Shen <shenhan@...gle.com>, Heiko Carstens <hca@...ux.ibm.com>, "H. Peter Anvin" <hpa@...or.com>, 
	Ingo Molnar <mingo@...hat.com>, Jann Horn <jannh@...gle.com>, Jonathan Corbet <corbet@....net>, 
	Josh Poimboeuf <jpoimboe@...nel.org>, Juergen Gross <jgross@...e.com>, 
	Justin Stitt <justinstitt@...gle.com>, Kees Cook <kees@...nel.org>, 
	"Mike Rapoport (IBM)" <rppt@...nel.org>, Nathan Chancellor <nathan@...nel.org>, 
	Nick Desaulniers <ndesaulniers@...gle.com>, Nicolas Schier <nicolas@...sle.eu>, 
	"Paul E. McKenney" <paulmck@...nel.org>, Peter Zijlstra <peterz@...radead.org>, 
	Sami Tolvanen <samitolvanen@...gle.com>, Thomas Gleixner <tglx@...utronix.de>, 
	Wei Yang <richard.weiyang@...il.com>, workflows@...r.kernel.org, 
	Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, Maksim Panchenko <max4bolt@...il.com>, x86@...nel.org, 
	linux-arch@...r.kernel.org, linux-doc@...r.kernel.org, 
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org, 
	llvm@...ts.linux.dev, Sriraman Tallam <tmsriram@...gle.com>, 
	Krzysztof Pszeniczny <kpszeniczny@...gle.com>
Subject: Re: [PATCH v4 3/6] Change the symbols order when --ffuntion-sections
 is enabled

On Tue, Oct 22, 2024 at 8:43 AM Rong Xu <xur@...gle.com> wrote:
>
> On Sun, Oct 20, 2024 at 7:15 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
> >
> > On Tue, Oct 15, 2024 at 6:33 AM Rong Xu <xur@...gle.com> wrote:
> > >
> > > When the -ffunction-sections compiler option is enabled, each function
> > > is placed in a separate section named .text.function_name rather than
> > > putting all functions in a single .text section.
> > >
> > > However, using -function-sections can cause problems with the
> > > linker script. The comments included in include/asm-generic/vmlinux.lds.h
> > > note these issues.:
> > >   “TEXT_MAIN here will match .text.fixup and .text.unlikely if dead
> > >    code elimination is enabled, so these sections should be converted
> > >    to use ".." first.”
> > >
> > > It is unclear whether there is a straightforward method for converting
> > > a suffix to "..".
> >
> >
> >
> > Why not for ".text.fixup"?
> >
> > $ git grep --name-only '\.text\.fixup' | xargs sed -i
> > 's/\.text\.fixup/.text..fixup/g'
> >
>
> I did not move .text.fixup because it currently groups together with TEXT_MAIN.

OK. Then, .text.fixup is not a problem.



> >
> > Why did you do this conditionally?
> >
> > You are making this even more unmaintainable.
>
> Again, we don't want to change the default build.
>
> If you think the change can apply to the default build, we would be
> happy to remove the condition.


I believe this should be done unconditionally.

If you are concerned about changing the default,
I am concerned about changing it under any condition.

We should avoid maintaining two section layouts.




--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ