All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions
Date: Tue, 29 Jul 2014 14:58:08 -0400	[thread overview]
Message-ID: <20140729145808.79bec165@lwn.net> (raw)
In-Reply-To: <1406309888-10749-6-git-send-email-adas@redhat.com>

On Fri, 25 Jul 2014 12:38:08 -0500
Abhi Das <adas@redhat.com> wrote:

> This patch adds support in GFS2 for the xgetdents syscall by
> implementing the xreaddir file operation.

So I was trying to make sense of this, and ran into one little thing that
jumped out at me:

> +static int gfs2_xrdir_to_user_vars(struct gfs2_xrdir_ctx *xc,
> +				   struct gfs2_xdirent *x,
> +				   struct gfs2_xdirent *x_vb_p,
> +				   struct linux_xdirent __user *lxd,
> +				   size_t count, size_t *bytes)

Now, I'll readily admit that I could be overly confused by this function.
When the variables are named "x", "xx", "xc", "x_vb_p", "xblob", and "lxd",
it all starts to run together.  But still...

> +	if ((xc->xc_xattr_mask & XSTAT_XATTR_ALL) &&
> +		lxd->xd_blob.xb_xattr_count) {

How can that be right?  lxd is __user, it doesn't seem right to be
dereferencing it directly...?

Thanks,

jon



WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Corbet <corbet@lwn.net>
To: Abhi Das <adas@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	cluster-devel@redhat.com
Subject: Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions
Date: Tue, 29 Jul 2014 14:58:08 -0400	[thread overview]
Message-ID: <20140729145808.79bec165@lwn.net> (raw)
In-Reply-To: <1406309888-10749-6-git-send-email-adas@redhat.com>

On Fri, 25 Jul 2014 12:38:08 -0500
Abhi Das <adas@redhat.com> wrote:

> This patch adds support in GFS2 for the xgetdents syscall by
> implementing the xreaddir file operation.

So I was trying to make sense of this, and ran into one little thing that
jumped out at me:

> +static int gfs2_xrdir_to_user_vars(struct gfs2_xrdir_ctx *xc,
> +				   struct gfs2_xdirent *x,
> +				   struct gfs2_xdirent *x_vb_p,
> +				   struct linux_xdirent __user *lxd,
> +				   size_t count, size_t *bytes)

Now, I'll readily admit that I could be overly confused by this function.
When the variables are named "x", "xx", "xc", "x_vb_p", "xblob", and "lxd",
it all starts to run together.  But still...

> +	if ((xc->xc_xattr_mask & XSTAT_XATTR_ALL) &&
> +		lxd->xd_blob.xb_xattr_count) {

How can that be right?  lxd is __user, it doesn't seem right to be
dereferencing it directly...?

Thanks,

jon

  reply	other threads:[~2014-07-29 18:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 17:38 [Cluster-devel] [RFC PATCH 0/5] xgetdents system call Abhi Das
2014-07-25 17:38 ` Abhi Das
2014-07-25 17:38 ` [Cluster-devel] [RFC PATCH 1/5] fs: xstat system call VFS bits Abhi Das
2014-07-25 17:38   ` Abhi Das
2014-07-25 17:38   ` Abhi Das
2014-07-25 18:17   ` [Cluster-devel] " Bob Peterson
2014-07-25 18:17     ` Bob Peterson
2014-07-25 17:38 ` [Cluster-devel] [RFC PATCH 2/5] fs: Add xgetdents system call and xreaddir file operation Abhi Das
2014-07-25 17:38   ` Abhi Das
2014-07-25 17:38   ` Abhi Das
2014-07-29  8:20   ` [Cluster-devel] " Michael Kerrisk
2014-07-29  8:20     ` Michael Kerrisk
2014-07-29  8:20     ` Michael Kerrisk
2014-07-25 17:38 ` [Cluster-devel] [RFC PATCH 3/5] gfs2: Add a dynamic buffer backed by a vector of pages Abhi Das
2014-07-25 17:38   ` Abhi Das
2014-07-25 17:38   ` Abhi Das
2014-07-25 18:42   ` [Cluster-devel] " Bob Peterson
2014-07-25 18:42     ` Bob Peterson
2014-07-25 17:38 ` [Cluster-devel] [RFC PATCH 4/5] gfs2: Add sort functionality with extra parameter Abhi Das
2014-07-25 17:38   ` Abhi Das
2014-07-25 17:38 ` [Cluster-devel] [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions Abhi Das
2014-07-25 17:38   ` Abhi Das
2014-07-29 18:58   ` Jonathan Corbet [this message]
2014-07-29 18:58     ` Jonathan Corbet
2014-07-29 22:25     ` [Cluster-devel] " Abhijith Das
2014-07-29 22:25       ` Abhijith Das
2014-07-30  9:06       ` [Cluster-devel] " Steven Whitehouse
2014-07-30 13:57       ` Jonathan Corbet
2014-07-30 13:57         ` Jonathan Corbet
2014-07-29  8:18 ` [Cluster-devel] [RFC PATCH 0/5] xgetdents system call Michael Kerrisk
2014-07-29  8:18   ` Michael Kerrisk
2014-07-29  8:18   ` Michael Kerrisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140729145808.79bec165@lwn.net \
    --to=corbet@lwn.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.