new kernel and old programs - bad system call

Bruce Evans bde at
Thu Nov 13 11:38:55 PST 2003

On Thu, 13 Nov 2003, John Hay wrote:

> Is it ok to run a new kernel (after the statfs changes) and older
> programs? I thought so from what i gathered out of the commit
> messages, but my test box doesn't like it at all... Well except
> if something else broke stuff:

I have no problems with a current kernel and an old world.

> ######
> ...
> Mounting root from ufs:/dev/da0s1a
> pid 50 (sh), uid 0: exited on signal 12
> Enter full pathname of shell or RETURN for /bin/sh:
> # ls
> pid 56 (ls), uid 0: exited on signal 12
> Bad system call
> #
> ######

Maybe you don't have old programs.   Unfortunately, even /bin/sh is
affected by the changes (it has a reference to fstatfs).

I often boot old kernels (back to RELENG_4) with current utilities
and will have to do something about this.  Everying except things
like ps works with only the following changes:
- don't use the new eaccess() syscall in test(1).
- change SYS_sigaction and SYS_sigreturn to their old (RELENG_4)
  values so that the newest signal handling is not used.  This
  works almost perfectly because there are no significant changes
  to the data structures (only some semantic changes that most
  utilities don't care about).  Larger changes in signal handling
  are the main thing that prevents current utilities running under
The statfs changes affect data structures, so they can't be avoided
by simply changing the syscall numbers.


More information about the freebsd-current mailing list