linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ojaswin Mujoo <ojaswin98@gmail.com>
Cc: nsaenz@kernel.org, gregkh@linuxfoundation.org,
	stefan.wahren@i2se.com, arnd@arndb.de, phil@raspberrypi.com,
	bcm-kernel-feedback-list@broadcom.com,
	linux-arm-kernel@lists.infradead.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/5] staging: vchiq: Move vchiq char driver to its own file
Date: Mon, 21 Jun 2021 12:56:31 +0300	[thread overview]
Message-ID: <20210621095631.GF1901@kadam> (raw)
In-Reply-To: <8cd9b5899f82eaf2efdc9caa8d07f719a592a94d.1624185152.git.ojaswin98@gmail.com>

On Sun, Jun 20, 2021 at 06:26:34PM +0530, Ojaswin Mujoo wrote:
> +/* read a user pointer value from an array pointers in user space */
> +static inline int vchiq_get_user_ptr(void __user **buf, void __user *ubuf, int index)
> +{
> +	int ret;
> +
> +	if (in_compat_syscall()) {
> +		compat_uptr_t ptr32;
> +
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When I'm reviewing these sorts of patches then what I'm trying to verify
is that you are not a UMN "researcher" trying to change the code without
anyone noticing.  In the orignal code, there was no blank line here

> +		compat_uptr_t __user *uptr = ubuf;

but there was a blank line here.

> +		ret = get_user(ptr32, uptr + index);
> +		*buf = compat_ptr(ptr32);
> +	} else {

These sorts of minor white space changes make it hard to verify the code
in an automated way.

> +		uintptr_t ptr, __user *uptr = ubuf;
> +
> +		ret = get_user(ptr, uptr + index);
> +		*buf = (void __user *)ptr;
> +	}
> +
> +	return ret;
> +}
> +

regards,
dan carpenter


  reply	other threads:[~2021-06-21  9:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20 12:55 [PATCH v2 0/5] vchiq: Patch to separate platform and cdev code Ojaswin Mujoo
2021-06-20 12:55 ` [PATCH v2 1/5] staging: vchiq: Refactor vchiq " Ojaswin Mujoo
2021-06-21  8:21   ` Dan Carpenter
2021-06-21 14:22     ` Ojaswin Mujoo
2021-06-20 12:56 ` [PATCH v2 2/5] staging: vchiq: Move certain declarations to vchiq_arm.h Ojaswin Mujoo
2021-06-20 12:56 ` [PATCH v2 3/5] staging: vchiq: Move vchiq char driver to its own file Ojaswin Mujoo
2021-06-21  9:56   ` Dan Carpenter [this message]
2021-06-21 14:28     ` Ojaswin Mujoo
2021-06-20 12:57 ` [PATCH v2 4/5] staging: vchiq: Make creation of vchiq cdev optional Ojaswin Mujoo
2021-06-20 12:57 ` [PATCH v2 5/5] staging: vchiq: Combine vchiq platform code into single file Ojaswin Mujoo
2021-06-20 13:28 ` [PATCH v2 0/5] vchiq: Patch to separate platform and cdev code Stefan Wahren
2021-06-21 14:11   ` Ojaswin Mujoo

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=20210621095631.GF1901@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=nsaenz@kernel.org \
    --cc=ojaswin98@gmail.com \
    --cc=phil@raspberrypi.com \
    --cc=stefan.wahren@i2se.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).