http://mail-index.netbsd.org/current-users/2007/07/16/0012.html
- Introduce sme_class into the sysmon_envsys struct to specify a
class; currently there are two classes: SME_CLASS_ACADAPTER and
SME_CLASS_BATTERY.
- Add a new envsys event: PENVSYS_EVENT_LOW_POWER that is reached when
all SME_CLASS_BATTERY devices are in CRITICAL/LOW state and there's not
any SME_CLASS_ACADAPTER connected.
- Add the 'low-power' event into the sensor_battery script that will
shutdown the system gracefully via 'shutdown -p'. If powerd(8) is
not running, cpu_reboot(9) with RB_POWERDOWN is used.
- Make acpiacad(4) a SME_CLASS_ACADAPTER device and acpibat(4) a
SME_CLASS_BATTERY device.
Update the documentation accordingly to these changes.
- Instead of hooking the handler on the specdev of a mounted file system
hook directly on the `struct mount'.
- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'. Use
`mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.
- Replace the hand-made reader/writer lock with a krwlock.
- Keep `vn_cow_*' functions and mark as obsolete.
- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.
Reviewed by: Jason Thorpe <thorpej@netbsd.org>
Thank you, wiz, for the few mandoc suggestions.
I slightly reworded part of the description and removed the
advertising clause from the version I posted to tech-userlevel.
- remove the `submatch' argument of config_found_ia()
- precise that config_found_ia() callis config_found_sm_loc() with both
`locs' and `submatch' set to NULL
avoid wasting unbelievable amounts of memory, set the blocksize to
something more believable. Should fix the memset-part to act only
up to the size the file is extended to, though.
default. To enable it, set netbsd-knf-whitespace-check to 't'. See
the help message for this variable for related knobs and issues. This
was tested on emacs 21.4 and 22.1. (From Anon Ymous)
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.
This utility uses FreeBSD's libfetch (updated for NetBSD, and to quieten
lint) to provide a BSD-licensed ftp/http/https file system similar to the
old alex utility. The full URL is used as the path underneath the "/ian"
mountpoint.
Sample use as follows:
[19:09:38] agc@inspiron1300 ...examples/refuse/ian 126 > priv ian/obj/ian /ian
[19:09:55] agc@inspiron1300 ...examples/refuse/ian 127 > cat /ian/ftp://localhost/motd
NetBSD 4.99.27 (INSPIRON) #4: Tue Aug 7 13:04:33 BST 2007
Welcome to NetBSD!
This system is running a development snapshot of the NetBSD operating system,
also known as NetBSD-current. It is highly possible for it to contain serious
bugs, regressions, broken features or other problems. Please bear this in mind
and use the system with care.
You are encouraged to test this version as thoroughly as possible. Should you
encounter any problem, please report it back to the development team using the
send-pr(1) utility (requires a working MTA). If yours is not properly set up,
use the web interface at: http://www.netbsd.org/support/send-pr.html
Thank you for helping us test and improve NetBSD.
[19:10:17] agc@inspiron1300 ...examples/refuse/ian 128 > df
Filesystem 1K-blocks Used Avail %Cap Mounted on
/dev/dk0 28101396 19491972 7204356 73% /
kernfs 1 1 0 100% /kern
procfs 4 4 0 100% /proc
ptyfs 1 1 0 100% /dev/pts
/dev/puffs 0 0 0 100% /ian
[19:10:21] agc@inspiron1300 ...examples/refuse/ian 129 > ls -al /ian/ftp://localhost/motd
-rw------- 1 root wheel 705 Aug 28 19:10 /ian/ftp://localhost/motd
[19:10:42] agc@inspiron1300 ...examples/refuse/ian 130 > ls -al ~ftp/motd
-rw-r--r-- 1 ftp ftp 705 Aug 27 21:33 /home/ftp/motd
[19:10:53] agc@inspiron1300 ...examples/refuse/ian 131 >
the eeprom on common types of memory modules. The specifications are
displayed during boot and can later be queried in the hw.spdmemN sysctl
subtree. Stub driver written by Nicolas Joly and greatly improved upon by
Paul Goyette. From PR 36745, with additional improvements by Paul and me.
it possible to get the pid, euid and egid of the process at the remote
end at the time it did bind() or connect().
Add a new libc function, getpeereid() to easily get at the euid and egid.
As a consequence, bump libc's minor number.
Document the LOCAL_PEEREID socket option in unix(4).
Based on contribution by Arne H. Juul, minor modifications by myself.
- uio->uio_offset must be set to the offset of the next directory entry.
- each cookie entry points to the next directory entry's offset, not the
current entry's offset.
- cookies must be callee allocated with malloc type M_TEMP.
of AHA- because that's what the packaging says (apparently short for
"Adaptec SCSI Card 29160", also on the packaging). Tested on
netbsd-4/i386.
Like pavel's, mine also works at Ultra160:
ahc2 at pci1 dev 5 function 0: Adaptec 29160 Ultra160 SCSI adapter
ahc2: aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
st0 at scsibus1 target 5 lun 0: <CERTANCE, ULTRIUM 2, 1914> tape removable
st0: sync (12.50ns offset 127), 16-bit (160.000MB/s) transfers
Bump date.
(Part 4: documentation and configuration files)
* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
sysmon_power(9) and powerd(8), that means there is no 32 bytes event
size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.
Tested by:
blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
AMD CS5535 Companion device found in the decTOP.
gcscide0 at pci0 dev 15 function 2
gcscide0: National Semiconductor/AMD CS5535 IDE Controller (rev. 0x00)
Supports Ultra DMA mode 4, Pio Mode 4 and MDMA mode 2.
"Go for it" jmcneill@.
this one, since it's a good exercise ..
Add icfs, which does the same thing as the refuse-based icfs agc
added earlier this week, i.e. null-mounts & converts the entire
namespace to lowercase. However, it's a fun comparison, since this
is implemented in a completely different fashion from the refuse
version.
This file system is based on librefuse and puffs.
The icfs(8) utility can be used to mount an existing directory on a
new mount point. icfs makes use of the virtdir(3) virtual directory
routines. Underneath those virtual directories, the individual
directory entries will be displayed as an exact mirror of the original
directory, except that any capital letters in the original entry's
name will be substituted with an entry name consisting entirely of
lower-case letters.
This is an unusual example of a refuse-based file system which provides
lesser functionality than the file system it sits on.
doesn't obtain the ports, gain and balance related parameters.
Those generally require reading from the hardware and therefore are much
more expensive to obtain. Modify OSS emulation to use the new ioctl
where possible.
This reduces CPU usage of mplayer during mp3 playback with my Thinkpad
from 20% to < 1% and from 50% to 20% during Xvid playback.
Review and comments from jmcneill@
to modify the whole VLAN tags, but it is permitted to change 12-bit
VLAN identificators only. Reflect this fact on the appropriate man
pages.
Antti Kantee and Mihai Chelaru from #netbsd-code were helpful in
better understanding of VLAN stuff. Thank you!
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).
Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3). But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
(what other systems keep in libssp, we already have in libc) into libc
to match what other systems with FORTIFY_SOURCE do. Goodbye, libssp
dependency in libraries and executables. Discussed with christos and
mrg; Christos will merge the headers to get us the rest of the way to a
FORTIFY_SOURCE implementation that works as others' code expects.
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.
dmesgfs is another example file system, which displays the device tree
information gained from dmesg(8) as a directory hierarchy. The information
can be displayed in files, or as targets of symbolic links.
% l /mnt/mainbus0
total 320
drwxr-xr-x 2 agc agc 512 May 21 22:21 .
drwxr-xr-x 2 root wheel 0 Jan 1 1970 ..
drwxr-xr-x 2 agc agc 512 May 21 22:21 acpi0
lrwxr-xr-x 1 agc agc 41 May 21 22:21 cpu0 -> cpu0 at mainbus0 apid 0: (boot processor)
lrwxr-xr-x 1 agc agc 40 May 21 22:21 ioapic -> ioapic at mainbus0 apid 1 not configured
drwxr-xr-x 2 agc agc 512 May 21 22:21 pci0
% l /mnt/mainbus0/pci0/piixide0/atabus1/atapibus0
total 256
drwxr-xr-x 2 agc agc 512 May 21 22:21 .
drwxr-xr-x 2 agc agc 512 May 21 22:21 ..
lrwxr-xr-x 1 agc agc 31 May 21 22:21 Description -> atapibus0 at atabus1: 2 targets
lrwxr-xr-x 1 agc agc 104 May 21 22:21 cd0 -> cd0 at atapibus0 drive 0: <VMware Virtual IDE CDROM Drive, 1000000000000000000, 0000000> cdrom removable
%
- remove cpu_exit.9.
- remove ctxsw.9 from makefile because it's too stale.
XXX maybe it will revive as mi_switch.9 later.
- add cpu_switchto.9 to makefile.
Introduce a parameter -r to control the root node type. For example
"dtfs -r 'lnk /etc' /puffs" mounts dtfs with the root node as a
symbolic link to /etc:
jojonaru# ./dtfs -r 'lnk /etc' /puffs
jojonaru# ls -l /puffs
lrw-rw-rw- 1 root wheel 4 May 17 14:06 /puffs -> /etc
jojonaru# cd /puffs
jojonaru# pwd
/etc
jojonaru#
Extra credit for figuring out how to unmount this file system with
umount(8).
Likewise, "dtfs -r 'chr 2 12' /puffs" makes /puffs (i386) /dev/zero etcetc.
Bug fixes:
- Fix crash reported by Scott Ellis on current-users@.
- Fix race conditions in enforcing the Veriexec rename and remove
policies. These are NOT security issues.
- Fix memory leak in rename handling when overwriting a monitored
file.
- Fix table deletion logic.
- Don't prevent query requests if not in learning mode.
KPI updates:
- fileassoc_table_run() now takes a cookie to pass to the callback.
- veriexec_table_add() was removed, it is now done internally. As a
result, there's no longer a need for VERIEXEC_TABLESIZE.
- veriexec_report() was removed, it is now internal.
- Perform sanity checks on the entry type, and enforce default type
in veriexec_file_add() rather than in veriexecctl.
- Add veriexec_flush(), used to delete all Veriexec tables, and
veriexec_dump(), used to fill an array with all Veriexec entries.
New features:
- Add a '-k' flag to veriexecctl, to keep the filenames in the kernel
database. This allows Veriexec to produce slightly more accurate
logs under certain circumstances. In the future, this can be either
replaced by vnode->pathname translation, or combined with it.
- Add a VERIEXEC_DUMP ioctl, to dump the entire Veriexec database.
This can be used to recover a database if the file was lost.
Example usage:
# veriexecctl dump > /etc/signatures
Note that only entries with the filename kept (that is, were loaded
with the '-k' flag) will be dumped.
Idea from Brett Lymn.
- Add a VERIEXEC_FLUSH ioctl, to delete all Veriexec entries. Sample
usage:
# veriexecctl flush
- Add a 'veriexec_flags' rc(8) variable, and make its default have
the '-k' flag. On systems using the default signatures file
(generaetd from running 'veriexecgen' with no arguments), this will
use additional 32kb of kernel memory on average.
- Add a '-e' flag to veriexecctl, to evaluate the fingerprint during
load. This is done automatically for files marked as 'untrusted'.
Misc. stuff:
- The code for veriexecctl was massively simplified as a result of
eliminating the need for VERIEXEC_TABLESIZE, and now uses a single
pass of the signatures file, making the loading somewhat faster.
- Lots of minor fixes found using the (still under development)
Veriexec regression testsuite.
- Some of the messages Veriexec prints were improved.
- Various documentation fixes.
All relevant man-pages were updated to reflect the above changes.
Binary compatibility with existing veriexecctl binaries is maintained.
controllers. These controllers can be found on add-on PCIe cards, or
on some motherboards to provide the PATA connectivity (e.g. some intel
ICH8-based motherboards).
Thanks to JMicron Technology for providing me documentation and
different sample boards for this work.
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
Note that the emulation root is linux32 when running i386 linux programs
on an amd64 system.
Note that paths that start /../ are only looked up in the real root.
Modify the bug/note about symlinks not being looked up in the emulation root.
Some of this stuff ought to be in a generic 'emulation' man page.
the Linux (BlueZ) API.
- L2CAP or RFCOMM connections can require the baseband radio link
mode be any of:
authenticated (devices are paired)
encrypted (implies authentication)
secured (encryption, plus generate new link key)
- for sockets, the mode is set using setsockopt(2) and the socket
connection will be aborted if the mode change fails.
- mode settings will be applied during connection establishment, and
for safety, we enter a wait state and will only proceed when the mode
settings are successfuly set.
- It is possible to change the mode on already open connections, but
not possible to guarantee that data already queued (from either end)
will not be delivered. (this is a feature, not a bug)
- bthidev(4) and rfcomm_sppd(1) support "auth", "encrypt" and
"secure" options
- btdevctl(8) by default enables "auth" for HIDs, and "encrypt" for
keyboards (which are required to support it)
intermediate directories have already been created. If not, then
create the intermediate directories. This means that callers don't
need to create the intermediate directories themselves.
When reading a virtual directory, don't return a zero-length
virtual directory entry.
* file handles are not only for nfs
* these functions are not allowed to be null
* update description of vptofh to contain the size parameter
(*bump date)
mp3-based files according to artist, genre or year.
Three virtual directories are made available under the mount point -
artists/
genre/
year/
and then virtual directory entries (see virtdir(3)) are created under
these heading directories.
The pkgsrc/audio/id3 package is needed for this file system to function
properly.
Two shell scripts, id3info.sh and id3db.sh, are included to build up
the music database for id3fs to use to build up its virtual
directories.
librefuse-based file systems.
These are especially useful for file systems which present virtual
directory hierarchies to the caller.
The routines build up and manage an array of virtual directory
entries, indexed upon full pathname within the file system. This is
analogous to the way refuse indexes its own entries. Routines are
available to add, delete, and find entries. Each entry can be one of
3 types - file ('f'), directory ('d') or symbolic link ('l'). Each
entry can also be associated with a target, which is a character
string allocated upon addition. This can be useful for virtual
directory entries of the symbolic link type.
The virtual directory entries can be traversed as an ordered list
(the entries are ordered alphabetically), or can be accessed by
directory component, using routines analogous to opendir(3), readdir(3),
and closedir(3).
only take the bare essentials, which currently means removing
"maxreqlen" from the argument list (all current callers I'm aware
of set it as 0 anyway). Introduce puffs_init(), which provides a
context for setting various parameters and puffs_domount(), which
can be used to mount the file system. Keep puffs_mount() as a
shortcut for the above two for simple file systems.
Bump development ABI version to 13. After all, it's Friday the 13th.
Watch out! Bad things can happen on Friday the 13th. --No carrier--
accessors for interesting data in it. Namely, you can now get
pu->pu_privdata with puffs_getspecific(), pu->pu_pn_root with
puffs_set/getroot() and pu->pu_maxreqlen with puffs_getmaxreqlen().