Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1533606pxk; Fri, 4 Sep 2020 11:46:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDdqBNIlY3KEZp24yelPSYpUWkHmioLkdkP5v+jboodfKGgbI3nvXiR005+N4DHBtchZiI X-Received: by 2002:a50:cd5d:: with SMTP id d29mr10523545edj.318.1599245197286; Fri, 04 Sep 2020 11:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599245197; cv=none; d=google.com; s=arc-20160816; b=qK9g0D+rUJmKxHgQn/nu1tRT4ujQIhAmskDRAfCIzesm2RJl30Npa0ZCAZrYLISEXz 4CZfO3ymISKwrx+GcOFH+HWyKCluR7SIsaRz1l9IzRRDr8NzdMCTswQKVLgMchq34TRA 2N1xv5ePwURTpZTs8kVIgqiH6lILFugy4ZfZGzklFtDaK5DHULQd42Oh9YYzhV+KRjzQ am8+hkLvTBXd8p5Pn4yM5/qrwx4POEZDl6uqrs6ME+TiiB6zy5uYPOPPOQmkP3qdsKpA KqIF4TXwbteng81apZb2fmv7dOhnLTVNGC4AhAfoqIpxWpwqrTt3pALnCXoog5KgHAV+ MAug== 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=zGVkw+VA7Ozv3hFmklGnXOESB94iioBKwZC/vClHWhs=; b=q2ohREx3D/0fCNS3xBeSG8SPTWxTIhab+ckemH9ASdus6NOxgx1JPAw0pWOuRY4UL/ X8d0h55AnOpdUsOxp9UKJskLr8MKSQIPh4OP7EYx3yiUuzGjPeVF3nulxDgnPovuXkWz P40FF6Jd3QLjKsTjkEXzkMdXuToxx+6BpdgjOaMul/LbfGkp97CYSLiIghs8O71RBc+2 bRqO+hjWE57kYlRD2aijgYU92FLJqJPKna7N25NJ2M7gdeTfdMth1ikIeta0yATn4RFG /gMR+42aoXazsppzUNgdtzBn0jPdyOAOSNi7bYdFe+r5LGgk8ewjie6Z+oc2CbIoojny 0eOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=OrfWsLi5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p25si4468954ejc.686.2020.09.04.11.46.09; Fri, 04 Sep 2020 11:46:37 -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=@linux-foundation.org header.s=google header.b=OrfWsLi5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726277AbgIDSnK (ORCPT + 99 others); Fri, 4 Sep 2020 14:43:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbgIDSnI (ORCPT ); Fri, 4 Sep 2020 14:43:08 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42184C061244 for ; Fri, 4 Sep 2020 11:43:06 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id w14so9163387ljj.4 for ; Fri, 04 Sep 2020 11:43:06 -0700 (PDT) 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=zGVkw+VA7Ozv3hFmklGnXOESB94iioBKwZC/vClHWhs=; b=OrfWsLi5zsx7qv2p1cK4X32zmscuCKlgmthoMdeY0cg3rmZpFdM3J9SvTCb9h5NnO9 l0B0liyZtyXuNnV2gWB/4L3fr4ZoZu9bcbKCQOsRIl87cavO0SjGkvX9fTqXGzvbc3Rk 8ry1Oj9UgjhZbRiLcVNkm18IHcMLIsEb6rQfY= 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=zGVkw+VA7Ozv3hFmklGnXOESB94iioBKwZC/vClHWhs=; b=BKpvw4J4Db4A+mrKMG5iaPmPxXYVhJT7JcItEEUO2L4MOHJq0y61HtiXxCqO8hakrt wVOO5vmm8feskEgMYZZChwwsrgo1rodeS4f8Cs9WTRXDl5Np7UhM1VgstKTuslnNSA2n HrsWFnk/G87uI0GbQWijZhuPIIYsUjL50xJZldASfzTsHimRmy4+0uGuSkt9sRwxADLo 3MeAT7wh7fb2HzCvpT4glgw7MsWMdjqtvyv1CgImLziUFZ4Qcn9opX5FmEjRDE03IFcS ryCjrR5eW/IpKCQfsaiGvuZVJGdC+EWVhxtU5VF6z4UK0gThnDJ6ymiZDjnv2s0LAMa5 s8BA== X-Gm-Message-State: AOAM530ST15OkI85VSzSKZhllY4hZDk1ZFbgKFEAE9MCxsDS+dazwAQF b1HC/m1sFekJGNsDHh7sbpzV3IrikDzC4g== X-Received: by 2002:a2e:6f17:: with SMTP id k23mr4738109ljc.245.1599244980511; Fri, 04 Sep 2020 11:43:00 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id y5sm1422446lfy.88.2020.09.04.11.42.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Sep 2020 11:42:59 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id r13so9197997ljm.0 for ; Fri, 04 Sep 2020 11:42:58 -0700 (PDT) X-Received: by 2002:a2e:84d6:: with SMTP id q22mr3675523ljh.70.1599244978377; Fri, 04 Sep 2020 11:42:58 -0700 (PDT) MIME-Version: 1.0 References: <20200903142242.925828-1-hch@lst.de> <20200904060024.GA2779810@gmail.com> <20200904175823.GA500051@localhost.localdomain> In-Reply-To: <20200904175823.GA500051@localhost.localdomain> From: Linus Torvalds Date: Fri, 4 Sep 2020 11:42:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: remove the last set_fs() in common code, and remove it for x86 and powerpc v3 To: Alexey Dobriyan Cc: Ingo Molnar , Christoph Hellwig , Al Viro , Michael Ellerman , "the arch/x86 maintainers" , Luis Chamberlain , Kees Cook , Linux Kernel Mailing List , linux-fsdevel , linux-arch , linuxppc-dev 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 Fri, Sep 4, 2020 at 10:58 AM Alexey Dobriyan wrote: > > set_fs() is older than some kernel hackers! > > $ cd linux-0.11/ > $ find . -type f -name '*.h' | xargs grep -e set_fs -w -n -A3 Oh, it's older than that. It was there (as set_fs) in 0.10, and may even predate that. But sadly, I don't have tar-balls for 0.02 and 0.03, so can't check. The actual use of %fs as the user space segment is already there in 0.01, but there was no 'set_fs()'. That was a simpler and more direct time, and "get_fs()" looked like this back then: #define _fs() ({ \ register unsigned short __res; \ __asm__("mov %%fs,%%ax":"=a" (__res):); \ __res;}) and all the setting was basically part of the kernel entry asm and. Lovely. Linus