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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 568A8C33CAF for ; Thu, 23 Jan 2020 12:43:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E1D3324655 for ; Thu, 23 Jan 2020 12:43:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=c-s.fr header.i=@c-s.fr header.b="M+c4fJVZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1D3324655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=c-s.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 75EC86B0003; Thu, 23 Jan 2020 07:43:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 70F926B0005; Thu, 23 Jan 2020 07:43:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FE336B0006; Thu, 23 Jan 2020 07:43:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id 4636F6B0003 for ; Thu, 23 Jan 2020 07:43:10 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id E13B7181AC1F5 for ; Thu, 23 Jan 2020 12:43:09 +0000 (UTC) X-FDA: 76408864098.22.wish66_38a2988f0bf14 X-HE-Tag: wish66_38a2988f0bf14 X-Filterd-Recvd-Size: 4492 Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Thu, 23 Jan 2020 12:43:09 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 483MPk32vtz9vB4D; Thu, 23 Jan 2020 13:43:06 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=M+c4fJVZ; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id MKcSH7ytUAbU; Thu, 23 Jan 2020 13:43:06 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 483MPk1fHkz9vB4C; Thu, 23 Jan 2020 13:43:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1579783386; bh=5u98EOtP2WKcTg/wP4g+30sC+JrkYBCOJLlRu95fhRc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=M+c4fJVZVBnhS3LrJqZpaNaPKS4omcdwek4cx3zgeBhOVTUQxWipdFpZ3dDE3jsb7 0vzFt2dnk9ceZD4rJtPz5HH55nBprFw7Z9bgGytv+K2FL9rBFrU7xN6VvBJEmk9AqC 23kWu25GIwSDC3iQWt5qcsPySMvP0N41mgpbhqEk= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5537F8B82B; Thu, 23 Jan 2020 13:43:07 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id IWp1L7UGbtAy; Thu, 23 Jan 2020 13:43:07 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 871D98B826; Thu, 23 Jan 2020 13:43:06 +0100 (CET) Subject: Re: [PATCH v2 1/6] fs/readdir: Fix filldir() and filldir64() use of user_access_begin() To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Linus Torvalds , Alexander Viro , Andrew Morton Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <12a4be679e43de1eca6e5e2173163f27e2f25236.1579715466.git.christophe.leroy@c-s.fr> <87muaeidyc.fsf@mpe.ellerman.id.au> <87k15iidrq.fsf@mpe.ellerman.id.au> From: Christophe Leroy Message-ID: Date: Thu, 23 Jan 2020 13:43:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <87k15iidrq.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Le 23/01/2020 =C3=A0 13:00, Michael Ellerman a =C3=A9crit=C2=A0: > Michael Ellerman writes: >> Hi Christophe, >> >> This patch is independent of the rest of the series AFAICS >=20 > And of course having hit send I immediately realise that's not true. Without this, book3s/32 fails booting. (And without patch 2, it even=20 hangs, looping forever in do_page_fault()). >=20 >> So I'll take patches 2-6 via powerpc and assume this patch will go via >> Linus or Al or elsewhere. >=20 > So I guess I'll wait and see what happens with patch 1. We could eventually opt out user_access_begin() for=20 CONFIG_PPC_BOOK3S_32, then you could take patches 3 and 6. That's enough=20 to have user_access_begin() and stuff for 8xx and RADIX. Patch 2 should be taken as well as a fix, and can be kept independant of=20 the series (once we have patch 1, we normally don't hit the problem=20 fixed by patch 2). Won't don't need patch 4 until we want user_access_begin() supported by=20 book3s/32 However, I'm about to send out a v3 with a different approach. It=20 modifies the core part where user_access_begin() is returning an opaque=20 value used by user_access_end(). And it also tells user_access_begin()=20 whether it's a read or a write, so that we can limit unlocking to write=20 acccesses on book3s/32, and fine grain rights on book3s/64. Maybe you would prefer this change on top of first step, in which case=20 I'll be able to make a v4 rebasing all this on top of patch 3 and 6 of=20 v3 series. Tell me what you prefer. Christophe