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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 913A5C04FF3 for ; Mon, 24 May 2021 08:39:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2810561151 for ; Mon, 24 May 2021 08:39:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2810561151 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 711DF940050; Mon, 24 May 2021 04:39:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EA19940042; Mon, 24 May 2021 04:39:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B12D940050; Mon, 24 May 2021 04:39:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0211.hostedemail.com [216.40.44.211]) by kanga.kvack.org (Postfix) with ESMTP id 2BBE4940042 for ; Mon, 24 May 2021 04:39:22 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A79B1815F for ; Mon, 24 May 2021 08:39:21 +0000 (UTC) X-FDA: 78175475322.13.15C79EC Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf28.hostedemail.com (Postfix) with ESMTP id 1B9BA20007FA for ; Mon, 24 May 2021 08:39:15 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1621845559; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mjxvWAvOCJRMEsP/LeDM6TS4/Fq6dQC1dCNTIlx2sgc=; b=WmCYjj0zXXpbdQSFXXM2fC8bPnZhxUcQOxQ10YDIyRgnnChp8HU714tRRlWxYaAaIIyul5 VpR5zFWOFkpRXzJr+lAF1MbHrQQU5qMLAUS/85fkSvqlZOv9Q2FnHEvUJPNBPn4+bo1Apw 0OfWqG5mmVxRCl562CEHfaD52h07AKM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1621845559; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mjxvWAvOCJRMEsP/LeDM6TS4/Fq6dQC1dCNTIlx2sgc=; b=l50JzRBtn8w7158ZD3kE3ZFSfqo873ry/nCxpkwHMV4uA2Z/Fv3nDNAT4Z1RehOWNopnkt xW52JOBaZV+J1VCA== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8720BABB1; Mon, 24 May 2021 08:39:19 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 1DDAD1F2CA2; Mon, 24 May 2021 10:39:19 +0200 (CEST) Date: Mon, 24 May 2021 10:39:19 +0200 From: Jan Kara To: Andreas Gruenbacher Cc: Jan Kara , Andy Lutomirski , Alexander Viro , cluster-devel , linux-fsdevel , Linux-MM Subject: Re: [PATCH 6/6] gfs2: Fix mmap + page fault deadlocks (part 2) Message-ID: <20210524083919.GA32705@quack2.suse.cz> References: <20210520122536.1596602-1-agruenba@redhat.com> <20210520122536.1596602-7-agruenba@redhat.com> <20210520133015.GC18952@quack2.suse.cz> <20210521152352.GQ18952@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=WmCYjj0z; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=l50JzRBt; spf=pass (imf28.hostedemail.com: domain of jack@suse.cz designates 195.135.220.15 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 1B9BA20007FA X-Stat-Signature: tj5h6w8g5a6q6jikotfokhe5p9kh87r1 X-HE-Tag: 1621845555-647855 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: On Fri 21-05-21 17:46:04, Andreas Gruenbacher wrote: > On Fri, May 21, 2021 at 5:23 PM Jan Kara wrote: > > On Thu 20-05-21 16:07:56, Andreas Gruenbacher wrote: > > > > So you probably need to add a new VM_FAULT_ > > > > return code that will behave like VM_FAULT_SIGBUS except it will not raise > > > > the signal. > > > > > > A new VM_FAULT_* flag might make the code easier to read, but I don't > > > know if we can have one. > > > > Well, this is kernel-internal API and there's still plenty of space in > > vm_fault_reason. > > That's in the context of the page fault. The other issue is how to > propagate that out through iov_iter_fault_in_readable -> > fault_in_pages_readable -> __get_user, for example. I don't think > there's much of a chance to get an additional error code out of > __get_user and __put_user. Yes, at that level we'd get EFAULT as in any other case. Really the only difference of the new VM_FAULT_ error code from a case of "standard" error and VM_FAULT_SIGBUS would be not raising the signal. Honza -- Jan Kara SUSE Labs, CR