Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2387834ybc; Wed, 13 Nov 2019 13:43:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwhEpkKHVtC2yQEIkFfUHRRuMhWcMGnz6Lctp4yDAHAl2jMBpvIwauj+F2Czm2bhoNGw7ud X-Received: by 2002:a05:6402:783:: with SMTP id d3mr6080126edy.180.1573681399323; Wed, 13 Nov 2019 13:43:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573681399; cv=none; d=google.com; s=arc-20160816; b=ZQ3VdJ6CShZQQ95QQVqGIJKiOtmRN4HLdH4BrBYjVgmER0bWcZszb/yYvKcodLpGkO P1ruiqjItfVGHNkOc80ymnhXmDNxl2kPxpTTpfuATet9qSlT3fcF7GFG5hCL6Fc3iTZm f4Cf+TBA/gma+Wz9aL43DHs+ibJk+0g6HnjYZ4hF65lUxcDVUuH+/4nodlvF5iNcVogK 9PYnG3FReon9QQwW8ZqGQZTEp+JA4h5e1GePZlx7C4Q9bqmsf3Cdi7aj2+XUD1Ze6LAT oNnHQ2l1ouyQs160OIfmFsE37ecKUJ8l2kmwPbqV+FQ4jgtFfANdOWlqPtHYdCDfM3/K KYrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=JQg4A4xtufXt2Uy3HNLjpesaCp4ehqo0BTa4cgiCj9I=; b=tKdQlZ66iO+rWjRYTk/ooL0IwINNipOcMZd9RNM/AvbheOwnZeV4cyCIA1vDpMOJnv sOK3rRbLfghe3LMp8uO0390/XVcq15bd63ibnmZ7IryKcm5yJxnG4IF4SpkwlK5yVver WbOpgoDsJkr/C7FlX/k2ACC+l5iKgH8G3PZbc8TNeIK9pGq4jT3FkYTH2/+gCwZjQ6dD GX5zo36ALHG0TY8PUdB1GZDfjBVnatf7J07x8Zn+qUKA01bC3PQanVBjAhCfre1bLkDz XQ5rkpbw7Li5L7xcAmhRgQ0WktWWyn/Fcv4lCzL+0mkt3RCjEZsayzzP3Sz66A4L8nIO HBNQ== ARC-Authentication-Results: i=1; mx.google.com; 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 a3si2036906ejy.247.2019.11.13.13.42.54; Wed, 13 Nov 2019 13:43:19 -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; 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 S1726473AbfKMVlo (ORCPT + 99 others); Wed, 13 Nov 2019 16:41:44 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:39127 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbfKMVlo (ORCPT ); Wed, 13 Nov 2019 16:41:44 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iV0OR-0006sP-R1; Wed, 13 Nov 2019 22:41:40 +0100 Date: Wed, 13 Nov 2019 22:41:38 +0100 (CET) From: Thomas Gleixner To: Linus Torvalds cc: LKML , the arch/x86 maintainers , Andy Lutomirski , Stephen Hemminger , Willy Tarreau , Juergen Gross , Sean Christopherson , "H. Peter Anvin" Subject: Re: [patch V3 02/20] x86/process: Unify copy_thread_tls() In-Reply-To: Message-ID: References: <20191113204240.767922595@linutronix.de> <20191113210103.911310593@linutronix.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Nov 2019, Linus Torvalds wrote: > 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. See commit: 64604d54d311 ("sched/x86_64: Don't save flags on context switch") We need "only" make objtool support 32bit :) Thanks, tglx