Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp609561ybl; Thu, 23 Jan 2020 04:44:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyH/qhybVXLqjhG4ZVg1TfauHTh6KVH+xG3MvxrdiN3EQqXJqoHvpePiWcuRBdPN+x+IIJz X-Received: by 2002:a9d:22:: with SMTP id 31mr10387731ota.173.1579783492890; Thu, 23 Jan 2020 04:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579783492; cv=none; d=google.com; s=arc-20160816; b=DP7KoEJgYW58SaQrdmNowBePeCbJZoU6jWWWSEv6fY1kAHCyIzjmXwP6ztlPkdIXkY 5C5kwrpwlc32L8mUVi70gMy9FgsH7EiP00m5mBLanyxLNgTZfTRvJDGSWpM/aYAzIA2C kk84CtZlBfDyRI1ZKpxmdhPOe4Qqd2oAit0AyFcaaJq2h3PQ1xDBRGZkGX7SkVmQhw64 b3Y5N9PVu6bF/9Yo5599VdEk6VxWC0yLXYYVSTmwU9XSpcpdP+NOMBgwnPljDVoMxsFs BCrban3FO12FU8V8pjbZKrxpS370m7W1ImuMEA6PiL0RHAQrX+7G2YL0FxtDthh5kAhR ijvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=5u98EOtP2WKcTg/wP4g+30sC+JrkYBCOJLlRu95fhRc=; b=XOTfFzYDpjESlCy5oyi4maP03g2qXcei3lOywwwpxKMMxVvVsXmJrRBZyJ5mhyD34n ig7C382rvKpcdIHz1N+Iiv0tVRaVxmE7R/65l45CEYaGyOk4Gl32G2QA2b1CrcYTqO6q an8KwYrnrZzAMwpnVpBChDLGUyTQI4OnpUYU7E6CEYj59GS4OZ7rS1I0hWxAGyc6DE2g 5YHwgGRUPToVGZT6DZ3FKSaE25dARvhcw1qeKBp1NLp17alzJOVp5WXuhJv9xP9LmxTg juNH7QR5AE0JqpgwDvHlZ2S6QMBV4fwe7FOLddIMmDmZWF5q51hBObN4kQcNaXG4NRp2 zUBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=M+c4fJVZ; 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 c10si1027441otr.88.2020.01.23.04.44.40; Thu, 23 Jan 2020 04:44:52 -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=@c-s.fr header.s=mail header.b=M+c4fJVZ; 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 S1728655AbgAWMnK (ORCPT + 99 others); Thu, 23 Jan 2020 07:43:10 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:51628 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbgAWMnJ (ORCPT ); Thu, 23 Jan 2020 07:43:09 -0500 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: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 23/01/2020 à 13:00, Michael Ellerman a écrit : > Michael Ellerman writes: >> Hi Christophe, >> >> This patch is independent of the rest of the series AFAICS > > 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 hangs, looping forever in do_page_fault()). > >> So I'll take patches 2-6 via powerpc and assume this patch will go via >> Linus or Al or elsewhere. > > So I guess I'll wait and see what happens with patch 1. We could eventually opt out user_access_begin() for CONFIG_PPC_BOOK3S_32, then you could take patches 3 and 6. That's enough 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 the series (once we have patch 1, we normally don't hit the problem fixed by patch 2). Won't don't need patch 4 until we want user_access_begin() supported by book3s/32 However, I'm about to send out a v3 with a different approach. It modifies the core part where user_access_begin() is returning an opaque value used by user_access_end(). And it also tells user_access_begin() whether it's a read or a write, so that we can limit unlocking to write 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 I'll be able to make a v4 rebasing all this on top of patch 3 and 6 of v3 series. Tell me what you prefer. Christophe