Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3170361pxk; Tue, 15 Sep 2020 11:53:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynDwxq9SXCEJpiiO3ebpC5S+btO7S3yNU9yPYCSIMscZmkjUbg9obdR+s4sg/ZQ2NUHARB X-Received: by 2002:a17:906:d78d:: with SMTP id pj13mr22219722ejb.15.1600196009504; Tue, 15 Sep 2020 11:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600196009; cv=none; d=google.com; s=arc-20160816; b=PGDRC505Migt+n0bYJcxV7qQFmhYf6RMLxOxgMQ7bSpszHqOx6o97zo8nIWoBecqE3 SBP2ue86441uiZJF4E9nakiQgq+4LcRPsj5wnYhMpUO/a6HkUOKA1QAYcAS8HUHb4lGq 4J2zu9Af9bnqRrmiPFIUoGJHRCDVWdiq5XA9b30dn5Opd6DrrChoOAq1jYOgw67OFE/j WzdH6fT4gndIXo78RxegHHgTKwW+hO7K0e/JvkaYZxVS+yjKOKaSlI4bGzNrVFCLlmNs TkGtYxiXDzg5Zr5D5U5ccW08IK+SLOHeXjM7Zok44x81Xxmjawtl48KyDoHOX2w6Cd+G vW7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=cKYB52P8O6386b7hXIPyVtrVyn81imJhI74svwiZIl0=; b=kqIy5cguLR+qZ9PFTRAN8wNxYD0Qrjk+vi1Bg84jeujntjdP41356sKcpwBMz8cMeX fDcSEWgdR6XRvnbS61inLPM3uh6/vKVfMWHV2EG5UJHPCJQ39uosJFakpbblXkhZ1wjM j6I7HP8t9r8fcCk6fFvueq0Yun+QgQUNBUdvkpn3hc9lG/M5miIzKuFqXrHa5qrmQ3K3 +cB2fpChWq+PtnrSs4lVtGYU0Dh/oeme41hyLdnILsCSoF1OQIrub2oSrXAq4DMkkfdt us1svEsNf3hpmS6LAS+O1SfVcyd2jRZ4yoYE7fDBW5RmJ707nCDEWW/rqkaW3h2iL8AE yMuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=RSy11l4R; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz18si10056108ejb.598.2020.09.15.11.53.06; Tue, 15 Sep 2020 11:53:29 -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=@alien8.de header.s=dkim header.b=RSy11l4R; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727580AbgIOSwd (ORCPT + 99 others); Tue, 15 Sep 2020 14:52:33 -0400 Received: from mail.skyhub.de ([5.9.137.197]:57524 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727729AbgIOSwT (ORCPT ); Tue, 15 Sep 2020 14:52:19 -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 460DC1EC00F4; Tue, 15 Sep 2020 20:52:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1600195936; 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=cKYB52P8O6386b7hXIPyVtrVyn81imJhI74svwiZIl0=; b=RSy11l4ReWGZA+4hyM6z75EeGcglgNjRATmOcpgFHQ1ChMBtfSiIHPLtokKTom54+W5hku p70V3gwFqLNKIzTzQ+2Cw2mKOEtweNedhnnQBqdO7I0fJFwcyA37AzboylBtxT5yv2oBHE LpzQV6KsoU7oe/MSv05T1uwENZyROcA= Date: Tue, 15 Sep 2020 20:52:10 +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: <20200915185210.GY14436@zn.tnic> References: <20200915172658.1432732-1-rkir@google.com> <20200915174643.GT14436@zn.tnic> <20200915182730.GW14436@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 11:36:13AM -0700, Roman Kiryanov wrote: > This is fair. Unfortunately I am not an x86 asm expert. I expect the proper > fix should land into arch/x86/kernel/acpi/wakeup_64.S to init %gs > (maybe some more registers) before "jmp restore_processor_state". ... because "LLVM appears to be inlining functions with stack protectors into functions compiled with -fno-stack-protector" and now the *kernel* needs to init %gs? How about LLVM stops doing those wrong inlining decisions? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette