lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1246545712.2242.4.camel@jaswinder.satnam>
Date:	Thu, 02 Jul 2009 20:11:52 +0530
From:	Jaswinder Singh Rajput <jaswinder@...nel.org>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
Cc:	Sam Ravnborg <sam@...nborg.org>,
	Boaz Harrosh <bharrosh@...asas.com>,
	Benny Halevy <bhalevy@...asas.com>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	Matthew Wilcox <matthew@....cx>
Subject: Re: [PATCH] SCSI: userspace cannot use scsi_command_size_tbl,
 COMMAND_SIZE and scsi_device_type

On Sat, 2009-06-27 at 23:26 +0530, Jaswinder Singh Rajput wrote:
> On Sat, 2009-06-27 at 12:27 -0500, James Bottomley wrote:
> > All SCSI patches should be cc'd to the SCSI list
> > 
> > On Sat, 2009-06-27 at 22:35 +0530, Jaswinder Singh Rajput wrote:
> > > userspace cannot use scsi_command_size_tbl, COMMAND_SIZE
> > > and scsi_device_type defined in kernel
> > > 
> > > fix the following 'make headers_check' warnings:
> > > 
> > >   usr/include/scsi/scsi.h:159: userspace cannot call function or variable defined in the kernel
> > >   usr/include/scsi/scsi.h:285: userspace cannot call function or variable defined in the kernel
> > > 
> > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@...il.com>
> > > ---
> > >  include/scsi/scsi.h |   13 +++++++------
> > >  1 files changed, 7 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
> > > index 084478e..7ba5acf 100644
> > > --- a/include/scsi/scsi.h
> > > +++ b/include/scsi/scsi.h
> > > @@ -156,9 +156,6 @@ scsi_varlen_cdb_length(const void *hdr)
> > >  	return ((struct scsi_varlen_cdb_hdr *)hdr)->additional_cdb_length + 8;
> > >  }
> > >  
> > > -extern const unsigned char scsi_command_size_tbl[8];
> > > -#define COMMAND_SIZE(opcode) scsi_command_size_tbl[((opcode) >> 5) & 7]
> > > -
> > >  static inline unsigned
> > >  scsi_command_size(const unsigned char *cmnd)
> > >  {
> > > @@ -166,6 +163,13 @@ scsi_command_size(const unsigned char *cmnd)
> > >  		scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]);
> > 
> > Even a simple eyeball inspection of this patch shows that the removal of
> > COMMAND_SIZE above causes this inline function to fail to compile.
> > 
> > If you can't be bothered even to read your own patches or at the very
> > least compile test them, what makes you think I should bother reading
> > anything you send in?
> > 
> 
> oops I am sorry, actually it should be RFC I want to check whether I
> need to cover more member under __KERNEL__
> 
> [RFC][PATCH] SCSI: userspace cannot use scsi_command_size_tbl, scsi_device_type and friends
> 
> userspace cannot use scsi_command_size_tbl and scsi_device_type defined in kernel
> as well as its friends :
> 
> - SCSI_MAX_VARLEN_CDB_SIZE
> - COMMAND_SIZE
> - struct scsi_varlen_cdb_hdr
> - scsi_varlen_cdb_length()
> - scsi_command_size()
> 
> fix the following 'make headers_check' warnings:
> 
>   usr/include/scsi/scsi.h:159: userspace cannot call function or variable defined in the kernel
>   usr/include/scsi/scsi.h:285: userspace cannot call function or variable defined in the kernel
> 
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@...il.com>


What is the status of this patch.

Thanks,
--
JSR

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ