All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Balsundar P <balsundar.p@microsemi.com>,
	hch@infradead.org, Zou Wei <zou_wei@huawei.com>,
	Hannes Reinecke <hare@suse.de>,
	Sagar Biradar <Sagar.Biradar@microchip.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] scsi: aacraid: improve compat_ioctl handlers
Date: Sat, 12 Sep 2020 08:09:22 +0100	[thread overview]
Message-ID: <20200912070922.GA1945@infradead.org> (raw)
In-Reply-To: <20200908213715.3553098-1-arnd@arndb.de>

On Tue, Sep 08, 2020 at 11:36:21PM +0200, Arnd Bergmann wrote:
> @@ -243,8 +244,23 @@ static int next_getadapter_fib(struct aac_dev * dev, void __user *arg)
>  	struct list_head * entry;
>  	unsigned long flags;
>  
> -	if(copy_from_user((void *)&f, arg, sizeof(struct fib_ioctl)))
> -		return -EFAULT;
> +	if (in_compat_syscall()) {
> +		struct compat_fib_ioctl {
> +			u32	fibctx;
> +			s32	wait;
> +			compat_uptr_t fib;
> +		} cf;

I find the struct declaration deep down in the function a little
annoying.

But otherwise this looks good;

Reviewed-by: Christoph Hellwig <hch@lst.de>

  parent reply	other threads:[~2020-09-12  7:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 21:36 [PATCH 1/3] scsi: aacraid: improve compat_ioctl handlers Arnd Bergmann
2020-09-08 21:36 ` [PATCH 2/3] scsi: megaraid_sas: check user-provided offsets Arnd Bergmann
2020-09-10 16:34   ` Sasha Levin
2020-09-12  7:20   ` Christoph Hellwig
2020-09-12 17:03     ` Arnd Bergmann
2020-12-31  0:15   ` Phil Oester
2021-01-03 16:26     ` Arnd Bergmann
2021-01-03 17:00       ` James Bottomley
2021-01-03 18:49         ` Arnd Bergmann
2021-01-03 20:12           ` James Bottomley
2021-01-04 17:48       ` Phil Oester
2021-01-04 22:24         ` Arnd Bergmann
2020-09-08 21:36 ` [PATCH 3/3] scsi: megaraid_sas: simplify compat_ioctl handling Arnd Bergmann
2020-09-12  7:47   ` Christoph Hellwig
2020-09-12 12:49     ` Arnd Bergmann
2020-09-13  6:50       ` compat_alloc_user_space removal, was " Christoph Hellwig
2020-09-13 11:46         ` Arnd Bergmann
2020-09-17 14:55           ` Arnd Bergmann
2020-09-17 14:57             ` Christoph Hellwig
2020-09-12  7:09 ` Christoph Hellwig [this message]
2020-09-17 15:02   ` [PATCH 1/3] scsi: aacraid: improve compat_ioctl handlers Arnd Bergmann

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=20200912070922.GA1945@infradead.org \
    --to=hch@infradead.org \
    --cc=Sagar.Biradar@microchip.com \
    --cc=aacraid@microsemi.com \
    --cc=arnd@arndb.de \
    --cc=balsundar.p@microsemi.com \
    --cc=hare@suse.de \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=zou_wei@huawei.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 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.