public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] asan: Align .LASANPC on function boundary
@ 2024-01-02 19:41 Ilya Leoshkevich
  2024-01-02 19:41 ` [PATCH v2 1/2] Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL Ilya Leoshkevich
  2024-01-02 19:41 ` [PATCH v2 2/2] asan: Align .LASANPC on function boundary Ilya Leoshkevich
  0 siblings, 2 replies; 7+ messages in thread
From: Ilya Leoshkevich @ 2024-01-02 19:41 UTC (permalink / raw)
  To: Jakub Jelinek, Jeff Law, Richard Sandiford
  Cc: Andreas Krebbel, gcc-patches, Segher Boessenkool,
	Stefan Schulze Frielinghaus, Ilya Leoshkevich

v1: https://inbox.sourceware.org/gcc-patches/20231207121005.3425208-1-iii@linux.ibm.com/
v1 -> v2: Fix style issues (Jakub).
          Jakub has reviewed patch 2 and mentioned that he'd defer the
          patch 1 review to Jeff.



Hi,

this is another attempt to fix the .LASANPC alignment on s390x.
Currently it's not only inefficient ([1]-[5]), but also causes linker
errors in template-heavy code ([6]).

The previous attempts to add a new constant for minimum code alignment
value ([1]-[5]) did not arouse considerable enthusiasm, and fixing the
fallout ([6]) is probably just a wrong thing to do.

So here I'm taking another approach: making sure that .LASANPC is
aligned on function boundary in the first place.  This requires moving
the asan_function_start() invocation to ASM_OUTPUT_FUNCTION_LABEL().

Bootstrapped and regtested on x86_64-redhat-linux, ppc64le-redhat-linux
and s390x-redhat-linux.  Compile tested for platforms listed in [7].

Best regards,
Ilya

[1] https://gcc.gnu.org/pipermail/gcc-patches/2019-July/525016.html
[2] https://gcc.gnu.org/pipermail/gcc-patches/2019-July/525069.html
[3] https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548338.html
[4] https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549252.html
[5] https://patchwork.ozlabs.org/project/gcc/list/?series=320223
[6] https://patchwork.ozlabs.org/project/gcc/list/?series=297132
[7] http://toolchain.lug-owl.de/laminar/jobs

Ilya Leoshkevich (2):
  Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL
  asan: Align .LASANPC on function boundary

 gcc/asan.cc                         |  6 ++----
 gcc/config/aarch64/aarch64.cc       |  2 +-
 gcc/config/alpha/alpha.cc           |  5 ++---
 gcc/config/arm/aout.h               |  2 +-
 gcc/config/arm/arm.cc               |  2 +-
 gcc/config/bfin/bfin.h              | 16 ++++++++--------
 gcc/config/c6x/c6x.h                |  2 +-
 gcc/config/gcn/gcn.cc               |  5 ++---
 gcc/config/h8300/h8300.h            |  2 +-
 gcc/config/i386/i386.cc             |  2 +-
 gcc/config/ia64/ia64.cc             |  5 ++---
 gcc/config/mcore/mcore-elf.h        |  2 +-
 gcc/config/microblaze/microblaze.cc |  3 +--
 gcc/config/mips/mips.cc             | 19 ++++++++++---------
 gcc/config/pa/pa.cc                 |  3 ++-
 gcc/config/riscv/riscv.cc           |  2 +-
 gcc/config/rs6000/rs6000.cc         |  4 ++--
 gcc/config/s390/s390.cc             |  2 +-
 gcc/defaults.h                      |  2 +-
 gcc/final.cc                        |  3 ---
 gcc/output.h                        |  4 ++++
 gcc/varasm.cc                       | 14 ++++++++++++++
 22 files changed, 59 insertions(+), 48 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-12 21:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 19:41 [PATCH v2 0/2] asan: Align .LASANPC on function boundary Ilya Leoshkevich
2024-01-02 19:41 ` [PATCH v2 1/2] Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL Ilya Leoshkevich
2024-01-04 19:47   ` Jeff Law
2024-01-12 21:47   ` Jan-Benedict Glaw
2024-01-02 19:41 ` [PATCH v2 2/2] asan: Align .LASANPC on function boundary Ilya Leoshkevich
2024-01-09 18:55   ` Jeff Law
2024-01-09 19:44     ` Ilya Leoshkevich

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).