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.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,TVD_SUBJ_WIPE_DEBT 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 AFB8FC433E2 for ; Fri, 4 Sep 2020 18:43:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7263C206B7 for ; Fri, 4 Sep 2020 18:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599244993; bh=N5PAkSlIk0qcHX4rtRlCLcSF64blII7w8mhZIM/MbFk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=ycm6QPI92iWJ85WxS3hEc/pFdKbxAMJtHJRjr5AyFE143u+zCX7sk5S8eYmTIQz3Y cRnkpqBlyEn/DzwdfVxWGqcZoiy9+PB82F+URBpjE4Xc8hsd0wnbyq3xRPefj3jcds i+ZevDIH/5zCdI7AOVUYPvf5JJQ0Dc7pX+alGtX0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726047AbgIDSnK (ORCPT ); Fri, 4 Sep 2020 14:43:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbgIDSnI (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 4A0CFC061245 for ; Fri, 4 Sep 2020 11:43:06 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id w3so9129280ljo.5 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=DLyxN38WrsHP5YBBUAEvzzMyhtv3l6tBJctEufcF2+JQKij7hEli9FZVmbr8DGq0nj Iu2nDAJSz10VkRe7zdTVMJYXveDc25QmR+kO90pG2qOifxkU+uuos/FM9xwcGLW+wjyk b+RmAffhMVC3tzcguQJYd582pIEMkoZz90SMusHN++b6Yl9SMa9x0af+p2vw+IWFAGt+ vbJnlzmHiFytM7rA8nYxx9WKYw8bQjdhSud5pHSbOM+hYoGZ5KyfHBeYOdrY6f4cTFvW hMv2NOV8gP/84GRTeCYuo1W2mpjz47sAuOnpj/z561O91lwHwFGpqVQiuXflaR9BuUJ8 9uTg== X-Gm-Message-State: AOAM530jKxC11+2H8fJonVg9vVTQmgyVonmtKn6CyAG9S+pXFYRds1Bh rc7+gkfowUq5y5K1b4fbew1yRDh2B3zN9g== X-Google-Smtp-Source: ABdhPJyqQP15pLqU5JikpbuGjfIphE1nABdLoqV6sakCJDgFkd1z3UIMfz7e4+/YB6AK4cQ03bvAow== X-Received: by 2002:a2e:8193:: with SMTP id e19mr4996624ljg.80.1599244980846; Fri, 04 Sep 2020 11:43:00 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id h16sm1461549lfc.63.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-f182.google.com with SMTP id y4so9128001ljk.8 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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