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 27BB4385840F for ; Mon, 22 Apr 2024 15:59:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 27BB4385840F 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 27BB4385840F 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=1713801550; cv=none; b=dRnJdzuS0/+uUOTjzIaRygdUyFddeakY9k7k2P6zAsFaY7AXcjwqT2anSKDijemGDXwRaaz++VN9nb2LGV+K+0okzUjYaM+fBK7dzlyAqlgZ0nPhgo380e+WwnpTWz/0/Oc+rZRlOArmsImLeeGzy8ppX1Qy+QABSau/v7nvz/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713801550; c=relaxed/simple; bh=xSDVNKw3KnlhzNiEVS7qZblHKyTTyO9sal54zuK23ro=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=IZ5KRLw3jQLYvPLBvzZWpsDVrcw+/6Q1vxv5yRZCCpb400Eike5305t0Q/v8vsZ9C00jsuhdK8jGAnWSPPCsUhBJZEbBsCHeqHDjkUi98xdGzLe4xAAq6Eeo7eXRZBIPscvzPCwsz2FesRI5f4Br7vtX+L2BWnH0js4i7pXfEIs= 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 43MFoXWD022317; Mon, 22 Apr 2024 15:59:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=HIuUCN9XZ6vRh1OUwU3+8kkQZOY7Cwhl2e4HJupB+8Q=; b=ZWeWgcIrXFg8y2WHnXVyZc9ysEnTH4f6DxdFUx6HhWdbIXJi1pHFFN/2VJLYlT7/ZU6i wnq2mNZvWeSEiuPiK9awzuHdIiNezmtP/6WfML6qxMTT3tf57vRuQird5Z/VIq85V4VP fey8TCxwFCzafQKVDcgei1C1GuTRZqcke9wyw7AvupDQfB3B1pqEebOjjoAFzq0z51fW Ipizr5JHLSTWKA/Ebnd+GO+8GuKfxa3VnSofmFAZhGUrj4+M6y7JLDx9MvH/+aO9zVz7 v6dslRofaFdcTUEWX1TwplirwSLcaIfvUtCFfe151qHTBRwmr7iFA9+JyzXQCHpHqp4N IA== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xntvu80pt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 15:59:05 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43MFitMN029862; Mon, 22 Apr 2024 15:59:04 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xmr1t8s5v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 15:59:04 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43MFwx2n51249424 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Apr 2024 15:59:01 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E75D72004E; Mon, 22 Apr 2024 15:58:58 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C58F320043; Mon, 22 Apr 2024 15:58:58 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 22 Apr 2024 15:58:58 +0000 (GMT) From: Jens Remus To: binutils@sourceware.org, Indu Bhagat Cc: Jens Remus , Andreas Krebbel Subject: [RFC PATCH 0/1] sframe: Represent FP without RA on stack (padding) Date: Mon, 22 Apr 2024 17:58:56 +0200 Message-Id: <20240422155857.2497684-1-jremus@linux.ibm.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 8coJeKZZlJ_WNIZsPQx-zn86fa7Ehpl2 X-Proofpoint-ORIG-GUID: 8coJeKZZlJ_WNIZsPQx-zn86fa7Ehpl2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-22_09,2024-04-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 clxscore=1015 impostorscore=0 mlxscore=0 bulkscore=0 mlxlogscore=596 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404220067 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 List-Id: This patch series adds support in SFrame to represent the frame pointer (FP) without the return address (RA) being saved on the stack (and/or on s390x in another register). This is the first of two proposed alternatives: 1. This patch series uses a dummy padding offset (invalid offset from CFA value of zero) as RA offset to represent FP without RA on saved on the stack. 2. The alternative patch series changes the SFrame FRE count field into a bitmap, to convey which offsets follow the FRE. Note that it currently applies on top of my v3 patch series series that adds initial support to generate .sframe from CFI directives on s390x, although it is independent of that. The use of padding offsets has the benefit that it is a minor change to the SFrame V2 format. The downside is that it adds some (but apparently only minimal) bloat to the .sframe information. Also a value of zero might not be an invalid offset from CFA on all architectures or in all use cases (e.g. CFI in glibc longjmp() on some architectures defines the jump buffer pointer register as CFA base for unwinders to restore the jump target registers from (as if the return would be to the jump target)). A test build of glibc on s390x with this patch series applied shows the following changes for libc.so: The number of FDEs increases by 166 and the number of FREs increases by 861, while adding 337 dummy padding RA offsets. With a total of 28157 offsets the dummy padding offsets account for ~1.20 % of the offsets. Thanks and regards, Jens Jens Remus (1): sframe: Represent FP without RA on stack gas/gen-sframe.c | 50 +++++++++++++++++++---------------------- include/sframe.h | 9 ++++++-- libsframe/sframe-dump.c | 4 ++++ 3 files changed, 34 insertions(+), 29 deletions(-) -- 2.40.1