Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1351478pxb; Tue, 26 Oct 2021 07:31:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZAvXV35PWOgZE50/OcSeagcv8NUOK5L9G+kkpssNLt8eUW5ukPkNzrARvSjOWfZ7jJusx X-Received: by 2002:a17:906:a182:: with SMTP id s2mr31313438ejy.176.1635258670916; Tue, 26 Oct 2021 07:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635258670; cv=none; d=google.com; s=arc-20160816; b=FM9K0WCfz/f71tkRwl84tok4RDFd1et1U2n1lsCgZm4UyABKlLTMj6v3aBmIQD2Grd 4nnso22PXPVlgCQRTTNg3dRjmILC7SP7J3qPbnYbmYym2XKCTEVDMuiqVFAC63r2NNcY bnSgl7DcT3epC11BawnU9xYWcCURf6MfH4YBFK0I0npZ8r9gApSLtqJrCY464LI94vAV 3OpTDsZnqm7JN18AgE7M/iUNmfxca560GzOz15aeBhpksLH/8S+gzmSXgrTBTah8s14n TZlTRsxayhXMGR6OgrQquGcs9WozUb2wbb3v1UAB+oFgZI/77CyZT4mCHi1N7w4Jcoki fkrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=RyjRbs13Q6FC77TliUQSlFXG3BjAyQNOL98Zw53Q71o=; b=WwYlv90uN0d18SjAo0JjAXh6vTkY6QGqq5TvSqNgZkukqCkIyd6V1xHkttjMj+YL4V OBiEkG20xWkxqc+9e4jYwfe6dGs2Yu0Jc3t/vH6dPI0DhxbD8x85xVwxv7nwbM0eyUDH v3e5VQxeuQR6bcOJYpmwEwa6o6fgnjwXygz1jxctNQFrm5xtnfLmphANkgO4LHwTsyqc mVmG9cGp75CDWqKKyQTGXs4UI6/qj0DarROMsr75cMe8vJ08z9FrOK7guOLo4JQ+qFJR VgVlIfWl/LsUXYpe0yhHcgYt9IYNaHpHMyKjZ9wUohh9TKHfKorZ8Gh3wXeY7PPw3VCl IqZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=my+j0d0t; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=GZUQd92E; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q10si11309171edw.392.2021.10.26.07.30.45; Tue, 26 Oct 2021 07:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=my+j0d0t; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=GZUQd92E; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235682AbhJZMJI (ORCPT + 99 others); Tue, 26 Oct 2021 08:09:08 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:60970 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235738AbhJZMJC (ORCPT ); Tue, 26 Oct 2021 08:09:02 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 098572193C; Tue, 26 Oct 2021 12:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1635249998; 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=RyjRbs13Q6FC77TliUQSlFXG3BjAyQNOL98Zw53Q71o=; b=my+j0d0t9CwC5WyZ+iqBY32+ynYT3vWd3h4rmhlfK4G8n3u2BgTVaLyhZyZdiAEMoByh9K RboCe2Q5TpWcaC+dd/w+EuW71LbMqicm1ZTeunStGV972K/LANs6UNs+eDbtMUkvTfapzg 23/lFqtZoXeaYWYQGx/vhwiWvRXPBGk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1635249998; 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=RyjRbs13Q6FC77TliUQSlFXG3BjAyQNOL98Zw53Q71o=; b=GZUQd92EQNYMhBz+cBvVS5up9G9ce2xHX9rW+5OZc6O+MFp4n4XLfBA4q+fzIBcv77BAdU XYjuTLyvfyelYgDg== Received: from quack2.suse.cz (unknown [10.100.224.230]) by relay2.suse.de (Postfix) with ESMTP id E6B8FA3B8C; Tue, 26 Oct 2021 12:06:37 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id C34BC1F2C66; Tue, 26 Oct 2021 14:06:37 +0200 (CEST) Date: Tue, 26 Oct 2021 14:06:37 +0200 From: Jan Kara To: Amir Goldstein Cc: Gabriel Krisman Bertazi , Jan Kara , "Darrick J. Wong" , Theodore Tso , Dave Chinner , David Howells , Khazhismel Kumykov , linux-fsdevel , Linux API , Ext4 , kernel@collabora.com, Jan Kara Subject: Re: [PATCH v9 24/31] fanotify: Report fid entry even for zero-length file_handle Message-ID: <20211026120637.GD21228@quack2.suse.cz> References: <20211025192746.66445-1-krisman@collabora.com> <20211025192746.66445-25-krisman@collabora.com> 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) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue 26-10-21 12:09:19, Amir Goldstein wrote: > On Mon, Oct 25, 2021 at 10:30 PM Gabriel Krisman Bertazi > wrote: > > > > Non-inode errors will reported with an empty file_handle. In > > preparation for that, allow some events to print the FID record even if > > there isn't any file_handle encoded > > > > Even though FILEID_ROOT is used internally, make zero-length file > > handles be reported as FILEID_INVALID. > > > > Reviewed-by: Amir Goldstein > > Reviewed-by: Jan Kara > > Signed-off-by: Gabriel Krisman Bertazi > > > > --- > > Changes since v8: > > - Move fanotify_event_has_object_fh check here (jan) > > Logically, this move is wrong, because after this patch, > copy_fid_info_to_user() can theoretically be called with NULL fh in the > existing construct of: > if (fanotify_event_has_object_fh(event)) { > ... > ret = copy_fid_info_to_user(fanotify_event_fsid(event), > > fanotify_event_object_fh(event), > > The thing that prevents this case in effect is that FAN_FS_ERROR > is not yet wired, but I am not sure if leaving this theoretic bisect > issue is a good idea. > > Anyway, that's a very minor theoretic issue and I am sure Jan can > decide whether to deal with it and how (no need to post v10 IMO). Hum, correct. I guess I'll just fold this patch into patch 26. Logically they are very close anyway. Honza -- Jan Kara SUSE Labs, CR