From patchwork Thu Nov 4 18:41:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Krebbel X-Patchwork-Id: 47068 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A62F83858036 for ; Thu, 4 Nov 2021 18:42:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A62F83858036 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636051338; bh=vQFEJy0hfzem66TAsXhO1ayHlQxTJ0FWoSNMfjHnnsg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ZY80S6QwQpcquOXxt9MObyT1Bi2P41GEiaX13M3SKaec6TzGg2b0qTFyyI/ZNPSpD 5Mzmwag6rBq+sAa21QyWVLx4DBqinCZR4bVWUsCSCoslQnbhoTSE880PZzdiap7oRv dRaDp3zXvoDzZwgPmRmT9NujaywuJNRj7sm121v8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 20AAF3858439 for ; Thu, 4 Nov 2021 18:41:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 20AAF3858439 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1A4HL2BZ028980 for ; Thu, 4 Nov 2021 18:41:49 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 3c4k2xjr7m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 04 Nov 2021 18:41:48 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1A4Id1xU014987 for ; Thu, 4 Nov 2021 18:41:46 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04fra.de.ibm.com with ESMTP id 3c0wpbrfwp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 04 Nov 2021 18:41:46 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1A4Ifie861342180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 4 Nov 2021 18:41:44 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F5B5A405F for ; Thu, 4 Nov 2021 18:41:44 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F30EFA405B for ; Thu, 4 Nov 2021 18:41:43 +0000 (GMT) Received: from li-23497a81-5215-11cb-9bae-a81330ecc14b.fritz.box (unknown [9.145.151.41]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Thu, 4 Nov 2021 18:41:43 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [Committed] IBM Z: Define STACK_CHECK_MOVING_SP Date: Thu, 4 Nov 2021 19:41:43 +0100 Message-Id: <20211104184143.75981-1-krebbel@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 3ohb22RClPsmGQtj4dLqA__kL7XKt4UI X-Proofpoint-ORIG-GUID: 3ohb22RClPsmGQtj4dLqA__kL7XKt4UI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-04_06,2021-11-03_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 mlxscore=0 adultscore=0 impostorscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111040072 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Andreas Krebbel via Gcc-patches From: Andreas Krebbel Reply-To: Andreas Krebbel Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" With -fstack-check the stack probes emitted access memory below the stack pointer. Bootstrapped and regression tested on s390x. Committed to mainline gcc/ChangeLog: * config/s390/s390.h (STACK_CHECK_MOVING_SP): New macro definition. --- gcc/config/s390/s390.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index fb16a455a03..186c5c6200b 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -332,6 +332,11 @@ extern const char *s390_host_detect_local_cpu (int argc, const char **argv); #define STACK_SIZE_MODE (Pmode) +/* Make the stack pointer to be moved downwards while issuing stack probes with + -fstack-check. We need this to prevent memory below the stack pointer from + being accessed. */ +#define STACK_CHECK_MOVING_SP 1 + #ifndef IN_LIBGCC2 /* Width of a word, in units (bytes). */