From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20054.outbound.protection.outlook.com [40.107.2.54]) by sourceware.org (Postfix) with ESMTPS id 09E32386EC59 for ; Fri, 2 Oct 2020 09:02:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 09E32386EC59 Received: from AM6PR04CA0062.eurprd04.prod.outlook.com (2603:10a6:20b:f0::39) by AM6PR08MB3768.eurprd08.prod.outlook.com (2603:10a6:20b:90::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 09:01:57 +0000 Received: from VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:f0:cafe::b1) by AM6PR04CA0062.outlook.office365.com (2603:10a6:20b:f0::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38 via Frontend Transport; Fri, 2 Oct 2020 09:01:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT030.mail.protection.outlook.com (10.152.18.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 09:01:57 +0000 Received: ("Tessian outbound 7161e0c2a082:v64"); Fri, 02 Oct 2020 09:01:57 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7c475b57c48ba894 X-CR-MTA-TID: 64aa7808 Received: from 5bf123dd347d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 67CCB7E3-91A0-4A8A-B470-98A621D8591F.1; Fri, 02 Oct 2020 09:01:19 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5bf123dd347d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 09:01:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DCNBXPq9rmdPaMXDDMHSEa3zYLuxFd8voMuZ9pPU9V+4C3C0Rf0k+6Iw35V+P1Hm6efeanfxZrLsSqK8na62C019dbkzFseH5NNcQ4S1aDf6IzYTs8412FAiGoMrjK1T0/QkKFC63eJULfU2vfdD62LZ7ATRCpL1zQA3aDD0sJnczP5ea1DN362BEEghchXlbEV58Yjal9FPbfzDDnmzQxpSxXF/8ICkckKXVKbPlNYpK2WrAPc4dLxwVtB2Ejl6u+Pz35Xdgp8iAsPtCZNrp0cJ66Mxp7+iWIlkZAbsUqTXohCSLK9jY9k8BJkrUEKhjQ1Gg8gl8qsTqmnxXKMEeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hv1kUlm/cUbXkjjx4OYcBCjVBxxPRmAUefJGPzBQMSg=; b=cGvq5uULOCiENFp+EKnQypplkRZPl3bBk7hDV4LWfR0FYyXbpdrfIf1s9cTtzSbYR+0WJI3sIdUR6mAPY64vEWWq9UobldSSBU3VuVyJuXmKeYP2DzUVUOtEsBj/OtuU7LBPLDSIeONvC+v0a7Zfs2OrPg1aSlehkEUxOPtjzyHzT3b3sQlG/ASYaymlOOgNRxhLmyjoTU2Cga9slfWEMN/zp9Z74EXsowyzku6EnKYav2xB/SxNUdXJpUD0qz4bU+3P6+IOjb0x7Uw8iP6N/f2VJhfg+HzY0pxMLOgkbU40kTJnl7oEkkYVnQjqZYSxzI0g+NNdrc7hiaAOdaebsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; Received: from PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) by PR3PR08MB5724.eurprd08.prod.outlook.com (2603:10a6:102:85::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 09:01:18 +0000 Received: from PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::784a:eb50:9684:50fe]) by PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::784a:eb50:9684:50fe%7]) with mapi id 15.20.3433.036; Fri, 2 Oct 2020 09:01:18 +0000 Date: Fri, 2 Oct 2020 10:01:15 +0100 From: Szabolcs Nagy To: Florian Weimer Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v5] aarch64: enforce >=64K guard size Message-ID: <20201002090115.GG29000@arm.com> References: <20201001094458.16060-1-szabolcs.nagy@arm.com> <87k0wahtde.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87k0wahtde.fsf@oldenburg2.str.redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.54] X-ClientProxiedBy: LO2P265CA0351.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:d::27) To PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.54) by LO2P265CA0351.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:d::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 09:01:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2a89d65c-5160-499c-21d3-08d866b1d112 X-MS-TrafficTypeDiagnostic: PR3PR08MB5724:|AM6PR08MB3768: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wuys587pfSxkscbdWIpHiKX9h9dYWRugxqP/oR73SYlnmJIT3FXUXBSfsARkAvwIio0UqosyR0Vr9GGFg9HZV1T6HZAENHS/tCW+6GNI+RSJvG1Ka7zUEz/vg1G3bLiUfKDErzUoMWwWRJBTU2b5CQPWpwH9xNqmwFfQ8Uv09iTdP9c5irECc9S40dCZohYfIHpU4wzJeUbW8n+YDl3Pls4LpJZE96iv1drWD3Lu5or9rdF/42dzuolO+B3ieWqoFShbsPCLDwdzgr/gJNAzVpu1b6h4JOhZ1OpdE/fWpI/PnofKOQfu+NoiH36uqApQ X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5564.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(136003)(39860400002)(376002)(346002)(8886007)(33656002)(66946007)(66476007)(66556008)(8936002)(8676002)(6916009)(83380400001)(55016002)(5660300002)(16526019)(4326008)(478600001)(7696005)(186003)(316002)(52116002)(26005)(44832011)(36756003)(86362001)(1076003)(2616005)(2906002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: FSeKRMjCUwS1B9D/POwZ4gh3DGoRyfB8aWCmlXhMpKUqlkIG6jGoAIYq+KMZ+RAb5s0WAiILZVidjF2isDtLJs6jFPiSW142Ff/iq+pSN5Mmx1onqN+UURyZWoiUeYGrVUSFex/z1Ua7obYHysxFcK5qWnQtppj2HRJYQHd7qDD5WeZFGMsf606b5jd+mKU1GJhFXhhHKmcSAglTlf6tEH8tvQtB1poxLMD3yYuQnkGdNvn2FfSpfbfsXUrysBNCGqcYsiPjKdIkRqIX3s7v2S1zeVrSoGtL1jKBtKaUcvfjYZPKnYCutvlmKXs5Q7N2AVaE8GOz+rKQj6fPuGZXInWOSKV8mXbz9E5KQnwT5ThN2maQJRLKQNXXVJYHi7xCoQoXf82+hFeKdnZ2g7njuNJ3z59vbn8HgoT39qiTmW4QQOxBlt6xhuMGOAPgtihWl2P40SGSW06MnI8yN5TqdAlV8zDEycY9WFa99iQrrklROHy0OAkwTvCKywNIZljJWeheyUmO85UIQ+4ebsWLVSKtinHR1fDtcZZf3PVtJjufWSGLTcvZSpX2s+QCa6MI/g6ZkbSK9vhW5hA0kBqBhXr04AbM6wbnMMet3tNS5MPmCkuhBNzbCIvc60e2Em+tZv6Id2PR0onSHiw+8MsMRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5724 Original-Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 739a555a-8859-4346-4ea3-08d866b1b939 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NOLsVZYHYFwCMU+wAqrHYpJa6A+Q+zEN+uUrNp2uXDwul/bCY6hz+QSQzmK2GHFZbeebd/TT1Mxhrua3HsRMUjdbNKVB7mhgRkfrW8ezD4eYf7oSD+n7WLOJH+QemfrjJCskNwrZLw4Dqb5zL/T8LYPD2KJNR80BG3uIZKczbgQmtmki0/wKZuv8x0PYBpNK8VbTyK+m7+vyA+xzOEqNRzPqDbLoeYua2NsT551SQ1Gq9Ee+KtiXEaR1vY4W/lJa+R2rUgQoE5LJHnngFShMuMoO3xmv4ISLIvWactwNmNwiKdQuaxFe6vQfB92jy6xcGfwaTW5WSylJWbXtoq7wAjRzwGUInR8ijQ0s39Eiyg36Yhn6QUGN11EzbXhLuHGZBpDDzm55wxR8uS/BSTePMQ== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(46966005)(83380400001)(82310400003)(356005)(47076004)(956004)(2906002)(1076003)(8936002)(82740400003)(2616005)(8676002)(44832011)(478600001)(86362001)(55016002)(33656002)(6862004)(16526019)(336012)(36756003)(81166007)(5660300002)(8886007)(70206006)(70586007)(316002)(36906005)(7696005)(26005)(186003)(4326008); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 09:01:57.4616 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a89d65c-5160-499c-21d3-08d866b1d112 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3768 X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2020 09:02:02 -0000 The 10/01/2020 17:13, Florian Weimer wrote: > * Szabolcs Nagy: > > > There are several compiler implementations that allow large stack > > allocations to jump over the guard page at the end of the stack and > > corrupt memory beyond that. See CVE-2017-1000364. > > > > Compilers can emit code to probe the stack such that the guard page > > cannot be skipped, but on aarch64 the probe interval is 64K by default > > instead of the minimum supported page size (4K). > > > > This patch enforces at least 64K guard on aarch64 unless the guard > > is disabled by setting its size to 0. For backward compatibility > > reasons the increased guard is not reported, so it is only observable > > by exhausting the address space or parsing /proc/self/maps on linux. > > > > On other targets the patch has no effect. If the stack probe interval > > is larger than a page size on a target then ARCH_MIN_GUARD_SIZE can > > be defined to get large enough stack guard on libc allocated stacks. > > > > The patch does not affect threads with user allocated stacks. > > I think this is okay. I checked that all architectures still build. > I filed bug 26691 to help with tracking the backports. Would you please > reference this bug in your commit message? ok, committed at 238032ead6f34c41542890b968d973eb5c839673 thanks for checking.