public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rui314 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/31042] [s390x] .init and .fini padding
Date: Thu, 16 Nov 2023 03:36:32 +0000	[thread overview]
Message-ID: <bug-31042-131-CwUOeYx7LI@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31042-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31042

--- Comment #5 from Rui Ueyama <rui314 at gmail dot com> ---
> If GNU LD needs to add padding bytes due to e.g. the alignment requirement in crtn, it also uses the nops for such a code-section.
> mold should also use this behavior in order to be equal to GNU LD. Otherwise this breaks also other stuff.

That's correct; that's our approach in mold. That said, it might be a better
idea to eliminate the dependency on that behavior from the hand-written
assembly source files, as it's an obscure dependency on the implementation's
behavior. This also inadvertently creates free NOP slides for attackers. On
other platforms, we fill gaps with trap instructions, ensuring that the program
is immediately terminated if its control reaches an unexpected location.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-11-16  3:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08  4:12 [Bug libc/31042] New: " rui314 at gmail dot com
2023-11-08  4:27 ` [Bug libc/31042] " rui314 at gmail dot com
2023-11-08  9:41 ` schwab@linux-m68k.org
2023-11-08 11:33 ` rui314 at gmail dot com
2023-11-15 14:31 ` stli at linux dot ibm.com
2023-11-16  3:36 ` rui314 at gmail dot com [this message]
2023-11-30 12:36 ` stli at linux dot ibm.com
2023-11-30 16:30 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31042-131-CwUOeYx7LI@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).