Commit Graph

450 Commits

Author SHA1 Message Date
ad
9f6b8c4d04 Remove COMPAT_HPUX. 2007-12-31 13:38:47 +00:00
dsl
7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
dsl
d975bc8ffa Remove all the __P 2007-12-19 20:31:35 +00:00
elad
6887492c26 Make securelevel a "secmodel" of its own.
While it's true that it's part of the traditional 4.4BSD security model,
there may come a time where a different "primary" security model used for
fine-grained privileges (ie., splitting root's responsibilities to various
privileges that can be assigned) may want to still have a securelevel
setting.

Idea from Daniel Carosone:

  http://mail-index.netbsd.org/tech-security/2006/08/25/0001.html

The location of the removed files, for reference, was:

  src/secmodel/bsd44/secmodel_bsd44_securelevel.c
  src/secmodel/bsd44/securelevel.h
2007-11-21 22:49:05 +00:00
xtraeme
da3a7579a9 Use BUILDSYMLINKS to avoid a compilation error where the source file
has the same name than the LKM.
2007-11-20 21:47:34 +00:00
xtraeme
31962fc6e5 Extend the envsys2 API (one more time, sorry) as defined in:
http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.
2007-11-16 08:00:11 +00:00
xtraeme
e9e087f048 Update for it(4) -> itesio(4) rename. 2007-11-15 13:04:50 +00:00
pooka
eb9f86bac5 don't init the device since it's not part of puffs anymore 2007-11-13 18:35:56 +00:00
pooka
78a22b918c No more puffs_transport.c, as noted by Kurt Schreiner on current-users.
(this lkm doesn't work for now, but at least MKPUFFS=yes builds
won't fail)
2007-11-12 12:31:15 +00:00
dsl
db27b89936 Pecoff lkm doesn't need its own syscall table, remove and reinstate lkm build.
Add in pecoff_exec.c to lkm !
2007-11-10 09:43:13 +00:00
dsl
0588a2274c Do not build pecoff any more.
I don't think the code was ever more that a thought-project!
Certainly it shouldn't be using the netbsd system call table!
Probably all of compat/pecoff wants nuking.
2007-11-09 22:27:08 +00:00
xtraeme
b0ea8c709b Catch up with latest changes. 2007-11-04 02:09:01 +00:00
njoly
a478f23b9e Add compat_linux and exec_linux_elf lkm support for amd64:
- Add needed COMPAT_OSSAUDIO to GENERIC.
- Add missing includes needed by linux_syscallargs.h.
- Add lkm building.
2007-10-19 18:52:09 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
xtraeme
8b2678bd7e Use a two clause license for all the code I contributed.
The envsys code will be changed later.
2007-10-06 07:21:02 +00:00
pooka
28636f63b4 Split routines handling nodes from puffs_subr to puffs_node.
No functional change.
2007-09-27 23:21:07 +00:00
rumble
aff14ee9c8 Actually include all of the EFS source in the lkm.
From Nicolas Joly.
2007-09-13 21:46:54 +00:00
xtraeme
fd79e0d338 Remove a local CPPFLAGS addition. 2007-09-11 22:02:09 +00:00
xtraeme
1dac9ede4d New aps(4) driver for IBM Thinkpad Active Protection System.
Exports some sensors through the envsys(4) framework available
in some Thinkpad laptops.

Ported by Pierre Pronchery from OpenBSD, via PR port-i386/36852.

Tweaks, LKM and misc improvements by me. Added into i386/GENERIC
commented out.
2007-09-11 21:46:52 +00:00
xtraeme
d9144c32f2 Do not LKM_ISA_IO_PORT to 0x290 by default, some drivers try to guess it
and there's no much sense in adding it.
2007-09-11 07:41:26 +00:00
xtraeme
0dd9b7dc5f Cosmetic: use the last enum member for max sensors number. 2007-09-11 07:36:22 +00:00
cube
c725329722 Remove 3rd clause and my name from all the licences which were only in my
name.
2007-09-10 10:35:51 +00:00
xtraeme
ae9c37793d Reorganize the code and add two ENVSYS_BATTERY_STATE sensors. 2007-09-09 16:09:37 +00:00
xtraeme
e8f02a5c46 Set LKM_ISA_DRVNAME to LKM_ISA_DRVNAME_CA by default... removes an
extra line in some drivers.
2007-09-09 13:52:23 +00:00
xtraeme
f98b18e4bd Ok, last round: templ -> tmpl. 2007-09-09 13:28:03 +00:00
xtraeme
4a8ca00f58 Rename lkm_isa.templ to lkm_isa.c.templ... to make jmcneill happy. 2007-09-09 13:24:02 +00:00
xtraeme
d76f18ef6a Add all drivers that I just added. They won't be built by default... 2007-09-09 05:51:59 +00:00
xtraeme
09af330546 Remove a local CPPFLAGS line that was commented out. 2007-09-09 05:46:27 +00:00
xtraeme
3d9887f5a6 Add the ug(4) LKM. Not tested but I've been using lm(4) and should work. 2007-09-09 05:40:22 +00:00
xtraeme
42d3167c6c Add the nsclpcsio(4) LKM. Not tested but I've been using lm(4) and
should work.
2007-09-09 05:27:10 +00:00
xtraeme
ba6e78a942 Add the smsc(4) LKM. Not tested but I've been using lm(4) and should work. 2007-09-09 05:18:20 +00:00
xtraeme
c2d7d8aaf3 Add the it(4) LKM. Not tested but I've been using lm(4) and should work. 2007-09-09 05:11:01 +00:00
xtraeme
ae26b33f71 Remove a duplicate line. 2007-09-09 04:38:16 +00:00
xtraeme
2049e94266 Add the lm(4) LKM and a common template to build ISA modules by only
setting some variables. Voodoo magic to create lkm_isa.c was required.
2007-09-09 04:24:24 +00:00
xtraeme
b60ffc9079 Print the error of sysmon_envsys_register() if it fails. 2007-09-08 00:23:46 +00:00
xtraeme
7c46a42d68 s/ENVSYS_FMONDRVSTATE/ENVSYS_FMONSTCHANGED/ 2007-09-07 19:58:06 +00:00
xtraeme
f2ddd114e5 Update to catch some problems that I just fixed in the framework. The
following test cases were fixed if a driver tries to register a driver
with sysmon_envsys_register() and the following items appear:

- Sensor with empty description.
- Sensor with state that doesn't match any of ENVSYS_SFOO.
- Sensor with units type that doesn't match any of ENVSYS_FOO.
2007-07-22 18:24:48 +00:00
xtraeme
e25c1ce382 - Add more sensors after the two that have duplicate descriptions, to verify
they work fine.
- Remove the workaround for sensor with index 0, it's fixed now.
2007-07-21 22:30:21 +00:00
xtraeme
2e71dae02e Example LKM to test envsys2 and verify that some things work as
expected.
2007-07-20 14:21:00 +00:00
rumble
6912898dc8 Add read-only support for SGI's Extent File System.
Reviewed by pooka@.
2007-06-29 23:30:16 +00:00
martti
fff7fd04df s/iplattach/ipfattach/ and s/ipldetach/ipfdetach/ 2007-06-04 12:38:58 +00:00
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
dsl
a9a3224a5e Remove compat_util.o from these loadable modules. It will be in the kernel.
Should fix PR kern/36287
2007-05-12 10:45:01 +00:00
dsl
b8fbaf8c4b Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
  - which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
  the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
  during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
  search for absolute pathnames in the emulation root, if that fails it will
  retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
  of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
  relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
  inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
  the real root is returned instead (matching the behaviour of emul_lookup,
  but being a cheap comparison here) so that programs that scan "../.."
  looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
  CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
  TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
2007-04-22 08:29:55 +00:00
scw
5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
xtraeme
4c6e4fcf9b Sync with est.c, est_init does not take any argument now. Just use
curcpu().
2007-03-18 07:28:37 +00:00
xtraeme
5ec1f7a202 Change k8_powernow_init to accept a struct cpu_info * as argument,
so that in the informative messages it prints the correct cpu
and not curcpu().

This fixes the first part of PR kern/35676.
2007-03-18 04:41:03 +00:00
dillo
d0c955805c Remove hfsp directories, they have been reimported as hfs. 2007-03-06 11:31:21 +00:00
dillo
56c3e41252 Complete rename of hfsp to hfs, requested by thorpej. 2007-03-06 11:28:44 +00:00
dillo
abbfd8a897 LKM glue for Apple HFS+ file system. 2007-03-06 11:27:15 +00:00