Commit Graph

157 Commits

Author SHA1 Message Date
rmind 97b932f123 NPF checkpoint:
- Add proper TCP state tracking as described in Guido van Rooij paper,
  plus handle TCP Window Scaling option.
- Completely rework npf_cache_t, reduce granularity, simplify code.
- Add npf_addr_t as an abstraction, amend session handling code, as well
  as NAT code et al, to use it.  Now design is prepared for IPv6 support.
- Handle IPv4 fragments i.e. perform packet reassembly.
- Add support for IPv4 ID randomization and minimum TTL enforcement.
- Add support for TCP MSS "clamping".
- Random bits for IPv6.  Various fixes and clean-up.
2010-11-11 06:30:39 +00:00
jruoho e2fa7d0097 Add asus(x) and hpqlb(4). 2010-10-26 05:42:51 +00:00
jruoho a2a33b95b3 Build asus(x) and hpqlb(4) as modules on x86. 2010-10-26 05:36:49 +00:00
jruoho 8eae6f006a Bump WARNS to 4. 2010-10-26 04:37:33 +00:00
jruoho 6b1e267f66 Refactor slightly and bump WARNS to 4. 2010-10-26 03:11:10 +00:00
jnemeth 6e39448e16 Revert most of previous:
- props being NULL is NOT an error and is a condition that all modules
  must be prepared to handle
- having this module bomb out for spurious reasons makes this module
  difficult to use for testing things
- keep comment update
- keep some KNF
- add a notice for the case when props is NULL
2010-10-25 22:41:42 +00:00
jruoho 4b8430b9d1 Build acpidalb(4), acpitz(4), acpivga(4), and aibs(4) as modules on x86.
More to come later.
2010-10-25 17:17:56 +00:00
jruoho 70e14dc983 Bump WARNS to 4. 2010-10-25 07:48:03 +00:00
jruoho 6f8ac939ae Build acpiacad(4), acpibat(4), acpibut(4), acpicpu(4), acpilid(4), and
thinkpad(4) as modules on x86. More to come later.
2010-10-25 06:40:32 +00:00
jmcneill b70feaec53 build acpiwmi as a module on x86 2010-10-24 18:29:33 +00:00
jmcneill abee62ef8f build wmi drivers as modules on x86 2010-10-24 16:31:35 +00:00
tsutsui 2240ae6f10 Also build and install compat_aoutm68k.kmod and exec_aout.kmod on m68000
to make things easier.  ${MACHINE_ARCH} == ${MACHINE_CPU} on m68k
so we can't use ad.m68k for a set list to exclude m68000.
2010-10-20 14:50:22 +00:00
pgoyette adb48c7f00 Build the new swsensor(4) device and add to set lists 2010-10-19 11:58:00 +00:00
pgoyette 3ae668c1c8 Add a new software-only sensor device. This is intended for use as a
kernel module, and can be helpful to generate sysmon_envsys events
when creating/modifying powerd scripts.  This will also be used in an
upcoming series of atf tests for sysmon_envsys itself.
2010-10-19 11:55:38 +00:00
tsutsui 621e053625 Build and install compat_aoutm68k.kmod and exec_aout.kmod on m68k machines. 2010-10-15 12:20:33 +00:00
tsutsui 0d70fee822 Add compat_aoutm68k module build dir.
(See options(4) for details of compat_aoutm68k)
2010-10-15 11:22:01 +00:00
tsutsui b01b8bd3fb Disable PAX_ASLR on sh3 as well. exec_elf32 module doesn't work with it
at least on dreamcast.
2010-10-13 14:15:23 +00:00
mrg 0db5384dc8 enable COMPAT_30 and COMPAT_50 in the module. 2010-09-19 05:42:10 +00:00
rmind 63012b51f1 NPF checkpoint:
- Add support for bi-directional NAT and redirection / port forwarding.
- Finish filtering on ICMP type/code and add filtering on TCP flags.
- Add support for TCP reset (RST) or ICMP destination unreachable on block.
- Fix a bunch of bugs; misc cleanup.
2010-09-16 04:53:27 +00:00
sjg ce171c67f4 First cut of simple syscall wrapper, which make(1) can use
to track process activity.
2010-09-09 00:10:16 +00:00
rmind 2e6f2099c6 Import NPF - a packet filter. Some features:
- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
  Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
  supporting generic RISC-like and specific CISC-like instructions for
  common patterns (e.g. IPv4 address matching).  See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@
2010-08-22 18:56:18 +00:00
jruoho 77e2991ced Add DIAGNOSTIC. 2010-08-18 19:33:10 +00:00
jruoho 6b9ff1079c Merge T-state a.k.a. throttling support for acpicpu(4).
Remarks:

  1.    Native instructions are supported only on Intel. Native support for
        other x86 vendors will be investigated. By assumption, AMD and others
        use the I/O based approach.

  2.    The existing code, INTEL_ONDEMAND_CLOCKMOD, must be disabled in
        order to use acpicpu(4). Otherwise fatal MSR races may occur.
        Unlike with P-states, no attempt is done to disable the existing
        implementation.

  3.    There is no rationale to export controls to user land.

  4.    Throttling is an artefact from the past. T-states will not be used for
        power management per se. For CPU frequency management, P-states are
        preferred in all circumstances. No noticeable additional power savings
        were observed in various experiments. When the system has been scaled
        to the highest (i.e. lowest power) P-state, it is preferable to move
        from C0 to deeper C-states than it is to actively throttle the CPU.

  5.    But T-states need to be implemented for passive cooling via acpitz(4).
        As specified by ACPI and Intel documents, these can be used as the
        last line of defence against critical thermal conditions. Support
        for this will be added later.
2010-08-13 16:21:50 +00:00
pooka 49f08a7073 Define ioconf to create locators.h, which is now required by acpiverbose. 2010-08-11 14:50:38 +00:00
jruoho 53e8f6c919 Merge P-state support for acpicpu(4).
Remarks:

  1.    All processors (x86 or not) for which the vendor has implemented
        ACPI I/O access routines are supported. Native instructions are
        currently supported only for Intel's "Enhanced Speedstep". Code for
        "PowerNow!" (AMD) will be merged later. Native support for VIA's
        "PowerSaver" will be investigated.

  2.    Backwards compatibility with existing userland code is maintained.
        Comparable to the case with cpu_idle(9), the ACPI CPU driver
        installs alternative functions for the existing sysctl(8) controls.
        The "native" behavior (if any) is restored upon detachment.

  3.    The dynamic nature of ACPI-provided P-states needs more investigation.
        The maximum frequency induced (but not forced) by the firmware may
        change dynamically. Currently, the sysctl(8) controls error out with
        a value larger than the dynamic maximum. The code itself does not
        however yet react to the notifications from the firmware by changing
        the frequencies in-place. Presumably the system administrator should
        be able to choose whether to use dynamic or static frequencies.
2010-08-08 16:58:41 +00:00
jruoho 460de0d614 Remove the acpiwmi(4) dump from the ACPIVERBOSE module. Instead of this
complex solution, just use aprint_debug(9) in the driver.
2010-08-06 22:45:00 +00:00
jruoho 47bb5e479e Add a Makefile for ACPI CPUs.
It is safe to load and unload the whole ACPI CPU -functionality at runtime.
2010-07-18 09:37:50 +00:00
rmind ef6414a63a Sync procfs module with kernel change for x86 MD. 2010-07-08 20:32:12 +00:00
pooka 2c9dc3f982 remember to add the new file to the build 2010-07-06 16:13:57 +00:00
rmind fc8b3b7154 Replace tmpfs_pool custom allocator code with a simpler layer for memory
accounting.  Use wired memory (which can be limited) for meta-data, and
kmem(9) for string allocations.

Close PR/31944.  Fix PR/38361 while here.  OK ad@.
2010-06-22 18:32:07 +00:00
rmind ef1673540e KNF and tidy-up example module slightly. 2010-06-22 18:30:20 +00:00
mjf e0e10b0607 Add __cacheline_aligned and __read_mostly annotations.
These annotations help to mitigate false sharing on multiprocessor
systems.

Variables annotated with __cacheline_aligned are placed into the
.data.cacheline_aligned section in the kernel. Each item in this
section is aligned on a cachline boundary - this avoids false
sharing. Highly contended global locks are a good candidate for
__cacheline_aligned annotation.

Variables annotated with __read_mostly are packed together tightly
into a .data.read_mostly section in the kernel. The idea here is that
we can pack infrequently modified data items into a cacheline and
avoid having to purge the cache, which would happen if read mostly
data and write mostly data shared a cachline. Initialisation variables
are a prime candiate for __read_mostly annotations.
2010-06-01 22:13:30 +00:00
pgoyette 6c40070d66 Extract ACPIVERBOSE into a kernel module. The module can be builtin
by defining 'options ACPIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

ACPIVERBOSE also includes code to dump acpi/wmi data.
2010-05-31 20:32:28 +00:00
pgoyette 700e1731f0 Extract MIIVERBOSE into a kernel module. The module can be builtin
by defining 'options MIIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.
2010-05-30 17:44:07 +00:00
pgoyette 1dad7e2286 Extract SCSIVERBOSE into a kernel module. The module can be builtin
by defining 'options SCSIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

The module is built for all architectures, whether or not SCSI or
atapi support exists.
2010-05-30 04:38:03 +00:00
pgoyette 3f79fb26a7 Extract USBVERBOSE into a kernel module. The module can be builtin
by defining 'options USBVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

The module is built for all architectures, whether or not USB support
exists.
2010-05-29 01:14:29 +00:00
mrg 5373bec4d9 add r600_blit.c and radeon_cs.c. 2010-05-27 07:27:35 +00:00
pgoyette 72a7c70b78 Extract the vendor/product tables and related access routines into a
separate kernel module.  Update pci bus attach routine to load the
module (if available) when we're about to start scanning the bus, and
unload the module after the scan is finished.

On architectures which support loading of modules by the boot loader,
the 'pciverbose' module can be loaded and executed without needing to
rebuild the kernel.  On all architectures, using 'options PCIVERBOSE'
in the kernel configuration file will create a 'builtin' module which
is functionally equivalent to previous behavior.

XXX Although not nearly as large as the vendor and product tables,
XXX the PCI class and subclass tables might also be offloaded into
XXX the module at a future time.

XXX Cardbus (and possibly other) drivers should also be modified to
XXX load the module before scanning/attaching devices.
2010-05-24 20:29:40 +00:00
ahoka 0edd676945 Remove bpfilter.h as not needed. 2010-04-13 13:09:46 +00:00
ahoka edd6235b94 Connect the pf module to the build. 2010-04-12 14:08:58 +00:00
ahoka dcc843776f Add new type kernel module for pf (includes pflog, but not pfsync). 2010-04-12 14:05:38 +00:00
ahoka 4a9711fd6e Connect the pad(4) kernel module to the build on i386 and amd64. 2010-04-09 13:49:12 +00:00
ahoka 07c8a4984d Makefile to build kernel module for pad. 2010-04-09 13:41:45 +00:00
mrg eaa088bcc1 add powerpc64 support. from dennis.c.ferguson@gmail.com in PR#43029. 2010-03-22 02:00:33 +00:00
pooka f3beefdb45 Convert acpibat to use ioconf instead of homerolled config glue.
Note, config whines about things like:
files.acpi:30: attaching undefined device `apm'

I intentionally was a lazy boy and didn't include a ton of dirt to
keep the hot napalm and riot blasts in the config thread rolling ;)

tested by jruoho (thanks!)
2010-03-21 07:09:56 +00:00
pooka ce672f239f include bsd.ioconf.mk when necessary 2010-03-21 06:56:52 +00:00
christos fc75a712eb Include ../../Makefile.inc now that it works. 2010-03-13 22:29:33 +00:00
christos 1b57f2e4ab now that I've fixed Makefile.inc, include it. 2010-03-13 22:23:47 +00:00
christos 26d6c574bd Don't hard-code ../../ so that we can handle multi-level modules (dtrace) 2010-03-13 22:06:30 +00:00
darran f6bf800773 DTrace: Add the Function Boundary Trace (FBT) provider moduile. This
module  instruments every function in the kernel with entry and exit
probes.  These probes are true zero-effect probes in that they don't
exist in the code until they are enabled.  The probes are enabled by
directly patching the function entry and exit points to make jumps into
the dtrace framework.
This gives us over 29,000 trace points in the kernel.
2010-03-12 21:53:15 +00:00