Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1678064ybz; Sat, 18 Apr 2020 06:14:13 -0700 (PDT) X-Google-Smtp-Source: APiQypIkqVYtVW4WdyfcLikteVCngIIwWTamRh7zkkHRxaNcvDi2QiP7zWV22UP8MGY3FExEyrtx X-Received: by 2002:a17:906:560b:: with SMTP id f11mr7225834ejq.264.1587215653226; Sat, 18 Apr 2020 06:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587215653; cv=none; d=google.com; s=arc-20160816; b=ePFbG10b2Z9mzijv2GkcoPV0RaVAlLOlfmxKB6jKRhg658SUiVjEq89hevaBmsb6Zp pw3LpCs9YQmD5e1NuHxJLtfSwOKUrAzCIzMMovYfiAjIqzhLBOMWnDJkIAFEDVibjEQX smW0qp6uj1owe0MqNOLRGhdgd8PJlc7jJLiRXuYTtCuOEAyyYho+Cwk1jAdaCnpcjANS sExsa373oB2MlOJF9cLzuEjzSwpbBvly/TgZJnmh/GtcoHfUdYLledmErkLa8R9DlB+a wtZUTAfwTxmZffvwiW1wnjCnm4/ZvicpvoZl8WSApWYQeOQ5zEtlZ6lI+MgJEHlVyqcv nGzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=LMWENtyrBGROZS2eFbCWai8gHbEp2WgEBvAjUsapLPE=; b=aoRhiwszjew+aP6oJbHcS35vloQ5amzoRh/6Agfz8o9uhoOlgLXaIBlH0xxsa5d2cl ZteXx/STAeJ8U4sK1eXD5yhROXIspCd1LOf/n3N/TsEjrRtcGM2OuuoGXTpLrVCSzY4p i18nwOg0sWXEmTSm3pY2WWPXq41q1DOckJKRjg7a1ocurKxphm7o2ZJ5P2nIj8vwxTAf RsltOkLGBti7NjOsxKSG+4mJ9+iP4ckAy0ItLB3nI/D6mmPWKGlubVGIn+bwc6QoU3F3 28+RE6Bl9A7XjOFvfRD/qyoXlC73XwQKYHViT5sxV1wtmhGASEdn+ozpnshAxz7jYGMv Apcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw2si14994683ejb.322.2020.04.18.06.13.50; Sat, 18 Apr 2020 06:14:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725903AbgDRNMP convert rfc822-to-8bit (ORCPT + 99 others); Sat, 18 Apr 2020 09:12:15 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([146.101.78.151]:44834 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbgDRNMO (ORCPT ); Sat, 18 Apr 2020 09:12:14 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-131-rGoIA-_aOhihO9LMd8F6hg-1; Sat, 18 Apr 2020 14:12:08 +0100 X-MC-Unique: rGoIA-_aOhihO9LMd8F6hg-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Sat, 18 Apr 2020 14:12:07 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Sat, 18 Apr 2020 14:12:07 +0100 From: David Laight To: 'Peter Zijlstra' , Jakub Jelinek CC: Borislav Petkov , Sergei Trofimovich , Michael Matz , "linux-kernel@vger.kernel.org" , Thomas Gleixner , "Ingo Molnar" , "H. Peter Anvin" , Andy Lutomirski , "x86@kernel.org" Subject: RE: [PATCH v2] x86: fix early boot crash on gcc-10 Thread-Topic: [PATCH v2] x86: fix early boot crash on gcc-10 Thread-Index: AQHWFKRQ3c596QelW0eAgWyRTVEr96h+3Cjw Date: Sat, 18 Apr 2020 13:12:07 +0000 Message-ID: <26a33cf023024a52bb85bfbe9be2e1fa@AcuMS.aculab.com> References: <20200328084858.421444-1-slyfox@gentoo.org> <20200413163540.GD3772@zn.tnic> <20200415074842.GA31016@zn.tnic> <20200415231930.19755bc7@sf> <20200417075739.GA7322@zn.tnic> <20200417080726.GS2424@tucnak> <20200417084224.GB7322@zn.tnic> <20200417085859.GU2424@tucnak> <20200417103808.GW20730@hirez.programming.kicks-ass.net> In-Reply-To: <20200417103808.GW20730@hirez.programming.kicks-ass.net> Accept-Language: en-GB, en-US Content-Language: 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra > Sent: 17 April 2020 11:38 > > On Fri, Apr 17, 2020 at 10:58:59AM +0200, Jakub Jelinek wrote: > > Or go with the for (;;);, I don't think any compiler optimizes those away; > > GCC 10 for C++ can optimize away infinite loops that have some conditional > > exit because the language guarantees forward progress, but the C language > > rules are different and for unconditional infinite loops GCC doesn't > > optimize them away even if explicitly asked to -ffinite-loops. > > 'Funnily' there are people building the kernel with C++ :/ Can't you 'make progress' by using longjmp() to exit a signal handler? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)