* Re: [SCSI] aic94xx: new driver
[not found] <200609240400.k8O403OJ024220@hera.kernel.org>
@ 2007-08-10 15:09 ` David Woodhouse
2007-08-10 15:52 ` James Bottomley
2007-08-11 3:49 ` Christoph Hellwig
0 siblings, 2 replies; 6+ messages in thread
From: David Woodhouse @ 2007-08-10 15:09 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: James Bottomley
On Sun, 2006-09-24 at 04:00 +0000, Linux Kernel Mailing List wrote:
> --- a/include/scsi/scsi.h
> +++ b/include/scsi/scsi.h
> @@ -429,4 +429,10 @@ #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
> /* Used to obtain the PCI location of a device */
> #define SCSI_IOCTL_GET_PCI 0x5387
>
> +/* Pull a u32 out of a SCSI message (using BE SCSI conventions) */
> +static inline u32 scsi_to_u32(u8 *ptr)
> +{
> + return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
> +}
> +
> #endif /* _SCSI_SCSI_H */
Please explain why it's necessary to export this to userspace.
The files in /usr/include/scsi are actually shipped by glibc, and most
distributions use glibc's version instead of the one from the kernel --
so this additional userspace interface is automatically incompatible
with most people's installations.
It would perhaps make sense to stop glibc providing these files, and let
distributions use the version from the kernel -- but that's a separate
issue. And still doesn't seem to justify the addition of the above
function.
--
dwmw2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SCSI] aic94xx: new driver
2007-08-10 15:09 ` [SCSI] aic94xx: new driver David Woodhouse
@ 2007-08-10 15:52 ` James Bottomley
2007-08-10 16:06 ` David Woodhouse
2007-08-11 3:49 ` Christoph Hellwig
1 sibling, 1 reply; 6+ messages in thread
From: James Bottomley @ 2007-08-10 15:52 UTC (permalink / raw)
To: David Woodhouse; +Cc: Linux Kernel Mailing List
On Fri, 2007-08-10 at 23:09 +0800, David Woodhouse wrote:
> On Sun, 2006-09-24 at 04:00 +0000, Linux Kernel Mailing List wrote:
> > --- a/include/scsi/scsi.h
> > +++ b/include/scsi/scsi.h
> > @@ -429,4 +429,10 @@ #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
> > /* Used to obtain the PCI location of a device */
> > #define SCSI_IOCTL_GET_PCI 0x5387
> >
> > +/* Pull a u32 out of a SCSI message (using BE SCSI conventions) */
> > +static inline u32 scsi_to_u32(u8 *ptr)
> > +{
> > + return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
> > +}
> > +
> > #endif /* _SCSI_SCSI_H */
>
> Please explain why it's necessary to export this to userspace.
Er it's not ... but then it's not necessary to export this entire file,
either.
> The files in /usr/include/scsi are actually shipped by glibc, and most
> distributions use glibc's version instead of the one from the kernel --
> so this additional userspace interface is automatically incompatible
> with most people's installations.
>
> It would perhaps make sense to stop glibc providing these files, and let
> distributions use the version from the kernel -- but that's a separate
> issue. And still doesn't seem to justify the addition of the above
> function.
>From the SCSI point of view, the function definitely belongs in that
file because it's an accessor to facilitate the processing of commands
and their replies, which is what that file contains ... in fact it
contains a lot of the internal mechanics of the SCSI layer that the user
shouldn't necessarily be seeing.
James
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SCSI] aic94xx: new driver
2007-08-10 15:52 ` James Bottomley
@ 2007-08-10 16:06 ` David Woodhouse
2007-08-10 16:39 ` James Bottomley
0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2007-08-10 16:06 UTC (permalink / raw)
To: James Bottomley; +Cc: Linux Kernel Mailing List
On Fri, 2007-08-10 at 08:52 -0700, James Bottomley wrote:
> On Fri, 2007-08-10 at 23:09 +0800, David Woodhouse wrote:
> > On Sun, 2006-09-24 at 04:00 +0000, Linux Kernel Mailing List wrote:
> > > --- a/include/scsi/scsi.h
> > > +++ b/include/scsi/scsi.h
> > > @@ -429,4 +429,10 @@ #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
> > > /* Used to obtain the PCI location of a device */
> > > #define SCSI_IOCTL_GET_PCI 0x5387
> > >
> > > +/* Pull a u32 out of a SCSI message (using BE SCSI conventions) */
> > > +static inline u32 scsi_to_u32(u8 *ptr)
> > > +{
> > > + return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
> > > +}
> > > +
> > > #endif /* _SCSI_SCSI_H */
> >
> > Please explain why it's necessary to export this to userspace.
>
> Er it's not ... but then it's not necessary to export this entire file,
> either.
That's an acceptable answer, I suppose, given that glibc ships its own
copy of the file in question.
But it does contain ioctl definitions, and if we ever added any new
ioctls presumably they'd be added there too? It does seem to be the kind
of thing we _do_ want to export from the kernel, surely?
> From the SCSI point of view, the function definitely belongs in that
> file because it's an accessor to facilitate the processing of commands
> and their replies, which is what that file contains ... in fact it
> contains a lot of the internal mechanics of the SCSI layer that the user
> shouldn't necessarily be seeing.
All the more reason for us to export it for ourselves and exert some
editorial control, perhaps?
--
dwmw2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SCSI] aic94xx: new driver
2007-08-10 16:06 ` David Woodhouse
@ 2007-08-10 16:39 ` James Bottomley
0 siblings, 0 replies; 6+ messages in thread
From: James Bottomley @ 2007-08-10 16:39 UTC (permalink / raw)
To: David Woodhouse; +Cc: Linux Kernel Mailing List
On Sat, 2007-08-11 at 00:06 +0800, David Woodhouse wrote:
> On Fri, 2007-08-10 at 08:52 -0700, James Bottomley wrote:
> > On Fri, 2007-08-10 at 23:09 +0800, David Woodhouse wrote:
> > > On Sun, 2006-09-24 at 04:00 +0000, Linux Kernel Mailing List wrote:
> > > > --- a/include/scsi/scsi.h
> > > > +++ b/include/scsi/scsi.h
> > > > @@ -429,4 +429,10 @@ #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
> > > > /* Used to obtain the PCI location of a device */
> > > > #define SCSI_IOCTL_GET_PCI 0x5387
> > > >
> > > > +/* Pull a u32 out of a SCSI message (using BE SCSI conventions) */
> > > > +static inline u32 scsi_to_u32(u8 *ptr)
> > > > +{
> > > > + return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
> > > > +}
> > > > +
> > > > #endif /* _SCSI_SCSI_H */
> > >
> > > Please explain why it's necessary to export this to userspace.
> >
> > Er it's not ... but then it's not necessary to export this entire file,
> > either.
>
> That's an acceptable answer, I suppose, given that glibc ships its own
> copy of the file in question.
>
> But it does contain ioctl definitions, and if we ever added any new
> ioctls presumably they'd be added there too? It does seem to be the kind
> of thing we _do_ want to export from the kernel, surely?
Oh .. I thought we'd already got around that one by duplicating the
ioctls? Those five are all deprecated, but if that's what you want
exporting, we could separate them into a new file.
> > From the SCSI point of view, the function definitely belongs in that
> > file because it's an accessor to facilitate the processing of commands
> > and their replies, which is what that file contains ... in fact it
> > contains a lot of the internal mechanics of the SCSI layer that the user
> > shouldn't necessarily be seeing.
>
> All the more reason for us to export it for ourselves and exert some
> editorial control, perhaps?
Even if I'd known it was exported, I'm still not sure I'd have noticed
why or what the issues are.
James
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SCSI] aic94xx: new driver
2007-08-10 15:09 ` [SCSI] aic94xx: new driver David Woodhouse
2007-08-10 15:52 ` James Bottomley
@ 2007-08-11 3:49 ` Christoph Hellwig
2007-08-11 6:41 ` David Woodhouse
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2007-08-11 3:49 UTC (permalink / raw)
To: David Woodhouse; +Cc: Linux Kernel Mailing List, James Bottomley
On Fri, Aug 10, 2007 at 11:09:22PM +0800, David Woodhouse wrote:
> The files in /usr/include/scsi are actually shipped by glibc, and most
> distributions use glibc's version instead of the one from the kernel --
> so this additional userspace interface is automatically incompatible
> with most people's installations.
Stop here right now. You just noticed the real bug, and that's exporting
scsi.h at all. I think Olaf sent a patch to fix this already.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SCSI] aic94xx: new driver
2007-08-11 3:49 ` Christoph Hellwig
@ 2007-08-11 6:41 ` David Woodhouse
0 siblings, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2007-08-11 6:41 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Linux Kernel Mailing List, James Bottomley
On Sat, 2007-08-11 at 04:49 +0100, Christoph Hellwig wrote:
> On Fri, Aug 10, 2007 at 11:09:22PM +0800, David Woodhouse wrote:
> > The files in /usr/include/scsi are actually shipped by glibc, and most
> > distributions use glibc's version instead of the one from the kernel --
> > so this additional userspace interface is automatically incompatible
> > with most people's installations.
>
> Stop here right now. You just noticed the real bug, and that's exporting
> scsi.h at all. I think Olaf sent a patch to fix this already.
That's a good enough answer for me, certainly.
--
dwmw2
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-11 6:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200609240400.k8O403OJ024220@hera.kernel.org>
2007-08-10 15:09 ` [SCSI] aic94xx: new driver David Woodhouse
2007-08-10 15:52 ` James Bottomley
2007-08-10 16:06 ` David Woodhouse
2007-08-10 16:39 ` James Bottomley
2007-08-11 3:49 ` Christoph Hellwig
2007-08-11 6:41 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®