Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5221839ybl; Wed, 22 Jan 2020 12:39:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzJb0tKyHHmwqg5Aqei/9iCMuB3gGfS2VrOpZuP4cZyCyvAOCgRvjiGWbAoGyHJAZ6SqbZC X-Received: by 2002:aca:814:: with SMTP id 20mr8297750oii.159.1579725550782; Wed, 22 Jan 2020 12:39:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579725550; cv=none; d=google.com; s=arc-20160816; b=xmHb4+YgrazSEChVGZdj6b7YFwzYmPDsEr4HXSoyfOeP/W4MMjk/D8Jx6ETWsIs40B J0y/ZenwyqbQyUc14xOqkGvf30HuGni/JOvbKGzNosGf6sdjzmbGw5WkQJ54/Y22R4Qv MX9jzfmRAABliauFpAz0yQsQIYqBdAvse2Polz4soh+4SvovmpUqxmR/LqxJhed7HqVF CgN7+Mo/eoYIOd54KWIVTtszlu7+4jgqK61vSL0+94BuPwGTXY5MV93Iw83zwcRcmrzb /yeIeLsezDQVeBs8uESzUN9/HkcBbbaaqVIRf8KZUYTGuVNqZeHywEQbd5jI+h/RKBou JBKQ== 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=1+kxcgoKIXPNuz6q7BSkcKmnHRpZmOPFZkwDBO8bnF8=; b=VdoEJ0oywEgOKzGUEcCXVrqVXE3OpG3B9yGc1qREF5RZFbAqTrGz/7+GcU034IqlhI 1hUEX09KHTQRRDC0kQ5OgBzIXY2IRKvjVus/utzeUhovFJtSlx4HlekZeAatTtfsWGRU 3XDBOiLiLkypXxS4TFqsWg23qwBK37qRf6FGeGX5pzw4idEcpcH5VEJk+Ulqg5O3xAX3 i1yuhERY60fUDgGqqgYzyIqNvPjnRW8IIZXv+O3at/UZ+gXNonYXpVMSrMLd/IqKKsxy AcmCnbedbzONAxExIFDtFpS4tlqn8alo/Y7iBeZviq+vX37aYsuP6eGLyc7zYbQCBZGy iNzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Nv+blg0T; 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 d17si21502614oib.174.2020.01.22.12.38.56; Wed, 22 Jan 2020 12:39:10 -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=@linux-foundation.org header.s=google header.b=Nv+blg0T; 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 S1729031AbgAVUhs (ORCPT + 99 others); Wed, 22 Jan 2020 15:37:48 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42648 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727590AbgAVUhs (ORCPT ); Wed, 22 Jan 2020 15:37:48 -0500 Received: by mail-lj1-f193.google.com with SMTP id y4so531646ljj.9 for ; Wed, 22 Jan 2020 12:37:45 -0800 (PST) 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=1+kxcgoKIXPNuz6q7BSkcKmnHRpZmOPFZkwDBO8bnF8=; b=Nv+blg0TyQMtacRxU2I6XSnt+AhuBO5PVbLffDiwNK7dfKfQ1HlL2njn4Kcc5QQvZC XrHkMOJ+TNVsqTo8xaGGY88gnEs4R8k0lv0gFFN6v0GDSlu9DdRmk50IvrRk3lq41JME pkknTcORBQobhN/Fny+iskXXCM8I4BshRRTHk= 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=1+kxcgoKIXPNuz6q7BSkcKmnHRpZmOPFZkwDBO8bnF8=; b=twW9iwegjas8+fdcfbH3c28NawcynOienznuwAEmSm6YEOLsqW6zYW6+LC77AkDli0 eOHhmKXEbsxmTUlLSytBlg6zTOomQuD/NDvEoQuZ8i5+4XbZUH6EBsTyopP7/DcP13Ju lNfBLG6WES9c4AkC0wptM/I7VprHXQMkcc6m2LcylEiDfIj1P8WrZAT6LHsIjDNE0KTu xXYyb6xrAhXAYqiwHWZYRUM9PBgYiAtm1wgN5ULJls462Lm3aKTHsFhbte4/ZBFqf7Ge upvoi+d7rftVTgmyPu2MYqQm63VSL+6NL6p2P7U6A5h/wa/CKY/ZwH1FMx8pjMSSBave vJgQ== X-Gm-Message-State: APjAAAVfLA6GGS0t7D3m8nMaopw6GIf4PLqxtZky+u3ts7XgQqV9eq55 RvJffXoDSxootomA4dU5qC1WcLpdv0g= X-Received: by 2002:a05:651c:38b:: with SMTP id e11mr20400707ljp.259.1579725464644; Wed, 22 Jan 2020 12:37:44 -0800 (PST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id f5sm5592866lfh.32.2020.01.22.12.37.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jan 2020 12:37:42 -0800 (PST) Received: by mail-lf1-f43.google.com with SMTP id z18so643575lfe.2 for ; Wed, 22 Jan 2020 12:37:42 -0800 (PST) X-Received: by 2002:ac2:4839:: with SMTP id 25mr2702966lft.192.1579725461822; Wed, 22 Jan 2020 12:37:41 -0800 (PST) MIME-Version: 1.0 References: <12a4be679e43de1eca6e5e2173163f27e2f25236.1579715466.git.christophe.leroy@c-s.fr> In-Reply-To: From: Linus Torvalds Date: Wed, 22 Jan 2020 12:37:25 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/6] fs/readdir: Fix filldir() and filldir64() use of user_access_begin() To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Alexander Viro , Andrew Morton , Linux Kernel Mailing List , linuxppc-dev , linux-fsdevel , Linux-MM Content-Type: multipart/mixed; boundary="000000000000feceab059cc07e0e" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000feceab059cc07e0e Content-Type: text/plain; charset="UTF-8" [ Talking to myself ] On Wed, Jan 22, 2020 at 12:00 PM Linus Torvalds wrote: > > COMPLETELY UNTESTED! It compiles for me. The generated assembly looks > ok from a quick look. Some more testing shows that objtool is unhappy about how we do that signal_pending(current) inside the user access region. I didn't notice because my test builds were with sane kernel configurations so that I could look at the generated code. But with KASAN enabled, the signal check causes accesses that KASAN wants to check, and I get objtool: filldir()+0x395: call to __kasan_check_read() with UACCESS enabled warnings. So that patch of mine isn't acceptable for silly reasons, and the signal check itself would need to be done outside of the user access area. That actually makes the whole "let's do the &prev->d_off setting unconditionally" much more interesting. So here's a slightly updated patch that does exactly that, and avoids the objtool warning. It actually generates better code than the last one too, because now we don't duplicate the user_access_end() for the EINTR case. So test this one instead, please. Linus --000000000000feceab059cc07e0e Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k5prqoze0 IGZzL3JlYWRkaXIuYyB8IDcwICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDM0IGluc2VydGlvbnMoKyks IDM2IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2ZzL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