Re: LIS build limitation

"Brian F. G. Bidulock" <[email protected]> Fri, 24 Jun 2005 12:12:43 -0600
Newsgroups gmane.linux.kernel.streams
Organization http://www.openss7.org/
Message-ID <[email protected]>
Dan,

On Fri, 24 Jun 2005, Dan Gora wrote:

> 
> --- "Brian F. G. Bidulock" <[email protected]> wrote:
> 
> > Dan,
> > 
> > Did you fix putpmsg()/getpmsg() on that 2.6.11 kernel yet?
> 
> No, it's one of the things that we don't use, so I haven't looked at
> it.

You don't use putmsg/putpmsg() or getmsg/getpmsg()?  To exercise it just
run strtst.  Did you not run strtst on your patches?

> 
> > I have.
> 
> Are you just gloating or are you offering to share your patch?

Sure, under the terms of the GPL.

> Gloating I can live without.

If I wanted to gloat it might be about strxns, strinet and strxnet
working fully (and tested) as well.

It is untested patches I can live without.

You will find the vfs_write and vfs_read functions in 2.6.11 are
checking the validity of the count, before passing control to the
driver, unlike previous kernels.  Therefore, all putmsg/putpmsg and
getmsg/getpmsg calls fail with EFAULT becaue of Dave's invalid
LIS_GETMSG_PUTMSG_ULEN approach.

I converted this back to the more widely utilized ioctl system call
emulation with I_GETPMSG and I_PUTPMSG and changed libc accordingly.
I redid the number of ioctls to gain alignment with HP-UX, OSF, and
Mac OT as well as Solaris and Unixware.

You will also find two buffer overflows in strtst in the sad tests
if you use the gcc 4.0 compiler with the checker turned on.  Removed
unsigned/signed pointer passing mismatches from ldltest.

I also corrected some module loading problems in mod.c that made it
impossible to demand load a module (and impossible to pass strtst
demand loading of relay3).

I remove deprecated use of verify_area and converted to access_ok
instead.  I fixed the PIPE_BASE problem more thorougly:

  bzero(i->i_pipe, sizeof(struct pipe_inode_info));
  init_waitqueue_head(PIPE_WAIT(*i));
  PIPE_RCOUNTER(*i) = PIPE_WCOUNTER(*i) = 1;

Had to strap out pci_dac_set_dma_mask lis wrapper because the function
does not exist anymore.

This aside from the other things that had to be done to 2.18.0 like
MODULE_ALIAS additions for demand loading.  Added format attributes
to cmn_err.  Correction to stream head to return ENXIO on hung up
stream instead of EIO which is against standard.  Removed bugs Dave
added to pipes (NULL q pointer dereference).  IOCTL flushing fixes.
PARISC cannot handle in-kernel system calls, neither can a bunch of
other architectures: ix86 can: use symbol ripping to generate an
internal function call instead.  Time calculation corrections for
non 100 HZ jiffie clocks.  cdev_put handling.  kobj.krec.refcount vs.
kobj.refcount  Provide for atomic stats.  HPPA changes for pci.
set_cpus_alloed vs. current->cpus_allowed on SMP vs UP.  Use symbol_get
and symbol_put instead of inter_module_get_request and inter_module_put
which are deprecated.  Strap out a whole bunch of non-existent PCI
wrappers when they do not exist.  Add printf attributes to lis_printk
and lis_sprintf and fix the resulting errors.  Change lis_appq to follow
insq behaviour (return int, doesn't free message on error).  Align
mem_link_t to SMP cacheline for proper dma.  Add printf attributes to
lis_bprintf and fix resulting errors.  Include <linux/types.h> from
kernel instead of <sys/types.h> from C library.  Align mem_hdr_t to
SMP cacheline.  Add C++ constructs to header files.  Add thread
cancellation test points to putmg/putpmsg and getmsg/getpmsg per POSIX
standard.  Fix up test programs and utilities.

--brian

-- 
Brian F. G. Bidulock    ¦ The reasonable man adapts himself to the ¦
[email protected]    ¦ world; the unreasonable one persists in  ¦
http://www.openss7.org/ ¦ trying  to adapt the  world  to himself. ¦
                        ¦ Therefore  all  progress  depends on the ¦
                        ¦ unreasonable man. -- George Bernard Shaw ¦