Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2361855ybc; Wed, 13 Nov 2019 13:14:46 -0800 (PST) X-Google-Smtp-Source: APXvYqzYEG4ZtzO9nXTZfBLh99QutiDPyPfR3KvZXxhMlLkL6DK5yjU8qpXvIuf5u2f1+OY7FalS X-Received: by 2002:a17:906:c7d5:: with SMTP id dc21mr5085994ejb.267.1573679686868; Wed, 13 Nov 2019 13:14:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573679686; cv=none; d=google.com; s=arc-20160816; b=KNoZi4gwXAWj25pm3/TVncSB5nbe/BY6ExzotgwCizOblc4gF2Fkn3R+JQxI+/8lIN cEEAKfi4oTWJrPUkRNuY+JWIlGarfUFi7FmmNkJ1cSnBXpWkpex9mxJf7l6TAoz9/3wq hVTUi2WkosA8M5e4FPFJs8UIyWyrpTHI22R6Gta4x9XeLGYrssXVa0mIrl1YgUf09DuK nDOFqUoGFVzjDqQVQ+UjYfLD04xOw8Y8ZUOtwliilAxllNndxRW9YPPrFe6mtSNnot1R ll5y4I0gY9Reu/D4kOzl7LnBcVzxFBGQQ0zzrMbTPPSvwCBHP96xoiIKYJNl8y9D6vAM 0HSA== 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=91N9W8fnm/Fhfqn455X3m9/csATT/jXc8I2Ji17aZzc=; b=Mn6LzhfQvb7o+nqy+uAoUrCFh20JlaiQDK9yfUTfaoDqNa5mG7RuD0p7lm1PWKA7i+ qvV32QSYy6Y9VN2TkILTd4l3tCwabbYYxm3xQ63UGjunssELV0N7oVWJEJa61uVoGjRt /xTJNlcMgUZnbQM8aDd5Qtw7smzeCnT+5xEjGR9yVB82kihdo2TFynYm+AebQLahL6HD T3OkxdOmsiDY1mLrT+mxtyqnS893FXdVXu7UTxqMGJykwZ+8eZCT7Hq6qlVLCHpcf2sA 5N7VFM1HeWaUo0JatctkV0eHVO1jDuNmJ1ztXYMyNTAMg/gFpU4sluffSNhcnWPdZv/p 7cOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Mf6ceFn3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k35si2374471edb.84.2019.11.13.13.14.21; Wed, 13 Nov 2019 13:14:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Mf6ceFn3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726543AbfKMVKh (ORCPT + 99 others); Wed, 13 Nov 2019 16:10:37 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46005 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfKMVKh (ORCPT ); Wed, 13 Nov 2019 16:10:37 -0500 Received: by mail-lj1-f196.google.com with SMTP id n21so4166968ljg.12 for ; Wed, 13 Nov 2019 13:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=91N9W8fnm/Fhfqn455X3m9/csATT/jXc8I2Ji17aZzc=; b=Mf6ceFn3HIXyCXGllj+S6+rL0Oyk5Vg2Ksehm712c1feeeeBFfn38uvk8g+ZDi2lDM /DKVg58REdap/+mZuUAckUJIgt624cVXCYbpq3AlNnquRj209aGdVCbiQNLt25vbCoR/ PKHeiM7sE8M6mbU6rdxidHxwniSU4DXq8pTw0= 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=91N9W8fnm/Fhfqn455X3m9/csATT/jXc8I2Ji17aZzc=; b=KEWxraZY0z33MM3xX4oHnUk53ehzJOekMlw1MHN1uTLRM0H8ZLxNyMqvvEzElB7Ktb thMf9YK0ZqMGd+rpgA7usaT2BK6SKC7RZqG9TrT8bjOs8SX8DF7zOn7od+K44KjJSvTv aLzyRwlvDK3/7uNXXuRkedAXAmrgMKfZTyN/EisVkBTKi1mc1mVpaZKC6PLAyiZxl3z+ /bbldkHSaqe3/lQ989imVtP8pHcyQz8sfRe7OD6KhAJxO0rLsY+NIHxyjtfkYfq5M5tM KZoLUDJUQasyvZ5lVzfM1DOFISUGJXKsi37upaik/tV96jhgcN3NeT1S00YYP5JkJu3c AXRw== X-Gm-Message-State: APjAAAV7PgPLwJ4M4tWcMbYMOGZEzw6YTw7qoDXkPpGO6cazRHnOU6D1 h6Zr0LBkia06ndVU2o0CvnyCTg4MjMY= X-Received: by 2002:a2e:9758:: with SMTP id f24mr4014354ljj.105.1573679433227; Wed, 13 Nov 2019 13:10:33 -0800 (PST) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id x23sm1554871lfe.8.2019.11.13.13.10.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Nov 2019 13:10:32 -0800 (PST) Received: by mail-lj1-f174.google.com with SMTP id d22so4193140lji.8 for ; Wed, 13 Nov 2019 13:10:32 -0800 (PST) X-Received: by 2002:a2e:9a8f:: with SMTP id p15mr4116040lji.148.1573679429322; Wed, 13 Nov 2019 13:10:29 -0800 (PST) MIME-Version: 1.0 References: <20191113204240.767922595@linutronix.de> <20191113210103.911310593@linutronix.de> In-Reply-To: <20191113210103.911310593@linutronix.de> From: Linus Torvalds Date: Wed, 13 Nov 2019 13:10:13 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch V3 02/20] x86/process: Unify copy_thread_tls() To: Thomas Gleixner Cc: LKML , "the arch/x86 maintainers" , Andy Lutomirski , Stephen Hemminger , Willy Tarreau , Juergen Gross , Sean Christopherson , "H. Peter Anvin" 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 Wed, Nov 13, 2019 at 1:02 PM Thomas Gleixner wrote: > > +int copy_thread_tls(unsigned long clone_flags, unsigned long sp, > + unsigned long arg, struct task_struct *p, unsigned long tls) ... > +#ifdef CONFIG_X86_64 .. > +#else > + /* Clear all status flags including IF and set fixed bit. */ > + frame->flags = X86_EFLAGS_FIXED; > +#endif Hmm. The unification I like, but it also shows these differences that I don't remember the reason for. Remind me why __switch_to_asm() on 32-bit safes eflags, but we don't do it on x86-64? The comment just talks about callee-saved registers, but flags isn't callee-saved, so there's something else going on. This patch clearly doesn't change anything, I'm not complaining about the patch at all. I'm just wondering about the odd difference that the patch exposes. Linus