Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2402659rdh; Sun, 29 Oct 2023 14:42:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGz03FR2VP3RdCRSAsTWAa/GJFIyDX+g/ffboXS5xO/PmuvTprCCaZnd8Kwg+szJbxfe+Og X-Received: by 2002:a17:903:2448:b0:1cc:2518:ef19 with SMTP id l8-20020a170903244800b001cc2518ef19mr8856417pls.10.1698615764457; Sun, 29 Oct 2023 14:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698615764; cv=none; d=google.com; s=arc-20160816; b=DtdvSmHUVgI7zpjMSEWxYMgirb6kFLfKdIomkDuf9zRHRBsamtZxkIin6UPjHh470N ZhCRRB/cRk2AxI8xW61p0jhG3+897nH8mqFgz8HXa5Hx8AoNcimV2UNKXVKZFHl6ilbY ToXCrfFlT0NTEk3IzINARjAROzKM36yj18yi1mhXDfAcENoQ8sQaQmwaK8wX7FmTHvKM 5RVweWLad8qhXDgrwJ/oba8XULp2TPD+HfAz4ffZAj+GRNFmaipgUc06PQbmPwqVZomJ nJjTc8SL3EcA28G5CNztWqc1g96l6YO42fK6z/xzIv7QgLdIZaUKXxAHrUhuqGUTkyAD GqLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=Nz9zU3iNZL6qyUfFCTGTc9pV2l+y6xBp9T1YfJXCCnk=; fh=nkF/fv+r9j1eGNJPBVgaIQGY3wg35zckxQhCtiPLfCc=; b=AhRk2A/fhsVwB5xjkP+RE0Xkh3QuDMgz10I4ZbW/Bc1mHHUPwZoQOTMMWYJqSCX5wZ 98xe3fQIywYenkhRHRHaQdavZQgxrzVb+KjB+597xcCKbkK2intkCZxiX7dB9FEDeDLR JZcQgEWBwD0gyp+zOHRsr4WpUpoQ/wXtqD2/Bj3Q4IbZanRIZ3wWJjwm0GQiayyqeG9M 52EKkB85vCklxc5vSoNTM2OeralbCLB/8CBiH5imTHuZ+KG05zl21shLRF3Q2XypaJb0 U7OYJcAPOEzA01K1Ky7j+R2xiFVukm2nELhOrgggxTe69kFsYPXtGY1Fe0YDNg72SqUD of/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id b12-20020a170903228c00b001cc529610e3si165939plh.342.2023.10.29.14.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 14:42:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 399F880606D8; Sun, 29 Oct 2023 14:42:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbjJ2Vmg convert rfc822-to-8bit (ORCPT + 99 others); Sun, 29 Oct 2023 17:42:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbjJ2Vmf (ORCPT ); Sun, 29 Oct 2023 17:42:35 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6267E8E for ; Sun, 29 Oct 2023 14:42:33 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-278-rnF5RcNAOu2EX7E0tydquQ-1; Sun, 29 Oct 2023 21:42:30 +0000 X-MC-Unique: rnF5RcNAOu2EX7E0tydquQ-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 29 Oct 2023 21:42:41 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sun, 29 Oct 2023 21:42:41 +0000 From: David Laight To: 'Brian Gerst' , "linux-kernel@vger.kernel.org" , "x86@kernel.org" CC: Ingo Molnar , Thomas Gleixner , Borislav Petkov , "H . Peter Anvin" , "Peter Zijlstra" , Uros Bizjak Subject: RE: [PATCH v2 00/11] x86-64: Stack protector and percpu improvements Thread-Topic: [PATCH v2 00/11] x86-64: Stack protector and percpu improvements Thread-Index: AQHaCCWwM6Gzma9PGEyZRt5JZqLOarBhUF8A Date: Sun, 29 Oct 2023 21:42:41 +0000 Message-ID: References: <20231026160100.195099-1-brgerst@gmail.com> In-Reply-To: <20231026160100.195099-1-brgerst@gmail.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 29 Oct 2023 14:42:42 -0700 (PDT) From: Brian Gerst > Sent: 26 October 2023 17:01 > > Currently, x86-64 uses an unusual percpu layout, where the percpu section > is linked at absolute address 0. The reason behind this is that older GCC > versions placed the stack protector (if enabled) at a fixed offset from the > GS segment base. Since the GS segement is also used for percpu variables, > this forced the current layout. > > GCC since version 8.1 supports a configurable location for the stack > protector value, which allows removal of the restriction on how the percpu > section is linked. This allows the percpu section to be linked > normally, like most other architectures. In turn, this allows removal > of code that was needed to support the zero-based percpu section. I didn't think the minimum gcc version was anything like 8.1. I'm using 7.5.0 and I don't think that is the oldest version. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)