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 A84733858288; Thu, 7 Dec 2023 12:10:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A84733858288 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 A84733858288 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=1701951032; cv=none; b=mSGTAE3AuW3zdOgByPbA8FvYD/VwuqYQe8e8wzG3+1HxGc3C9wOZhlVhRSg5sZ/SKSyX/UY1AO91tGMyI8JOdRPt3BFf6PDMy7nE30xcoad4aZdDNeSIJw0udfQdNzs2UwydEucCRETzjfNLNxHpjIMNUcMEHE0f4eI4ol4Pl7M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701951032; c=relaxed/simple; bh=pFB1vRMQr/DeoQNuj+8zT2nODCwPvlu6uHE+x7b65yo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=OhvutUJyki6RlJPGGae69j82g/Uja5gdOZDtBw/Cu3FU26+EkgwaBUCvD1nczLhXe6fivfayCdCXRgWSYvqHTxjgpEhSzA89BzTG5mBC3eRfMqz47prhbYYSir2rI+IB5T/zD9nmIaVB+oejSoPcE/JY/fugNvv+wabV86kybfs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B7B7CTP027924; Thu, 7 Dec 2023 12:10:13 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=h2iRwfkpYajMLHpoK2605aV3HYhYNfggUAApTIut+hE=; b=o+ndGn/jt8JL8KTH95gzftzsodLkO0eUBHS5vbNVKcNtD3VN2MzUBQV/dW731mKlh2xU 3+fQ12ew1Qu6+vw6yX3qsyCUCCgyioocmvCJphCqfvsN4Dgw7f/mHzn25ZlDRnF1YDVI S18Jf125fMtzkaGoIyZGiS+5ILSKXXk5Y09PL4i0CKTi8lf1H2FEXbvd6Wumau49su5O 2l1LjQeu6ZWD8jSgp71hi+9XY+1SW5D4dnXlpUjLbwu7wuhpe9eeFZshduGusKy2vziB NpsrURxraSmAqG+k2BD2EOM0MR2jjQvK8LWLNrhG2E1N1JH6+r5COFzdk3XP27OxLBN+ MQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uucw29fbe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Dec 2023 12:10:13 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B7Bxoer007705; Thu, 7 Dec 2023 12:10:12 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 3uucw29fb2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Dec 2023 12:10:12 +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 3B7BDtSv027013; Thu, 7 Dec 2023 12:10:11 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3utav32xcn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Dec 2023 12:10:11 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3B7CA85B55574974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Dec 2023 12:10:09 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D06242004B; Thu, 7 Dec 2023 12:10:08 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 991CD20043; Thu, 7 Dec 2023 12:10:08 +0000 (GMT) Received: from heavy.boeblingen.de.ibm.com (unknown [9.155.200.166]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 7 Dec 2023 12:10:08 +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 0/2] asan: Align .LASANPC on function boundary Date: Thu, 7 Dec 2023 13:08:25 +0100 Message-ID: <20231207121005.3425208-1-iii@linux.ibm.com> X-Mailer: git-send-email 2.43.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: RsZdoJwOCQOCjUGN3NdQRYUJZ7hud0Nt X-Proofpoint-GUID: F88Wz7zL5f-VicEAB3uv7CyiQAAsInw- 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=2023-12-07_09,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 spamscore=0 mlxlogscore=870 mlxscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1011 bulkscore=0 priorityscore=1501 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312070098 X-Spam-Status: No, score=-5.6 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 | 10 ++++++++++ 22 files changed, 55 insertions(+), 48 deletions(-) -- 2.43.0