Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp298097pxf; Wed, 24 Mar 2021 05:32:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeFfpPqQMOPmAgrLN3U62HRUsISjP5PqeUfuUpH0VCAsE38CphYO+ItM9k5TAZ1ty5ccst X-Received: by 2002:a17:906:874f:: with SMTP id hj15mr3368528ejb.404.1616589176037; Wed, 24 Mar 2021 05:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616589176; cv=none; d=google.com; s=arc-20160816; b=cJ1wxYq1cID9aUiIF0bE+7F8DJzAf8cQcwAhoYGpSF+5tJAToQpTD3go1BrCds+yiM wHj529PyWrh70NtBELUbliGES498hUqdgkpjgpHcrvtTx+NUiuQ3cmI0FoC9YRk8amG4 97jyK869z/OzZ/J1awnSRiR15o7lbmnVBrdsii6WSCp7wXX4LILa+F0XZhgydmBHS7Ff 4A2QD3Mc9Yuow9zKPv9mapjj18jQYKBbDldWlt2XXpO+UjSp98rp8Ehb/4dHm8906BI0 e2ajcqOkd9lADy2ytDbhEOP1A3Q1snUbG50kWDtjBrEiTMvEPxygANfyEZSBvmVPtpsO 0CWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=B2ZSJcfMvxx2j+MoXi4xkzWBhf0+6mtUfi2hQHcxF2g=; b=ZdUHZjNvy2/62FD1uvhxVvEz4M9Ezr+AkyAirFvgzSqyOYzPGaU/xXnMBQWDw6RtUO s+Pv1pS/y51djNxseD7AAjhbmMqC2Tfe0usyUZgAH5byPjrSMaoUAtEHFfVd7WvGBm/9 ohe6CRtjlmk7Sbj9ThJE028jxGU43540wrewLcsruY2UG11Un4xbaTOKNKZFPShN4132 yUIm0A09DV+kojQ1uq7/Sz331ytHIv4mG3D8VmAPXW05pQoC1vDgM0fQnrGNsTtI5gzy I6DLtIHoREIx1T9jWCvYiVpGnQ3kfg9adXuilzbkTD11en1jHhZEVL12KlC9x/bIMnXX r70A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 b17si1547800ejp.314.2021.03.24.05.32.32; Wed, 24 Mar 2021 05:32:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232010AbhCXM3E (ORCPT + 99 others); Wed, 24 Mar 2021 08:29:04 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:45388 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232207AbhCXM2c (ORCPT ); Wed, 24 Mar 2021 08:28:32 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lP2aZ-008pxL-JV; Wed, 24 Mar 2021 12:26:19 +0000 Date: Wed, 24 Mar 2021 12:26:19 +0000 From: Al Viro To: Miklos Szeredi Cc: Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH v2 01/18] vfs: add miscattr ops Message-ID: References: <20210322144916.137245-1-mszeredi@redhat.com> <20210322144916.137245-2-mszeredi@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 24, 2021 at 09:45:02AM +0100, Miklos Szeredi wrote: > On Wed, Mar 24, 2021 at 6:03 AM Al Viro wrote: > > > > On Mon, Mar 22, 2021 at 03:48:59PM +0100, Miklos Szeredi wrote: > > > > minor nit: copy_fsxattr_{to,from}_user() might be better. > > > > > +int fsxattr_copy_to_user(const struct miscattr *ma, struct fsxattr __user *ufa) > > > +{ > > > + struct fsxattr fa = { > > > + .fsx_xflags = ma->fsx_xflags, > > > + .fsx_extsize = ma->fsx_extsize, > > > + .fsx_nextents = ma->fsx_nextents, > > > + .fsx_projid = ma->fsx_projid, > > > + .fsx_cowextsize = ma->fsx_cowextsize, > > > + }; > > > > That wants a comment along the lines of "guaranteed to be gap-free", > > since otherwise you'd need memset() to avoid an infoleak. > > Isn't structure initialization supposed to zero everything not > explicitly initialized? All fields, but not the padding... > The one in io_uring() seems wrong also, as a beast needing > file_dentry() should never get out of overlayfs and into io_uring: That one would be wrong in overlayfs as well - we'd better had the same names in all layers... > --- a/fs/io_uring.c > +++ b/fs/io_uring.c > @@ -9297,7 +9297,7 @@ static void __io_uring_show_fdinfo(struct > io_ring_ctx *ctx, struct seq_file *m) > struct file *f = *io_fixed_file_slot(ctx->file_data, i); > > if (f) > - seq_printf(m, "%5u: %s\n", i, file_dentry(f)->d_iname); > + seq_printf(m, "%5u: %pD\n", i, f); > else > seq_printf(m, "%5u: \n", i); > } > > > Thanks, > Miklos