[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221116005529.uh4uol2qgcfnkfma@box.shutemov.name>
Date: Wed, 16 Nov 2022 03:55:29 +0300
From: kirill@...temov.name
To: Dave Hansen <dave.hansen@...el.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
dave.hansen@...ux.intel.com, jejb@...ux.ibm.com,
linux-kernel@...r.kernel.org, lkp@...el.com,
martin.petersen@...cle.com, oe-kbuild-all@...ts.linux.dev,
x86@...nel.org
Subject: Re: [PATCH 1/2] scsi: Fix get_user() in call sg_scsi_ioctl()
On Tue, Nov 15, 2022 at 04:48:40PM -0800, Dave Hansen wrote:
> On 11/15/22 16:43, Kirill A. Shutemov wrote:
> > get_user() expects the pointer to be pointer-to-simple-variable type,
> > but sic->data is array of 'unsigned char'. It violates get_user()
> > contracts.
> >
> > Cast it explicitly to 'unsigned char __user *'. It matches current
> > behaviour.
> >
> > This is preparation for fixing sparse warnings caused by Linear Address
> > Masking patchset.
>
> What's the side-effect if this isn't applied? Is it worse than sparse
> warnings?
Build will fail if 2/2 applied without this one:
arch/x86/include/asm/uaccess.h:46:9: error: cast specifies array type
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists