From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80580C2D0E0 for ; Tue, 15 Sep 2020 18:27:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30A712145D for ; Tue, 15 Sep 2020 18:27:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="GOkFdSk4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbgIOS1k (ORCPT ); Tue, 15 Sep 2020 14:27:40 -0400 Received: from mail.skyhub.de ([5.9.137.197]:53664 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727903AbgIOS1h (ORCPT ); Tue, 15 Sep 2020 14:27:37 -0400 Received: from zn.tnic (p200300ec2f0e42009474dca2b756bdd4.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:4200:9474:dca2:b756:bdd4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 1E8A91EC0246; Tue, 15 Sep 2020 20:27:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1600194452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=0HOksYl7KYGb0/Z/aOYhjWUD/dWuDEx2ok3TnQFcapw=; b=GOkFdSk4VlXMHIJ+DBri4YMGuULYonokg+5IB9cp2PJrMzRazhKpCctRJGLsfqYm+xon6S wFMLm9SeTSoL9UTf3Tmofk1U1s5ERbMFYdE5q3zQvkxCV047mrq+IMV5ZJYROunEKmBiO3 WsF/BDtlC4XOlMtOPeIunnfzYywUweE= Date: Tue, 15 Sep 2020 20:27:30 +0200 From: Borislav Petkov To: Roman Kiryanov 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 Subject: Re: [PATCH] arch: x86: power: cpu: init %gs before __restore_processor_state (clang) Message-ID: <20200915182730.GW14436@zn.tnic> References: <20200915172658.1432732-1-rkir@google.com> <20200915174643.GT14436@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Tue, Sep 15, 2020 at 10:57:16AM -0700, Roman Kiryanov wrote: > 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. If the kernel is at fault here and this same thing happens with GCC, sure, but this is a clang-specific fix. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette