From patchwork Tue Sep 27 00:23:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 29 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp75121wrt; Mon, 26 Sep 2022 17:24:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6t8S51KuRPuPPaah6nf4onD5oklxpJphy6+BBBTDYsuouyIguR3NAp91ccuiWQCk8F48I2 X-Received: by 2002:a17:906:5d16:b0:783:78d5:e47a with SMTP id g22-20020a1709065d1600b0078378d5e47amr7235330ejt.453.1664238289301; Mon, 26 Sep 2022 17:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664238289; cv=none; d=google.com; s=arc-20160816; b=uISMfCxN1KpSWmz7ML0KXS5KMfaQbbMB5tjaiNNeAd8f8vsT8KTfxMzLlWIoPQ1bvs iebz9Cqt/M6r0gjeyOLV2QHgyX1Z1HYsYaPHfC/Ut7QPKnvYT9PfP3u/x2P54gch3aML 9N1HLbRF+jl8JnvYqAtMsyZnE2EG6SzURTg1m9NOyS6EcfRi8WTQP+1CGe2N0P++CUrJ 3U5SsNbVBQDwb37IbgS6ISk5Zle/aBDBv3v9l6aPlwM4z3pE2weEV2oToPkHMpCcdrWG u0H5fQKSxM+w8Xia50gbSs3vsSz0ePO6ht3kNQz0FooPzxHRaaHnlpJTQx0iNUDCBiC0 WvTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:content-transfer-encoding:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=zd3pZBcVom5Ke3muq4+/D9CmwhOaExJZ4tzrqBvndPA=; b=OoPiTmLq8ZNjkjOl0QJagoskzZQiy1B3wWy7ZdT9kKekEJbruI5lHdJw1samh3eUGk wGJWZoEB1xsamcULxm+vmw8hQ95RTm1e29HlTJkNUMqYdaG9Q2LThELs1YSE0W8Vh9xz J/LYj7BozNLP9q/Ysnac5xyOBw2KjinWgKf7/QPgNRJLhtC+o1s2RZFI2naCaLySpZj6 obSlv+AWDahDutmqqh8gdwKNQQ4wb4OAbOpRN1+6/OHI1ZHrsz+6+QFz6Bwi4NWGnAB1 wK/w62Kk+wdfA82S3p32W4FDrnJx4ck4QeFFSdUzPndTvvHSnHMjI9sJ/CwHKpi4SjHr SLfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=SOJpMVRK; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id qw29-20020a1709066a1d00b007823754ecd5si1628833ejc.43.2022.09.26.17.24.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 17:24:49 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=SOJpMVRK; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A56E3857C6F for ; Tue, 27 Sep 2022 00:24:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A56E3857C6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664238278; bh=zd3pZBcVom5Ke3muq4+/D9CmwhOaExJZ4tzrqBvndPA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=SOJpMVRKcgNOIu/fOW7jgfJKoYsJk5CxvLWRSrTHi8xoMznEh/xcjT8qfQhf9njyd ZIUGILFRR4PvXZ6cv3H7Miib12NzYG8H49thnQPnADtj7UZvQZXmiH0bSK6pJs5oET +k7xjzLgPlzZPRiL5fPfMl3RM5FFhW4zrZfD3aPU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 66C443858C83 for ; Tue, 27 Sep 2022 00:23:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 66C443858C83 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28QLuKAC003457 for ; Tue, 27 Sep 2022 00:23:42 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jumefujq2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 27 Sep 2022 00:23:41 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28QNv0Ww032581 for ; Tue, 27 Sep 2022 00:23:41 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jumefujpn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 00:23:41 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 28R0KqNA002217; Tue, 27 Sep 2022 00:23:39 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03fra.de.ibm.com with ESMTP id 3jssh929af-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 00:23:39 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 28R0NaFX1049144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Sep 2022 00:23:36 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 21CEEAE04D; Tue, 27 Sep 2022 00:23:36 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DCEAEAE045; Tue, 27 Sep 2022 00:23:35 +0000 (GMT) Received: from heavy.ibmuc.com (unknown [9.171.90.176]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 27 Sep 2022 00:23:35 +0000 (GMT) To: Jakub Jelinek Subject: [PATCH v5 0/2] IBM zSystems: Improve storing asan frame_pc Date: Tue, 27 Sep 2022 02:23:32 +0200 Message-Id: <20220927002334.651057-1-iii@linux.ibm.com> X-Mailer: git-send-email 2.37.2 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: qFWbhrzuH4EX--WTBeyHGDwyVHOv_GLc X-Proofpoint-GUID: dpjJhP-DWeXnl5I4FWZLVw7tIIEc9AvM X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-26_11,2022-09-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 suspectscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 spamscore=0 impostorscore=0 phishscore=0 mlxscore=0 mlxlogscore=649 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209260149 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ilya Leoshkevich via Gcc-patches From: Ilya Leoshkevich Reply-To: Ilya Leoshkevich Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745080328281739617?= X-GMAIL-MSGID: =?utf-8?q?1745080328281739617?= Hi, This is a resend of v4 with slightly adjusted commit messages: v1: https://gcc.gnu.org/pipermail/gcc-patches/2019-July/525016.html v2: https://gcc.gnu.org/pipermail/gcc-patches/2019-July/525069.html v3: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548338.html v4: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549252.html It still survives the bootstrap and the regtest on x86_64-redhat-linux, s390x-redhat-linux and ppc64le-redhat-linux. It also fixes [1]. I also tried the approach with moving .LASANPC closer to the function label and using FUNCTION_BOUNDARY instead of introducing CODE_LABEL_BOUNDARY, but the problem there is that it's hard to catch the moment where the function label is written. Architectures can do it by calling ASM_OUTPUT_LABEL() or assemble_name() in ASM_DECLARE_FUNCTION_NAME(), ASM_OUTPUT_FUNCTION_LABEL() or TARGET_ASM_FUNCTION_PROLOGUE(). epiphany_start_function() does that twice, but passes the same decl to both calls. Note that simply moving asan_function_start() to final_start_function_1() is not enough, since an architecture can write something after the function label. This all means that for this approach to work, all the architectures need to be adjusted, which looks like an overkill to me. Best regards, Ilya [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593666.html Ilya Leoshkevich (2): asan: specify alignment for LASANPC labels IBM zSystems: Define CODE_LABEL_BOUNDARY gcc/asan.cc | 1 + gcc/config/s390/s390.h | 3 +++ gcc/defaults.h | 5 +++++ gcc/doc/tm.texi | 4 ++++ gcc/doc/tm.texi.in | 4 ++++ gcc/testsuite/gcc.target/s390/asan-no-gotoff.c | 15 +++++++++++++++ 6 files changed, 32 insertions(+) create mode 100644 gcc/testsuite/gcc.target/s390/asan-no-gotoff.c