Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3141880pxk; Tue, 15 Sep 2020 11:05:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy56YOGs88OiomuY0dELoyTiMB/XwphWvy0H/qTc3Kb2J85zeq7M/LfNp/G+NEZTEfMyoeQ X-Received: by 2002:a17:906:4553:: with SMTP id s19mr20835693ejq.475.1600193104741; Tue, 15 Sep 2020 11:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600193104; cv=none; d=google.com; s=arc-20160816; b=yc2vIFnuxawmGNtQWfHhs6TK8L6v2kfZLqp2FfM8NU3XtZyPmD/95OB3g5zVJ+/zD2 U7SewC3dYNoDsp2LNdN9dFaVQQjg4M9CEulnH8WSmwS+uOEjRVbgWWJF1C04aNMEtYgD lj7OdbiKsR4JpZzitU8TRwCn1sieLQxERyJg1jWhzEIeOdX2aJ7UnoXk1Cco1ZDFAFvS 5auJtrJLhZoIMYjAWeyI1PHFaq+KULtMBHIicmoyByHD+jCdEHeiu8vIGwlMCT3ua8rU O4WU1nhusGCcHRH0Xfxvgj0VDxMFfHpRVHn7SYrVF6oLm0Iq/fVM6tmfZapqwZuepUuk te1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zC/SbxYzkjp6OcGCx+rUfTP966C1m59d2H5efDgrVWA=; b=mwkJnZzXALCxQwUSlwXFoeOpKr36JHfz2V6QCFQoPqNz49afkJFfwyKCkGLxSbNY/0 0RouLuv/EmgwFUJBDew1rlBAUMKZeDDLZQTua22X/vEFpV3jsZfJGZjhsmoAas+2OA4/ MEPK5JmjZIzquTws//hwOq/MPKiacloe+L0tncavHlxDHYwx7C/PebJP59a1lyaNwToQ ZLIddAi3sSuwgfqNkf0F3/X03n8+DJhmohIZyVC3dX/xw6GoezkJdDs3RJbMIpplshUe p7OgobHrOVfwqxGN8/G9owYZTl5fUip6RZ7v8Pl1HRkdLecIAvbfiRrZdo8nbvpSiNns 8RtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gOM8yiiL; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si10136549ejo.316.2020.09.15.11.04.42; Tue, 15 Sep 2020 11:05:04 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=gOM8yiiL; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727431AbgIOSDx (ORCPT + 99 others); Tue, 15 Sep 2020 14:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727712AbgIOR5a (ORCPT ); Tue, 15 Sep 2020 13:57:30 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A75D9C06174A for ; Tue, 15 Sep 2020 10:57:29 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id w11so4095182lfn.2 for ; Tue, 15 Sep 2020 10:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zC/SbxYzkjp6OcGCx+rUfTP966C1m59d2H5efDgrVWA=; b=gOM8yiiLag62BKZvBU1Ld3EaS+uEABdHMAHOQYXp4gYgK6MWnEoBDMAH46BUf5TmB+ TeiK1flI2V9KV9iTOku256yuojEHjYQL/SAkqm8hwmwq348GzbP3X55WgpJgFyA65Dwa edcbkgZ7rYAClxokvf5Qgc9mIXDGstbDigyxRjuqO7KfNRieXo/v1P7K4TScxYmUoSs/ P5aQPFH6A9jxovWESXl9bVN6Ub7fP+bQIlsS7BGzFm5YRBD0C9sMWEkCH4yqIaNadUgv YKZB3sxoc01LhnoKnY5chFTddDEGyKupJziTRTxccKqSUBlHJWEQp9W6um13MiR3jbSm I+dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zC/SbxYzkjp6OcGCx+rUfTP966C1m59d2H5efDgrVWA=; b=lEq0039IU5il3/jt/LHgfk7oZYIYT/52KB4j3tLaCV3JSCyzYGfSzrUnI2TzF+jiGu v6mQ1OTlckC3WlU3pMiB7i4bAu/BDwq4GC7VdYuuYXCuEuRfq9TRdcGOItGWrU8kYp6E fS30OkFpg7QmRVhWWL8JxovVasnjVdSaXuOwOY4UyKyJJKdmCG8g8f98KqHVu+eZ06HG e0c3I84GMjxVx8P8Wlz/gG5cKuArAieijexK2vgVEFm5d0sqmbOa7opNmlz8uzx8bkU0 JCsRwrFlNM+i0wN5uEThZiBaRtzP5vATN0qoJC/fya2z/KVdtEaNgOpWYD02jwqxPRmj WoGQ== X-Gm-Message-State: AOAM532P21xgIYD9eXzxclAngZmcCJluqjxdADe4479hDb/x6BIRt7Fm F0G0L5zZlGh2aNCVKjjLx8u2o+cDbhM2RncdBcyE8Q== X-Received: by 2002:ac2:511c:: with SMTP id q28mr6086175lfb.411.1600192647744; Tue, 15 Sep 2020 10:57:27 -0700 (PDT) MIME-Version: 1.0 References: <20200915172658.1432732-1-rkir@google.com> <20200915174643.GT14436@zn.tnic> In-Reply-To: <20200915174643.GT14436@zn.tnic> From: Roman Kiryanov Date: Tue, 15 Sep 2020 10:57:16 -0700 Message-ID: Subject: Re: [PATCH] arch: x86: power: cpu: init %gs before __restore_processor_state (clang) To: Borislav Petkov Cc: rjw@rjwysocki.net, pavel@ucw.cz, Thomas Gleixner , mingo@redhat.com, x86@kernel.org, linux-pm@vger.kernel.org, Greg KH , Nick Desaulniers , Alistair Delva , Haitao Shan , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 15, 2020 at 10:46 AM Borislav Petkov wrote: Hi Borislav, thank you for a quick response. > Ok, google guys, pls make sure you Cc LKML too as this is where *all* > patches and discussions are archived. Adding it now to Cc. Thank you, I did not know this. > Ok, so why is the kernel supposed to take yet another ugly workaround > because there's a bug in the compiler? I believe the kernel makes a questionable assumption on how clang uses registers (gs will not be used if stack protection is disabled). Both kernel and clang behaves unfortunate here. > disable LTO CFI depends on LTO.