From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 101B73858C33; Tue, 2 Jan 2024 19:45:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 101B73858C33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 101B73858C33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704224728; cv=none; b=eh4U/IQRbdBSV0+ajPDP19N/FVuNjXtqQ7ON4jxWqVd/V7useTz6XQsPr9pFAwjseZ9lUHNKhebMOGfbKXnpydqV0p83WzEC4/ClJc+lPHYKqhWdF4U9Ymj96ylofbjQGubWzF46yGmRK4+aIoXOmTnbj3VjM7JVZpulikY82Lw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704224728; c=relaxed/simple; bh=dSQcX43sJY0/pQ/3y0HiX/o6pVLSJSJYiTAXRWKtf8o=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZtdryHOMF0ZcHSxf9JmqFpN1FDLM4ulvdx3ccDAzAtMP9iklk2pou5GieoKotELfqvgM7No+EQ+J5mx8111Vh0gKXAA9S/aHioDk9byVViYDD2a4eztklsyVKzmScbX7tcAlcaEc683pPbyN5i497wKoYPdZfMNrpRzJ5rZhG04= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 402Jg79R024145; Tue, 2 Jan 2024 19:45:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=jTizL/4OulR6QKglO0a4bb+zgrVDBF570blqKxcB+X4=; b=GgGJCl72Csn397ikGyOHVAdjdpio8VsHUHOOFWuGPH7i+CdnZ7C60UY8o4+NdGAyjvbM sdgGSEF6tJhXrZkKbn3AuRZLs5UqJusxwrf1Cl1sXui5C3nsO4H7fV2pP6OAdXsXaS/L LWASQ32/BkLyMykFvDnAjLSnM2y4K+xV/YdHjCwky/MWmCIhuq7X+V1AKv+Uyi3JyTVm n2pchF99fUIziu9JFKYb1GVwqqd1xgyebksr+ewHoR4cGGRf7HPRczGND5ijPBJgkKz5 BPM/zLntzipiHONGHx/NTLFhMFP4y1av7rrFDdUvomP2zjU4QEhXXuP/1oe3wqLcrLqu mA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vcrvfg1vf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jan 2024 19:45:21 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 402JiPSX030895; Tue, 2 Jan 2024 19:45:20 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vcrvfg1v5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jan 2024 19:45:20 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 402IZUFH024498; Tue, 2 Jan 2024 19:45:19 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3vb0826cum-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jan 2024 19:45:19 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 402JjG5p18743856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Jan 2024 19:45:16 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C4ED320043; Tue, 2 Jan 2024 19:45:16 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F54220040; Tue, 2 Jan 2024 19:45:16 +0000 (GMT) Received: from heavy.boeblingen.de.ibm.com (unknown [9.171.70.156]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 2 Jan 2024 19:45:16 +0000 (GMT) From: Ilya Leoshkevich To: Jakub Jelinek , Jeff Law , Richard Sandiford Cc: Andreas Krebbel , gcc-patches@gcc.gnu.org, Segher Boessenkool , Stefan Schulze Frielinghaus , Ilya Leoshkevich Subject: [PATCH v2 0/2] asan: Align .LASANPC on function boundary Date: Tue, 2 Jan 2024 20:41:36 +0100 Message-ID: <20240102194511.3171559-1-iii@linux.ibm.com> X-Mailer: git-send-email 2.43.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: uiJGdkIdcH_y5TD6qZWJVG45dD1YaJz6 X-Proofpoint-GUID: KSFqWL6KHk0pmXtlDKy-dnY1U3a8_D_L Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-02_07,2024-01-02_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 impostorscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 adultscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401020148 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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