CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Fri Nov 24 21:17:49 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: Add two BTB entries. To generate a diff of this commit: cvs rdiff -u -r1.380 -r1.381 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.380 src/share/misc/acronyms.comp:1.381 --- src/share/misc/acronyms.comp:1.380 Mon Nov 20 21:16:41 2023 +++ src/share/misc/acronyms.comp Fri Nov 24 21:17:49 2023 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.380 2023/11/20 21:16:41 jschauma Exp $ +$NetBSD: acronyms.comp,v 1.381 2023/11/24 21:17:49 alnsn Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -197,6 +197,8 @@ BSSID basic service set identifier BT BitTorrent BT Bluetooth BT bit test +BTB branch target buffer +BTB board-to-board BTC bit test [and] complement BTM bus transport mechanism BTR bit test [and] reset
CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Fri Nov 24 21:17:49 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: Add two BTB entries. To generate a diff of this commit: cvs rdiff -u -r1.380 -r1.381 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Mon Jun 12 21:00:38 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: Add DPDK. To generate a diff of this commit: cvs rdiff -u -r1.354 -r1.355 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Mon Jun 12 21:00:38 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: Add DPDK. To generate a diff of this commit: cvs rdiff -u -r1.354 -r1.355 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.354 src/share/misc/acronyms.comp:1.355 --- src/share/misc/acronyms.comp:1.354 Sun Jun 11 17:54:18 2023 +++ src/share/misc/acronyms.comp Mon Jun 12 21:00:38 2023 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.354 2023/06/11 17:54:18 dholland Exp $ +$NetBSD: acronyms.comp,v 1.355 2023/06/12 21:00:38 alnsn Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -446,6 +446,7 @@ DPAA data path acceleration architecture DPC deferred procedure call DPCM differential pulse code modulation DPD dead peer detection +DPDK data plane development kit DPI deep packet inspection DPI dots per inch DPL descriptor privilege level
Re: CVS commit: src/external/mit/lua/dist/src
Nikita wrote: > Module Name: src > Committed By: nikita > Date: Mon Apr 17 21:17:58 UTC 2023 > > Modified Files: > src/external/mit/lua/dist/src: ldump.c lundump.c > > Log Message: > lua: apply upstream bugfix for "Loading a corrupted binary file can segfault." Unless it's a security bugfix for a release branch, I don't feel that all those bugfixes should be applied to -current individually, it's ok to wait for Lua 5.4.5 release and import it. Alex
Re: CVS commit: src/usr.sbin/tprof
Christos Zoulas wrote: > Module Name: src > Committed By: christos > Date: Fri Dec 23 19:37:06 UTC 2022 > > Modified Files: > src/usr.sbin/tprof: tprof_top.c > > Log Message: > use malloc instead of alloca so that SSP works. pullup to 10?
Re: CVS commit: src/etc
Simon Burge wrote: > Why don't we just mount all the ZFS filesystems in mountcritlocal? Future versions may require loading of encryption keys over kerberos or a special pam module to decrypt /home/$USER. Alex
CVS commit: src/share/man/man5
Module Name:src Committed By: alnsn Date: Sun Feb 20 14:43:39 UTC 2022 Modified Files: src/share/man/man5: rc.conf.5 Log Message: Document critical_filesystems_zfs. To generate a diff of this commit: cvs rdiff -u -r1.191 -r1.192 src/share/man/man5/rc.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man5/rc.conf.5 diff -u src/share/man/man5/rc.conf.5:1.191 src/share/man/man5/rc.conf.5:1.192 --- src/share/man/man5/rc.conf.5:1.191 Sun Feb 20 10:49:17 2022 +++ src/share/man/man5/rc.conf.5 Sun Feb 20 14:43:39 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: rc.conf.5,v 1.191 2022/02/20 10:49:17 alnsn Exp $ +.\" $NetBSD: rc.conf.5,v 1.192 2022/02/20 14:43:39 alnsn Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -321,6 +321,17 @@ where the prefix means that it is not an error if the file system is not present in .Xr fstab 5 . +.It Sy critical_filesystems_zfs +A string. +Mount non-legacy ZFS file systems right after mounting local +file systems listed in +.Sy critical_filesystems_local +variable. +An entry can be prefixed with +.Ql "OPTIONAL:" +which means that it is not an error if the file system is not present +among available ZFS datasets. +The default is ''. .It Sy fsck_flags A string. A file system is checked with
CVS commit: src/share/man/man5
Module Name:src Committed By: alnsn Date: Sun Feb 20 14:43:39 UTC 2022 Modified Files: src/share/man/man5: rc.conf.5 Log Message: Document critical_filesystems_zfs. To generate a diff of this commit: cvs rdiff -u -r1.191 -r1.192 src/share/man/man5/rc.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: alnsn Date: Sun Feb 20 14:42:08 UTC 2022 Modified Files: src/etc/defaults: rc.conf src/etc/rc.d: mountcritlocal Log Message: Enable critical_filesystems_zfs. To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/etc/defaults/rc.conf cvs rdiff -u -r1.16 -r1.17 src/etc/rc.d/mountcritlocal Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/defaults/rc.conf diff -u src/etc/defaults/rc.conf:1.161 src/etc/defaults/rc.conf:1.162 --- src/etc/defaults/rc.conf:1.161 Sun Jan 10 23:24:25 2021 +++ src/etc/defaults/rc.conf Sun Feb 20 14:42:07 2022 @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.161 2021/01/10 23:24:25 riastradh Exp $ +# $NetBSD: rc.conf,v 1.162 2022/02/20 14:42:07 alnsn Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -92,6 +92,7 @@ domainname="" # critical_filesystems_local="OPTIONAL:/var" critical_filesystems_remote="OPTIONAL:/usr" +critical_filesystems_zfs="" # Swap device controls. # Index: src/etc/rc.d/mountcritlocal diff -u src/etc/rc.d/mountcritlocal:1.16 src/etc/rc.d/mountcritlocal:1.17 --- src/etc/rc.d/mountcritlocal:1.16 Wed Jul 22 16:50:41 2020 +++ src/etc/rc.d/mountcritlocal Sun Feb 20 14:42:07 2022 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: mountcritlocal,v 1.16 2020/07/22 16:50:41 martin Exp $ +# $NetBSD: mountcritlocal,v 1.17 2022/02/20 14:42:07 alnsn Exp $ # # PROVIDE: mountcritlocal @@ -19,8 +19,12 @@ mountcritlocal_start() # This usually includes /var. # mount_critical_filesystems local || return $? + if checkyesno zfs; then + mount_critical_filesystems_zfs || return $? + fi return 0 } load_rc_config $name +load_rc_config_var zfs zfs run_rc_command "$1"
CVS commit: src/etc
Module Name:src Committed By: alnsn Date: Sun Feb 20 14:42:08 UTC 2022 Modified Files: src/etc/defaults: rc.conf src/etc/rc.d: mountcritlocal Log Message: Enable critical_filesystems_zfs. To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/etc/defaults/rc.conf cvs rdiff -u -r1.16 -r1.17 src/etc/rc.d/mountcritlocal Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man5
Module Name:src Committed By: alnsn Date: Sun Feb 20 10:49:17 UTC 2022 Modified Files: src/share/man/man5: rc.conf.5 Log Message: Document zfs variable. To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/share/man/man5/rc.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man5
Module Name:src Committed By: alnsn Date: Sun Feb 20 10:49:17 UTC 2022 Modified Files: src/share/man/man5: rc.conf.5 Log Message: Document zfs variable. To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/share/man/man5/rc.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man5/rc.conf.5 diff -u src/share/man/man5/rc.conf.5:1.190 src/share/man/man5/rc.conf.5:1.191 --- src/share/man/man5/rc.conf.5:1.190 Fri Jan 15 15:18:32 2021 +++ src/share/man/man5/rc.conf.5 Sun Feb 20 10:49:17 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: rc.conf.5,v 1.190 2021/01/15 15:18:32 riastradh Exp $ +.\" $NetBSD: rc.conf.5,v 1.191 2022/02/20 10:49:17 alnsn Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -55,7 +55,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 11, 2020 +.Dd February 20, 2022 .Dt RC.CONF 5 .Os .Sh NAME @@ -416,6 +416,9 @@ RAIDframe disk devices. See .Xr raidctl 8 for additional details. +.It Sy zfs +Boolean value. +Configures ZFS storage pools and ZFS file systems. .El .Ss One-time actions to perform or programs to run on boot-up .Bl -tag -width net_interfaces
CVS commit: src/etc
Module Name:src Committed By: alnsn Date: Sun Feb 6 16:23:12 UTC 2022 Modified Files: src/etc: rc.subr Log Message: Small changes in mount_critical_filesystems_zfs avoid unnecessary eval, switch to $() and -ne. from kre@, thanks! To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.subr diff -u src/etc/rc.subr:1.109 src/etc/rc.subr:1.110 --- src/etc/rc.subr:1.109 Thu Feb 3 21:02:47 2022 +++ src/etc/rc.subr Sun Feb 6 16:23:12 2022 @@ -1,4 +1,4 @@ -# $NetBSD: rc.subr,v 1.109 2022/02/03 21:02:47 alnsn Exp $ +# $NetBSD: rc.subr,v 1.110 2022/02/06 16:23:12 alnsn Exp $ # # Copyright (c) 1997-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -207,10 +207,10 @@ mount_critical_filesystems() # the rc.conf(5) variable $critical_filesystems_zfs, checking # each one to see if it is mounted, and if it is not, mounting it. # It's not an error if file systems prefixed with "OPTIONAL:" -# aren't zfs mountpoints. +# aren't ZFS mountpoints. mount_critical_filesystems_zfs() { - eval _fslist=\$critical_filesystems_zfs + _fslist=$critical_filesystems_zfs _tab=" " _mountcrit_es=0 for _fs in $_fslist; do @@ -222,7 +222,7 @@ mount_critical_filesystems_zfs() ;; esac - _dataset=` + _dataset=$( zfs list -H -o mountpoint,name | while read _line ; do _dataset='' @@ -240,7 +240,7 @@ mount_critical_filesystems_zfs() ;; esac fi - done` + done) if [ -z "$_dataset" ]; then if $_optional; then @@ -259,14 +259,13 @@ mount_critical_filesystems_zfs() print_rc_metadata \ "note:File system $_fs was already mounted" ;; - esac - - if [ -z "$_mount_es" ]; then + *) # no zfs mount "$_dataset" >/dev/null _mount_es=$? - fi +;; + esac - if [ "$_mount_es" != 0 ]; then + if [ $_mount_es -ne 0 ]; then _mountcrit_es="$_mount_es" fi fi
CVS commit: src/etc
Module Name:src Committed By: alnsn Date: Sun Feb 6 16:23:12 UTC 2022 Modified Files: src/etc: rc.subr Log Message: Small changes in mount_critical_filesystems_zfs avoid unnecessary eval, switch to $() and -ne. from kre@, thanks! To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/etc
Taylor R Campbell wrote: > > Date: Sat, 5 Feb 2022 21:21:53 + > > From: Alexander Nasonov > > > > Since I plan to migrate my ZFS setup to a smaller cgd disk, I gave > > legacy mountpoints a try to see how much complexity they add. > > I use legacy mountpoints for / and /var, but it's a little kludgey, > and from what I recall a legacy mountpoint requires setting the > mountpoint property explicitly on anything mounted under it. > > I assumed you had made the change to obviate the need for most of this > extra bookkeeping with fstab and explicit mountpoint properties that > don't match the zpool dataset path. That's right. > So I'm guessing with your change and critical_filesystems_zfs=/var, I > could: > > - skip the fstab entry for /var, > - have only rpool/ROOT with mountpoint=legacy, and > - have /var and all the file systems under /var use default > mountpoints. yes yes yes :) It even supports OPTIONAL: critical_filesystems_zfs=OPTIONAL:/var and it's clever enough to skip "fake" mountpoints (datasets with canmount=off). Alex
Re: CVS commit: src/etc
Brad Spencer wrote: > Alexander Nasonov writes: > > Are there any downside of mixing legacy and non-legacy mountpoints? > > E.g. if my /var is legacy but /var/crash is a normal ZFS mountpoint? > > That should work fine as long as /var was arranged to be mounted first. > The other way around may and probably is trouble right now, where a > zpool Not-legacy needs to be mounted so that a ZFS legacy filesystem or, > in fact, any other filesystem type gets mounted under it. I believe > that Solaris did and probably still does have this problem too. Legacy > ZFS mounts should be perfectly workable even from single user when /usr > isn't available yet for most simple use cases. Since I plan to migrate my ZFS setup to a smaller cgd disk, I gave legacy mountpoints a try to see how much complexity they add. I have the following ZFS mountpoints in my setup /usr - legacy /var - legacy /var/log - legacy /var/tmp - normal /var/mail - normal ... Ideally, I'd like to keep all datasets under one root: tank/base/usr - legacy tank/base/var - legacy tank/base/var/log - legacy tank/base/var/mail - normal but it has a small inconvenience: every time I add a new dataset under a legacy mountpoint (e.g. create a dataset for /var/spool), it can't inherit a mountpoint from a legacy mountpoint and I have to set it manually (zfs set mountpoint=/var/spool tank/base/var/spool). One way to avoid this issue is to have separate hierarchies: tank/legacy tank/legacy/usr tank/legacy/var tank/legacy/var/log tank/base tank/base/var tank/base/var/mail but I'm pretty sure it has some downsides too. Alex
Re: CVS commit: src/etc
J. Hannken-Illjes wrote: > What is wrong with ZFS legacy mounts? > > $ zpool create -m legacy tank > $ zfs create tank/a > $ mount -t zfs tank/a /mnt Hmm, I heard about ZFS legacy (quite a while ago!) but I didn't look into it because, well, "legacy"... Are there any downside of mixing legacy and non-legacy mountpoints? E.g. if my /var is legacy but /var/crash is a normal ZFS mountpoint? Alex
Re: CVS commit: src/etc
Martin Husemann wrote: > On Thu, Feb 03, 2022 at 11:10:43PM +0000, Alexander Nasonov wrote: > > variable, it will mix two very different styles of mounting and > > compilate the code. s/compilate/complicate/ > "different styles of mounting" sounds like a non-starter to me, maybe > that should be fixed first? These two "styles of mounting" are /sbin/mount /filesystem - looks up fs parameters in /etc/fstab /sbin/zfs mount dataset - looks up fs parameters in zpools I don't think these two approaches can be unified. We surely can modify mount_critical_systems to try entries from /etc/fstab first, and if /sbin/mount fails, then try to find a zfs dataset for the failed entry and /sbin/zfs mount it. But if things go wrong, a complicated mounting process will make troubleshooting harder. For that reason, I'd like to keep mountcrit_zfs separate from mountcrit_local. Alex
Re: CVS commit: src/etc
Hi Robert, Robert Elz wrote: > A couple of comments about your mount_critical_filesystems_zfs() > function in rc.subr Thank you for reviewing my code! > It starts: > > eval _fslist=\$critical_filesystems_zfs > > I'm not sure what you're attempting to accomplish there. I copied this line from mount_critical_filesystems: eval _fslist=\$critical_filesystems_${1} and changed ${1} to zfs without realising that I don't need eval anymore. >... >_dataset=` > > (followed by a lengthy command substitution). Please don't use `` > command substitutions, they are fragile, and essentially obsolete. Noted. I don't like the approach I took but I'm not very comfortable in a bare shell when tools in /usr aren't (yet) available and this giant $() was all I could think of. > The only excuse for ever using them in anything modern is if the > script might need to be run by a truly ancient shell. Just use $( ) > instead, the semantics are much cleaner. > > And perhaps more important, near the bottom of the big loop: > > if [ "$_mount_es" != 0 ]; then > _mountcrit_es="$_mount_es" > fi > > which causes the exit status of the function (_mountcrit_es) to be the > status of the last mount that failed for some reason, rather than the > first (which tends to be more common). These lines is a copy/paste from mount_critical_filesystems and your comment apply to that function too. >... > One additional minor point, it might be better to use -ne there instead > of != since the values are intended to be integers, rather than strings. > But that doesn't really matter (unless $_mount_es might be "" in which > case using != is better - that would be 0 for -ne, but not 0 for !=). Yes, it's intended to be integers. -- Alex
Re: CVS commit: src/etc
Alexander Nasonov wrote: > Module Name: src > Committed By: alnsn > Date: Thu Feb 3 20:52:44 UTC 2022 > > Modified Files: > src/etc: rc.subr > > Log Message: > Add mount_critical_filesystems_zfs > > The new function is similar to mount_critical_filesystems > but it walks through ZFS datasets and mounts matching entries. I plan to intoduce a new rc.conf variable critical_filesystems_zfs which is essentially the same as critical_filesystems_local but for ZFS. Although the new variable can be avoided if my code is merged into existing mount_critical_filesystems(), and all critical filesystems (ZFS or not) are mounted in one pass through critical_filesystems_local variable, it will mix two very different styles of mounting and compilate the code. One extra variable shouldn't be a problem for most users but it will help to keep rc.subr neater. -- Alex
CVS commit: src/etc
Module Name:src Committed By: alnsn Date: Thu Feb 3 21:02:47 UTC 2022 Modified Files: src/etc: rc.subr Log Message: Compare $_mount_es with 0 To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.subr diff -u src/etc/rc.subr:1.108 src/etc/rc.subr:1.109 --- src/etc/rc.subr:1.108 Thu Feb 3 20:52:44 2022 +++ src/etc/rc.subr Thu Feb 3 21:02:47 2022 @@ -1,4 +1,4 @@ -# $NetBSD: rc.subr,v 1.108 2022/02/03 20:52:44 alnsn Exp $ +# $NetBSD: rc.subr,v 1.109 2022/02/03 21:02:47 alnsn Exp $ # # Copyright (c) 1997-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -266,7 +266,7 @@ mount_critical_filesystems_zfs() _mount_es=$? fi - if [ -n "$_mount_es" ]; then + if [ "$_mount_es" != 0 ]; then _mountcrit_es="$_mount_es" fi fi
CVS commit: src/etc
Module Name:src Committed By: alnsn Date: Thu Feb 3 21:02:47 UTC 2022 Modified Files: src/etc: rc.subr Log Message: Compare $_mount_es with 0 To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: alnsn Date: Thu Feb 3 20:52:44 UTC 2022 Modified Files: src/etc: rc.subr Log Message: Add mount_critical_filesystems_zfs The new function is similar to mount_critical_filesystems but it walks through ZFS datasets and mounts matching entries. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.subr diff -u src/etc/rc.subr:1.107 src/etc/rc.subr:1.108 --- src/etc/rc.subr:1.107 Sat Nov 6 23:11:43 2021 +++ src/etc/rc.subr Thu Feb 3 20:52:44 2022 @@ -1,4 +1,4 @@ -# $NetBSD: rc.subr,v 1.107 2021/11/06 23:11:43 christos Exp $ +# $NetBSD: rc.subr,v 1.108 2022/02/03 20:52:44 alnsn Exp $ # # Copyright (c) 1997-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -202,6 +202,79 @@ mount_critical_filesystems() } # +# mount_critical_filesystems_zfs +# Go through the list of critical ZFS mountpoints as provided in +# the rc.conf(5) variable $critical_filesystems_zfs, checking +# each one to see if it is mounted, and if it is not, mounting it. +# It's not an error if file systems prefixed with "OPTIONAL:" +# aren't zfs mountpoints. +mount_critical_filesystems_zfs() +{ + eval _fslist=\$critical_filesystems_zfs + _tab=" " + _mountcrit_es=0 + for _fs in $_fslist; do + _optional=false + case "$_fs" in + OPTIONAL:*) + _optional=true + _fs="${_fs#*:}" + ;; + esac + + _dataset=` + zfs list -H -o mountpoint,name | + while read _line ; do +_dataset='' +case "$_line" in +"${_fs}${_tab}"*) + _dataset="${_line#*${_tab}}" + ;; +esac +if [ -n "$_dataset" ]; then + case "$( zfs get -H -o value canmount $_dataset )" in + on) + echo -n "$_dataset" + break ;; + *) # noauto|off - dataset isn't supposed to be mounted + ;; + esac +fi + done` + + if [ -z "$_dataset" ]; then + if $_optional; then +# ignore this error +print_rc_metadata \ +"note:Optional file system $_fs is not present" + else +printf >&2 "%s\n" "No suitable ZFS dataset found for mountpoint $_fs" +_mountcrit_es=1 + fi + else + _mount_es= + case "$( zfs get -H -o value mounted $_dataset )" in + yes) +_mount_es=1 +print_rc_metadata \ +"note:File system $_fs was already mounted" +;; + esac + + if [ -z "$_mount_es" ]; then +zfs mount "$_dataset" >/dev/null +_mount_es=$? + fi + + if [ -n "$_mount_es" ]; then +_mountcrit_es="$_mount_es" + fi + fi + done + return $_mountcrit_es +} + +# # check_pidfile pidfile procname [interpreter] # Parses the first line of pidfile for a PID, and ensures # that the process is running and matches procname.
CVS commit: src/etc
Module Name:src Committed By: alnsn Date: Thu Feb 3 20:52:44 UTC 2022 Modified Files: src/etc: rc.subr Log Message: Add mount_critical_filesystems_zfs The new function is similar to mount_critical_filesystems but it walks through ZFS datasets and mounts matching entries. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Sun Sep 5 17:29:27 UTC 2021 Modified Files: src/share/misc: acronyms acronyms-o.real Log Message: Move SOB to offensive acronyms. To generate a diff of this commit: cvs rdiff -u -r1.310 -r1.311 src/share/misc/acronyms cvs rdiff -u -r1.9 -r1.10 src/share/misc/acronyms-o.real Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.310 src/share/misc/acronyms:1.311 --- src/share/misc/acronyms:1.310 Fri Jun 18 21:58:20 2021 +++ src/share/misc/acronyms Sun Sep 5 17:29:27 2021 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.310 2021/06/18 21:58:20 riastradh Exp $ +$NetBSD: acronyms,v 1.311 2021/09/05 17:29:27 alnsn Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -529,7 +529,6 @@ SNERT snot-nosed egotistical rude teenag SNES Super Nintendo Entertainment System SNMP sorry, not my problem SO significant other -SOB son of [a] bitch SOP standard operating procedure SRS serious SRSLY seriously Index: src/share/misc/acronyms-o.real diff -u src/share/misc/acronyms-o.real:1.9 src/share/misc/acronyms-o.real:1.10 --- src/share/misc/acronyms-o.real:1.9 Sun Aug 9 17:18:47 2020 +++ src/share/misc/acronyms-o.real Sun Sep 5 17:29:27 2021 @@ -1,4 +1,4 @@ -# $NetBSD: acronyms-o.real,v 1.9 2020/08/09 17:18:47 nia Exp $ +# $NetBSD: acronyms-o.real,v 1.10 2021/09/05 17:29:27 alnsn Exp $ ACAB all cops are bastards AFU all fucked up AYFKM are you fucking kidding me @@ -57,6 +57,7 @@ RTFS read the {fine,fucking} source SFA sweet fuck all SNAFU situation normal, all fucked up SNCA shit no one cares about +SOB son of [a] bitch SOL shit out [of] luck SOS same old shit STFA search the fucking archives
CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Sun Sep 5 17:29:27 UTC 2021 Modified Files: src/share/misc: acronyms acronyms-o.real Log Message: Move SOB to offensive acronyms. To generate a diff of this commit: cvs rdiff -u -r1.310 -r1.311 src/share/misc/acronyms cvs rdiff -u -r1.9 -r1.10 src/share/misc/acronyms-o.real Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/dev
Jaromir Dolecek wrote: > Index: src/sys/dev/ic/bwfmvar.h > diff -u src/sys/dev/ic/bwfmvar.h:1.9 src/sys/dev/ic/bwfmvar.h:1.10 > --- src/sys/dev/ic/bwfmvar.h:1.9 Sat May 30 13:41:58 2020 > +++ src/sys/dev/ic/bwfmvar.h Sat May 30 15:55:47 2020 > @@ -1,4 +1,4 @@ > -/* $NetBSD: bwfmvar.h,v 1.9 2020/05/30 13:41:58 jdolecek Exp $ */ > +/* $NetBSD: bwfmvar.h,v 1.10 2020/05/30 15:55:47 jdolecek Exp $ */ > /* $OpenBSD: bwfmvar.h,v 1.1 2017/10/11 17:19:50 patrick Exp $ */ > /* > * Copyright (c) 2010-2016 Broadcom Corporation > @@ -214,6 +214,11 @@ struct bwfm_softc { > enum ieee80211_state, int); > > int sc_bcdc_reqid; > + > + union { > + struct bwfm_bss_info bss_info; > + uint8_t padding[BWFM_BSS_INFO_BUFLEN]; > + } sc_bss_buf; > }; I think you miss #include where BWFM_BSS_INFO_BUFLEN is defined. -- Alex
CVS commit: src/sys/secmodel/suser
Module Name:src Committed By: alnsn Date: Sat May 16 19:12:38 UTC 2020 Modified Files: src/sys/secmodel/suser: secmodel_suser.c Log Message: Make it clear that only KAUTH_MACHDEP_SVS_DISABLE is deprecated. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/secmodel/suser/secmodel_suser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/secmodel/suser/secmodel_suser.c diff -u src/sys/secmodel/suser/secmodel_suser.c:1.53 src/sys/secmodel/suser/secmodel_suser.c:1.54 --- src/sys/secmodel/suser/secmodel_suser.c:1.53 Mon May 11 19:36:40 2020 +++ src/sys/secmodel/suser/secmodel_suser.c Sat May 16 19:12:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: secmodel_suser.c,v 1.53 2020/05/11 19:36:40 alnsn Exp $ */ +/* $NetBSD: secmodel_suser.c,v 1.54 2020/05/16 19:12:38 alnsn Exp $ */ /*- * Copyright (c) 2006 Elad Efrat * All rights reserved. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.53 2020/05/11 19:36:40 alnsn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.54 2020/05/16 19:12:38 alnsn Exp $"); #include #include @@ -846,6 +846,10 @@ secmodel_suser_machdep_cb(kauth_cred_t c case KAUTH_MACHDEP_NVRAM: case KAUTH_MACHDEP_UNMANAGEDMEM: case KAUTH_MACHDEP_PXG: + if (isroot) + result = KAUTH_RESULT_ALLOW; + break; + case KAUTH_MACHDEP_SVS_DISABLE: /* Deprecated. */ if (isroot)
CVS commit: src/sys/secmodel/suser
Module Name:src Committed By: alnsn Date: Sat May 16 19:12:38 UTC 2020 Modified Files: src/sys/secmodel/suser: secmodel_suser.c Log Message: Make it clear that only KAUTH_MACHDEP_SVS_DISABLE is deprecated. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/secmodel/suser/secmodel_suser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/secmodel
Module Name:src Committed By: alnsn Date: Mon May 11 19:36:40 UTC 2020 Modified Files: src/sys/secmodel/securelevel: secmodel_securelevel.c src/sys/secmodel/suser: secmodel_suser.c Log Message: KAUTH_MACHDEP_SVS_DISABLE is deprecated. sysctl machdep.svs.enabled can't be changed anymore at runtime because it's now a boot option. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 \ src/sys/secmodel/securelevel/secmodel_securelevel.c cvs rdiff -u -r1.52 -r1.53 src/sys/secmodel/suser/secmodel_suser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/secmodel/securelevel/secmodel_securelevel.c diff -u src/sys/secmodel/securelevel/secmodel_securelevel.c:1.34 src/sys/secmodel/securelevel/secmodel_securelevel.c:1.35 --- src/sys/secmodel/securelevel/secmodel_securelevel.c:1.34 Mon Mar 16 21:20:12 2020 +++ src/sys/secmodel/securelevel/secmodel_securelevel.c Mon May 11 19:36:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: secmodel_securelevel.c,v 1.34 2020/03/16 21:20:12 pgoyette Exp $ */ +/* $NetBSD: secmodel_securelevel.c,v 1.35 2020/05/11 19:36:39 alnsn Exp $ */ /*- * Copyright (c) 2006 Elad Efrat * All rights reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: secmodel_securelevel.c,v 1.34 2020/03/16 21:20:12 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: secmodel_securelevel.c,v 1.35 2020/05/11 19:36:39 alnsn Exp $"); #ifdef _KERNEL_OPT #include "opt_insecure.h" @@ -480,6 +480,7 @@ secmodel_securelevel_machdep_cb(kauth_cr break; case KAUTH_MACHDEP_SVS_DISABLE: + /* Deprecated. */ if (securelevel > 0) result = KAUTH_RESULT_DENY; break; Index: src/sys/secmodel/suser/secmodel_suser.c diff -u src/sys/secmodel/suser/secmodel_suser.c:1.52 src/sys/secmodel/suser/secmodel_suser.c:1.53 --- src/sys/secmodel/suser/secmodel_suser.c:1.52 Mon Mar 16 21:20:12 2020 +++ src/sys/secmodel/suser/secmodel_suser.c Mon May 11 19:36:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: secmodel_suser.c,v 1.52 2020/03/16 21:20:12 pgoyette Exp $ */ +/* $NetBSD: secmodel_suser.c,v 1.53 2020/05/11 19:36:40 alnsn Exp $ */ /*- * Copyright (c) 2006 Elad Efrat * All rights reserved. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.52 2020/03/16 21:20:12 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.53 2020/05/11 19:36:40 alnsn Exp $"); #include #include @@ -847,6 +847,7 @@ secmodel_suser_machdep_cb(kauth_cred_t c case KAUTH_MACHDEP_UNMANAGEDMEM: case KAUTH_MACHDEP_PXG: case KAUTH_MACHDEP_SVS_DISABLE: + /* Deprecated. */ if (isroot) result = KAUTH_RESULT_ALLOW; break;
CVS commit: src/sys/secmodel
Module Name:src Committed By: alnsn Date: Mon May 11 19:36:40 UTC 2020 Modified Files: src/sys/secmodel/securelevel: secmodel_securelevel.c src/sys/secmodel/suser: secmodel_suser.c Log Message: KAUTH_MACHDEP_SVS_DISABLE is deprecated. sysctl machdep.svs.enabled can't be changed anymore at runtime because it's now a boot option. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 \ src/sys/secmodel/securelevel/secmodel_securelevel.c cvs rdiff -u -r1.52 -r1.53 src/sys/secmodel/suser/secmodel_suser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/uvm
Taylor R Campbell wrote: > This sounds entirely reasonable. Would you like to draft an > implementation of that? Sure, I can look into this on the weekend. > Presumably it would require writing a sysctl callback function for > vm.swap_encrypt, and would somehow involve kauth, but I'm not sure > offhand what needs to happen beyond that. Perhaps vm.user_va0_disable > can be a source of inspiration. I implemented a similar behaviour for SVS sysctl but I later removed it because SVS sysctl was removed. -- Alex
Re: CVS commit: src/sys/uvm
Taylor R Campbell wrote: > Log Message: > Implement swap encryption. > > Enabled by sysctl -w vm.swap_encrypt=1. If secmodel_securelevel(9) is still a thing, locking down this sysctl at high securelevel may improve our security. Prior to this change, swap devices were readable (even if enrypted with cgd). With this sysctl set to 1, all new swap devices will be encrypted, the only thing to worry about is if it's set back to 0 on a compromised host. Not sure if this makes sense because all files on a compromised host can be read and processes' memory can be probably dumped. Alex
Re: CVS commit: src/sys/dev/ata
David Brownlee wrote: > Just another data point - seeing this same panic on a T480 with the > latest kernel from nyftp Same problem on T470. -- Alex
Re: CVS commit: src/sys/sys
Roy Marples wrote: > On 22/12/2019 22:24, Andrew Doran wrote: > > NetBSD 9.99.29 - struct mount changed. > > Just curious - does our build software cope with 3 digit for the last number? https://twitter.com/needydev/status/1205585787095519234?s=20 -- Alex
Re: CVS commit: src/sys/sys
Andrew Doran wrote: > Log Message: > NetBSD 9.99.28 - cpu_data & UVM changes. Wow, you bump versions faster than I compile new releases. At this pace, we'll get to 9.99.99 in a month or two ;-) -- Alex
Re: CVS commit: src/sys/arch/x86
Maxime Villard wrote: > Module Name: src > Committed By: maxv > Date: Wed Nov 27 06:24:33 UTC 2019 > > Modified Files: > src/sys/arch/x86/include: cpu.h fpu.h > src/sys/arch/x86/x86: cpu.c fpu.c > > Log Message: > Add a small API for in-kernel FPU operations. > > fpu_kern_enter(); > /* do FPU stuff */ > fpu_kern_leave(); Is it now possible to use AES-NI instructions for cgd disk encryption? -- Alex
CVS commit: src/distrib/common
Module Name:src Committed By: alnsn Date: Fri Nov 22 00:27:30 UTC 2019 Modified Files: src/distrib/common: cgdroot.rc Log Message: If gpt label "cgd.conf" contains a valid /etc/cgd file system, try mounting gpt label "cgdroot" as a root filesystem first and only mount /dev/cgd0a if that gpt label doesn't exist or fails to mount. XXX pullup to 8 and 9. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/cgdroot.rc diff -u src/distrib/common/cgdroot.rc:1.4 src/distrib/common/cgdroot.rc:1.5 --- src/distrib/common/cgdroot.rc:1.4 Sat Dec 29 13:09:35 2018 +++ src/distrib/common/cgdroot.rc Fri Nov 22 00:27:30 2019 @@ -1,4 +1,4 @@ -# $NetBSD: cgdroot.rc,v 1.4 2018/12/29 13:09:35 alnsn Exp $ +# $NetBSD: cgdroot.rc,v 1.5 2019/11/22 00:27:30 alnsn Exp $ # # Copyright (c) 2013 Pierre Pronchery # All rights reserved. @@ -36,17 +36,20 @@ export EDITOR umask 022 -mounted= +# Mount /etc/cgd. +etc_cgd_mount= for dev in NAME=cgd.conf /dev/wd0a /dev/ld0a ; do if mount -o ro $dev /etc/cgd 2>/dev/null ; then - mounted=$dev + etc_cgd_mount=$dev break fi done -if [ -z "$mounted" ]; then +if [ -z "${etc_cgd_mount}" ]; then echo "Could not mount the boot partition" 1>&2 exit 2 fi + +# Configure cgd device(s). /sbin/wsconsctl -d -w splash.enable=0 > /dev/null 2>&1 cgdconfig -C if [ $? -ne 0 ]; then @@ -54,13 +57,32 @@ if [ $? -ne 0 ]; then umount /etc/cgd exit 2 fi -mount -o ro /dev/cgd0a /altroot -if [ $? -ne 0 ]; then + +# Select candidates for a root mount. +root_mounts= +if [ -z "${etc_cgd_mount##NAME=*}" ]; then + root_mounts="NAME=cgdroot /dev/cgd0a" +else + root_mounts=/dev/cgd0a +fi + +# Mount the root filesystem. +mounted= +for dev in ${root_mounts} ; do + if mount -o ro $dev /altroot 2>/dev/null ; then + mounted=$dev + break + fi +done + +if [ -z "$mounted" ]; then echo "Could not mount the root partition" 1>&2 cgdconfig -U umount /etc/cgd exit 2 fi + +# Boot into /altroot. umount /etc/cgd /sbin/wsconsctl -d -w splash.enable=1 > /dev/null 2>&1 sysctl -w init.root=/altroot
CVS commit: src/distrib/common
Module Name:src Committed By: alnsn Date: Fri Nov 22 00:27:30 UTC 2019 Modified Files: src/distrib/common: cgdroot.rc Log Message: If gpt label "cgd.conf" contains a valid /etc/cgd file system, try mounting gpt label "cgdroot" as a root filesystem first and only mount /dev/cgd0a if that gpt label doesn't exist or fails to mount. XXX pullup to 8 and 9. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: Leak Sanitizer - how to suppress leaks
Martin Husemann wrote: > On Sat, Sep 14, 2019 at 01:45:08PM +0200, Kamil Rytarowski wrote: > > Thanks! I will go for __NO_LEAKS ifdef. > > But it is not a good idea to clutter perfectly fine sources with such > #ifdefs and unused/untested/likely broken code (even if it does not affect > the default binaries). I support __NO_LEAKS idea because it documents the fact that there are indended leaks. -- Alex
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: alnsn Date: Thu Aug 1 08:51:52 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.c Log Message: Move case 'f' to go right after case 'F'. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/veriexecgen/veriexecgen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: alnsn Date: Thu Aug 1 08:51:52 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.c Log Message: Move case 'f' to go right after case 'F'. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/veriexecgen/veriexecgen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/veriexecgen/veriexecgen.c diff -u src/usr.sbin/veriexecgen/veriexecgen.c:1.20 src/usr.sbin/veriexecgen/veriexecgen.c:1.21 --- src/usr.sbin/veriexecgen/veriexecgen.c:1.20 Wed Jul 31 15:02:39 2019 +++ src/usr.sbin/veriexecgen/veriexecgen.c Thu Aug 1 08:51:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: veriexecgen.c,v 1.20 2019/07/31 15:02:39 alnsn Exp $ */ +/* $NetBSD: veriexecgen.c,v 1.21 2019/08/01 08:51:52 alnsn Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #ifndef lint #ifdef __RCSID -__RCSID("$NetBSD: veriexecgen.c,v 1.20 2019/07/31 15:02:39 alnsn Exp $"); +__RCSID("$NetBSD: veriexecgen.c,v 1.21 2019/08/01 08:51:52 alnsn Exp $"); #endif #endif /* not lint */ @@ -468,9 +468,6 @@ main(int argc, char **argv) Fflag = 1; break; #endif /* notyet */ - case 'h': - usage(); - return EXIT_SUCCESS; case 'f': if (strcmp(optarg, "-") == 0) { v.from_file = stdin; @@ -485,6 +482,9 @@ main(int argc, char **argv) v.from_filename = strdup(optarg); } break; + case 'h': + usage(); + return EXIT_SUCCESS; case 'o': v.dbfile = optarg; break;
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: alnsn Date: Wed Jul 31 15:02:39 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.8 veriexecgen.c Log Message: Add an option to read entries from a file. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/veriexecgen/veriexecgen.8 cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/veriexecgen/veriexecgen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: alnsn Date: Wed Jul 31 15:02:39 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.8 veriexecgen.c Log Message: Add an option to read entries from a file. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/veriexecgen/veriexecgen.8 cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/veriexecgen/veriexecgen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/veriexecgen/veriexecgen.8 diff -u src/usr.sbin/veriexecgen/veriexecgen.8:1.20 src/usr.sbin/veriexecgen/veriexecgen.8:1.21 --- src/usr.sbin/veriexecgen/veriexecgen.8:1.20 Tue Jan 8 01:31:49 2019 +++ src/usr.sbin/veriexecgen/veriexecgen.8 Wed Jul 31 15:02:39 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: veriexecgen.8,v 1.20 2019/01/08 01:31:49 gutteridge Exp $ +.\" $NetBSD: veriexecgen.8,v 1.21 2019/07/31 15:02:39 alnsn Exp $ .\" .\" Copyright (c) 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 8, 2019 +.Dd July 31, 2019 .Dt VERIEXECGEN 8 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm .Op Fl AaDrSTvW .Op Fl d Pa dir +.Op Fl f Pa file .Op Fl o Pa fingerprintdb .Op Fl p Pa prefix .Op Fl t Ar algorithm @@ -81,6 +82,13 @@ Scan for files in Multiple uses of this flag can specify more than one directory. .\" .It Fl F .\" Try to guess the correct flags for every file. +.It Fl f Ar file +Read files from +.Ar file, +or if +.Ar file +is "-" read from +.Ar stdin. .It Fl h Display the help screen. .It Fl o Ar fingerprintdb Index: src/usr.sbin/veriexecgen/veriexecgen.c diff -u src/usr.sbin/veriexecgen/veriexecgen.c:1.19 src/usr.sbin/veriexecgen/veriexecgen.c:1.20 --- src/usr.sbin/veriexecgen/veriexecgen.c:1.19 Tue Apr 23 22:35:42 2019 +++ src/usr.sbin/veriexecgen/veriexecgen.c Wed Jul 31 15:02:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: veriexecgen.c,v 1.19 2019/04/23 22:35:42 sevan Exp $ */ +/* $NetBSD: veriexecgen.c,v 1.20 2019/07/31 15:02:39 alnsn Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #ifndef lint #ifdef __RCSID -__RCSID("$NetBSD: veriexecgen.c,v 1.19 2019/04/23 22:35:42 sevan Exp $"); +__RCSID("$NetBSD: veriexecgen.c,v 1.20 2019/07/31 15:02:39 alnsn Exp $"); #endif #endif /* not lint */ @@ -84,6 +84,8 @@ typedef struct veriexecgen_t { int scan_system_dirs; /* just scan system directories */ int verbose; /* verbosity level */ int stamp; /* put a timestamp */ + FILE *from_file; /* read from a file or stdin */ + char *from_filename; } veriexecgen_t; /* this struct describes a directory entry to generate a hash for */ @@ -123,7 +125,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: %s [-AaDrSTvW] [-d dir] [-o fingerprintdb] [-p prefix]\n" + "usage: %s [-AaDrSTvW] [-d dir] [-f file] [-o fingerprintdb] [-p prefix]\n" "\t\t[-t algorithm]\n" "\t%s [-h]\n", getprogname(), getprogname()); } @@ -136,8 +138,15 @@ banner(veriexecgen_t *vp, hash_t *hash_t (void)printf("Fingerprinting "); - for (j = 0; search_path[j] != NULL; j++) - (void)printf("%s ", search_path[j]); + if (search_path) { + for (j = 0; search_path[j] != NULL; j++) + (void)printf("%s ", search_path[j]); + } else if (vp->from_file == stdin) { + (void)printf("files from stdin "); + } else { + (void)printf("files from %s ", + vp->from_filename ? vp->from_filename : "???"); + } (void)printf("(%s) (%s) using %s\n", vp->all_files ? "all files" : "executables only", @@ -194,7 +203,41 @@ check_dup(char *filename) /* add a new entry to the list for `file' */ static void -add_new_entry(veriexecgen_t *vp, FTSENT *file, hash_t *hash) +add_new_path_entry(veriexecgen_t *vp, const char *file, hash_t *hash) +{ + struct stat sb; + struct fentry *e; + + if (stat(file, ) == -1) { + gripe(vp, "Cannot stat file `%s'", file); + return; + } + + if (!vp->all_files && !IS_EXEC(sb.st_mode)) + return; + + e = ecalloc(1UL, sizeof(*e)); + + if (realpath(file, e->filename) == NULL) { + gripe(vp, "Cannot find absolute path `%s'", file); + return; + } + if (check_dup(e->filename)) { + free(e); + return; + } + if ((e->hash_val = do_hash(e->filename, hash)) == NULL) { + gripe(vp, "Cannot calculate hash `%s'", e->filename); + return; + } + e->flags = figure_flags(e->filename, sb.st_mode); + + TAILQ_INSERT_TAIL(, e, f); +} + +/* add a new entry to the list for `file' */ +static void +add_new_ftsent_entry(veriexecgen_t *vp, FTSENT *file, hash_t *hash) { struct fentry *e; struct stat sb; @@ -263,13 +306,33 @@ walk_dir(veriexecgen_t *vp, char **searc strerror(file->fts_errno)); } } else { - add_new_entry(vp, file, hash); + add_new_ftsent_entry(vp, file, hash); } } fts_close(fh); } +/* read files from `file' */ +static void
CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Sun Jun 23 17:17:18 UTC 2019 Modified Files: src/share/misc: acronyms.comp Log Message: Fix a typo. To generate a diff of this commit: cvs rdiff -u -r1.269 -r1.270 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.269 src/share/misc/acronyms.comp:1.270 --- src/share/misc/acronyms.comp:1.269 Sun Jun 23 16:04:34 2019 +++ src/share/misc/acronyms.comp Sun Jun 23 17:17:18 2019 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.269 2019/06/23 16:04:34 sevan Exp $ +$NetBSD: acronyms.comp,v 1.270 2019/06/23 17:17:18 alnsn Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -130,7 +130,7 @@ BEDO burst extended data output BER basic encoding rules BER bit error {rate,ratio} BERT boot error record table -BFB bidirectional forwarding detection +BFD bidirectional forwarding detection BFD binary {file,format} descriptor BFKL big fscking kernel lock BFS breadth-first search
CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Sun Jun 23 17:17:18 UTC 2019 Modified Files: src/share/misc: acronyms.comp Log Message: Fix a typo. To generate a diff of this commit: cvs rdiff -u -r1.269 -r1.270 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: alnsn Date: Sun Jun 2 20:18:23 UTC 2019 Modified Files: src/share/misc: acronyms.comp Log Message: One more CPS. To generate a diff of this commit: cvs rdiff -u -r1.254 -r1.255 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/cadence/if_cemac.c
Module Name:src Committed By: alnsn Date: Sun May 19 13:32:00 UTC 2019 Modified Files: src/sys/dev/cadence: if_cemac.c Log Message: Kill unused sc variable and fix the build. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/cadence/if_cemac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: alnsn Date: Sat May 18 10:21:03 UTC 2019 Modified Files: src/share/man/man9: secmodel_securelevel.9 Log Message: Don't mention SVS because it can't be changed anymore. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/secmodel_securelevel.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: alnsn Date: Sat May 18 10:21:03 UTC 2019 Modified Files: src/share/man/man9: secmodel_securelevel.9 Log Message: Don't mention SVS because it can't be changed anymore. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/secmodel_securelevel.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/secmodel_securelevel.9 diff -u src/share/man/man9/secmodel_securelevel.9:1.18 src/share/man/man9/secmodel_securelevel.9:1.19 --- src/share/man/man9/secmodel_securelevel.9:1.18 Sun Jul 15 05:16:41 2018 +++ src/share/man/man9/secmodel_securelevel.9 Sat May 18 10:21:03 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: secmodel_securelevel.9,v 1.18 2018/07/15 05:16:41 maxv Exp $ +.\" $NetBSD: secmodel_securelevel.9,v 1.19 2019/05/18 10:21:03 alnsn Exp $ .\" .\" Copyright (c) 2006 Elad Efrat .\" Copyright (c) 2000 Hugh Graham @@ -26,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 14, 2018 +.Dd May 18, 2019 .Dt SECMODEL_SECURELEVEL 9 .Os .Sh NAME @@ -132,8 +132,6 @@ Access to unmanaged memory is denied. Only GPIO pins that have been set at .Em securelevel 0 can be accessed. -.It -SVS (Separate Virtual Space) may not be disabled on platforms that support it. .El .It \ 2 Em Highly secure mode .Bl -bullet
CVS commit: src/sys/kern
Module Name:src Committed By: alnsn Date: Sun Apr 28 21:36:20 UTC 2019 Modified Files: src/sys/kern: kern_veriexec.c Log Message: Document that veriexec_file_add() also expects keep-filename and eval-on-load. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/kern/kern_veriexec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: alnsn Date: Sun Apr 28 21:36:20 UTC 2019 Modified Files: src/sys/kern: kern_veriexec.c Log Message: Document that veriexec_file_add() also expects keep-filename and eval-on-load. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/kern/kern_veriexec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_veriexec.c diff -u src/sys/kern/kern_veriexec.c:1.19 src/sys/kern/kern_veriexec.c:1.20 --- src/sys/kern/kern_veriexec.c:1.19 Mon Feb 4 09:54:47 2019 +++ src/sys/kern/kern_veriexec.c Sun Apr 28 21:36:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_veriexec.c,v 1.19 2019/02/04 09:54:47 mrg Exp $ */ +/* $NetBSD: kern_veriexec.c,v 1.20 2019/04/28 21:36:19 alnsn Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.19 2019/02/04 09:54:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.20 2019/04/28 21:36:19 alnsn Exp $"); #include "opt_veriexec.h" @@ -1029,7 +1029,8 @@ veriexec_table_add(struct lwp *l, struct /* * Add a file to be monitored by Veriexec. * - * Expected elements in dict: file, fp, fp-type, entry-type. + * Expected elements in dict: + * file, fp, fp-type, entry-type, keep-filename, eval-on-load. */ int veriexec_file_add(struct lwp *l, prop_dictionary_t dict)
CVS commit: src/distrib
Module Name:src Committed By: alnsn Date: Thu Apr 11 23:50:01 UTC 2019 Modified Files: src/distrib/amd64/ramdisks/ramdisk-cgdroot: list src/distrib/i386/ramdisks/ramdisk-cgdroot: list Log Message: Add a symlink to /altroot/stand to help the kernel find modules. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/ramdisks/ramdisk-cgdroot/list cvs rdiff -u -r1.1 -r1.2 src/distrib/i386/ramdisks/ramdisk-cgdroot/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/ramdisks/ramdisk-cgdroot/list diff -u src/distrib/amd64/ramdisks/ramdisk-cgdroot/list:1.1 src/distrib/amd64/ramdisks/ramdisk-cgdroot/list:1.2 --- src/distrib/amd64/ramdisks/ramdisk-cgdroot/list:1.1 Mon Jul 15 00:22:10 2013 +++ src/distrib/amd64/ramdisks/ramdisk-cgdroot/list Thu Apr 11 23:50:01 2019 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.1 2013/07/15 00:22:10 khorben Exp $ +# $NetBSD: list,v 1.2 2019/04/11 23:50:01 alnsn Exp $ PROG bin/chio PROG bin/dd @@ -30,3 +30,5 @@ PROG usr/bin/tip PROG usr/sbin/installboot PROG usr/sbin/wiconfig + +SYMLINK /altroot/stand stand Index: src/distrib/i386/ramdisks/ramdisk-cgdroot/list diff -u src/distrib/i386/ramdisks/ramdisk-cgdroot/list:1.1 src/distrib/i386/ramdisks/ramdisk-cgdroot/list:1.2 --- src/distrib/i386/ramdisks/ramdisk-cgdroot/list:1.1 Tue Jul 16 02:10:43 2013 +++ src/distrib/i386/ramdisks/ramdisk-cgdroot/list Thu Apr 11 23:50:01 2019 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.1 2013/07/16 02:10:43 khorben Exp $ +# $NetBSD: list,v 1.2 2019/04/11 23:50:01 alnsn Exp $ PROG bin/chio PROG bin/dd @@ -30,3 +30,5 @@ PROG usr/bin/tip PROG usr/sbin/installboot PROG usr/sbin/wiconfig + +SYMLINK /altroot/stand stand
CVS commit: src/distrib
Module Name:src Committed By: alnsn Date: Thu Apr 11 23:50:01 UTC 2019 Modified Files: src/distrib/amd64/ramdisks/ramdisk-cgdroot: list src/distrib/i386/ramdisks/ramdisk-cgdroot: list Log Message: Add a symlink to /altroot/stand to help the kernel find modules. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/ramdisks/ramdisk-cgdroot/list cvs rdiff -u -r1.1 -r1.2 src/distrib/i386/ramdisks/ramdisk-cgdroot/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: alnsn Date: Sun Jan 27 19:13:04 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: netbsd32_machdep.c Log Message: Local variable p is __diagused. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/netbsd32_machdep.c diff -u src/sys/arch/aarch64/aarch64/netbsd32_machdep.c:1.4 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c:1.5 --- src/sys/arch/aarch64/aarch64/netbsd32_machdep.c:1.4 Sun Jan 27 02:08:36 2019 +++ src/sys/arch/aarch64/aarch64/netbsd32_machdep.c Sun Jan 27 19:13:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.4 2019/01/27 02:08:36 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.5 2019/01/27 19:13:04 alnsn Exp $ */ /* * Copyright (c) 2018 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.4 2019/01/27 02:08:36 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.5 2019/01/27 19:13:04 alnsn Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -308,7 +308,7 @@ startlwp32(void *arg) int cpu_mcontext32_validate(struct lwp *l, const mcontext32_t *mcp) { - struct proc * const p = l->l_proc; + struct proc * const p __diagused = l->l_proc; const uint32_t spsr = mcp->__gregs[_REG_CPSR]; KASSERT(p->p_flag & PK_32);
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: alnsn Date: Sun Jan 27 19:13:04 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: netbsd32_machdep.c Log Message: Local variable p is __diagused. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/flex/dist/src
Module Name:src Committed By: alnsn Date: Sun Jan 27 03:01:48 UTC 2019 Modified Files: src/external/bsd/flex/dist/src: libyywrap.c Log Message: Remove extra #endif. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/libyywrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/flex/dist/src/libyywrap.c diff -u src/external/bsd/flex/dist/src/libyywrap.c:1.4 src/external/bsd/flex/dist/src/libyywrap.c:1.5 --- src/external/bsd/flex/dist/src/libyywrap.c:1.4 Sun Jan 27 02:08:34 2019 +++ src/external/bsd/flex/dist/src/libyywrap.c Sun Jan 27 03:01:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: libyywrap.c,v 1.4 2019/01/27 02:08:34 pgoyette Exp $ */ +/* $NetBSD: libyywrap.c,v 1.5 2019/01/27 03:01:48 alnsn Exp $ */ /* libyywrap - flex run-time support library "yywrap" function */ @@ -25,8 +25,7 @@ #ifndef HAVE_NBTOOL_CONFIG_H #include #ifdef __RCSID -__RCSID("$NetBSD: libyywrap.c,v 1.4 2019/01/27 02:08:34 pgoyette Exp $"); -#endif +__RCSID("$NetBSD: libyywrap.c,v 1.5 2019/01/27 03:01:48 alnsn Exp $"); #endif #endif
CVS commit: src/external/bsd/flex/dist/src
Module Name:src Committed By: alnsn Date: Sun Jan 27 03:01:48 UTC 2019 Modified Files: src/external/bsd/flex/dist/src: libyywrap.c Log Message: Remove extra #endif. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/libyywrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/kern/lib/libsljit/arch/mips
Module Name:src Committed By: alnsn Date: Tue Jan 22 01:25:53 UTC 2019 Modified Files: src/sys/rump/kern/lib/libsljit/arch/mips: cache.c Log Message: Cast register_t to uintptr_t before casting to void *. Not sure what's going on here but evbmips64-el build fails without this cast. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libsljit/arch/mips/cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsljit/arch/mips/cache.c diff -u src/sys/rump/kern/lib/libsljit/arch/mips/cache.c:1.2 src/sys/rump/kern/lib/libsljit/arch/mips/cache.c:1.3 --- src/sys/rump/kern/lib/libsljit/arch/mips/cache.c:1.2 Tue Jan 22 00:36:02 2019 +++ src/sys/rump/kern/lib/libsljit/arch/mips/cache.c Tue Jan 22 01:25:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.2 2019/01/22 00:36:02 alnsn Exp $ */ +/* $NetBSD: cache.c,v 1.3 2019/01/22 01:25:53 alnsn Exp $ */ /*- * Copyright (c) 2014 Alexander Nasonov. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.2 2019/01/22 00:36:02 alnsn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.3 2019/01/22 01:25:53 alnsn Exp $"); /* * Barebone implementation of mips cache routines for rump. @@ -48,5 +48,5 @@ static void icache_sync_range(register_t va, vsize_t sz) { - (void)rumpcomp_sync_icache((void *)va, (uint64_t)sz); + (void)rumpcomp_sync_icache((void *)(uintptr_t)va, (uint64_t)sz); }
CVS commit: src/sys/rump/kern/lib/libsljit/arch/mips
Module Name:src Committed By: alnsn Date: Tue Jan 22 01:25:53 UTC 2019 Modified Files: src/sys/rump/kern/lib/libsljit/arch/mips: cache.c Log Message: Cast register_t to uintptr_t before casting to void *. Not sure what's going on here but evbmips64-el build fails without this cast. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libsljit/arch/mips/cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/kern/lib/libsljit/arch/mips
Module Name:src Committed By: alnsn Date: Tue Jan 22 00:36:02 UTC 2019 Modified Files: src/sys/rump/kern/lib/libsljit/arch/mips: cache.c Log Message: Sync the first argument type with mco_icache_sync_range. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsljit/arch/mips/cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsljit/arch/mips/cache.c diff -u src/sys/rump/kern/lib/libsljit/arch/mips/cache.c:1.1 src/sys/rump/kern/lib/libsljit/arch/mips/cache.c:1.2 --- src/sys/rump/kern/lib/libsljit/arch/mips/cache.c:1.1 Tue Jul 22 20:25:13 2014 +++ src/sys/rump/kern/lib/libsljit/arch/mips/cache.c Tue Jan 22 00:36:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.1 2014/07/22 20:25:13 alnsn Exp $ */ +/* $NetBSD: cache.c,v 1.2 2019/01/22 00:36:02 alnsn Exp $ */ /*- * Copyright (c) 2014 Alexander Nasonov. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.1 2014/07/22 20:25:13 alnsn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.2 2019/01/22 00:36:02 alnsn Exp $"); /* * Barebone implementation of mips cache routines for rump. @@ -38,14 +38,14 @@ __KERNEL_RCSID(0, "$NetBSD: cache.c,v 1. #include "sljit_rump.h" -static void icache_sync_range(vaddr_t, vsize_t); +static void icache_sync_range(register_t, vsize_t); struct mips_cache_ops mips_cache_ops = { .mco_icache_sync_range = _sync_range }; static void -icache_sync_range(vaddr_t va, vsize_t sz) +icache_sync_range(register_t va, vsize_t sz) { (void)rumpcomp_sync_icache((void *)va, (uint64_t)sz);
CVS commit: src/sys/rump/kern/lib/libsljit/arch/mips
Module Name:src Committed By: alnsn Date: Tue Jan 22 00:36:02 UTC 2019 Modified Files: src/sys/rump/kern/lib/libsljit/arch/mips: cache.c Log Message: Sync the first argument type with mco_icache_sync_range. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsljit/arch/mips/cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: alnsn Date: Mon Jan 21 01:02:50 UTC 2019 Modified Files: src/doc: 3RDPARTY Log Message: Update sljit version. To generate a diff of this commit: cvs rdiff -u -r1.1593 -r1.1594 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1593 src/doc/3RDPARTY:1.1594 --- src/doc/3RDPARTY:1.1593 Wed Jan 9 22:51:53 2019 +++ src/doc/3RDPARTY Mon Jan 21 01:02:50 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1593 2019/01/09 22:51:53 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1594 2019/01/21 01:02:50 alnsn Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1532,7 +1532,7 @@ Location: external/cddl/osnet Notes: Package: sljit -Version: svn revision 313 +Version: 0.93 (svn revision 333) Current Vers: 0.93 Maintainer: Zoltán Herczeg http://sourceforge.net/projects/sljit/
CVS commit: src/doc
Module Name:src Committed By: alnsn Date: Mon Jan 21 01:02:50 UTC 2019 Modified Files: src/doc: 3RDPARTY Log Message: Update sljit version. To generate a diff of this commit: cvs rdiff -u -r1.1593 -r1.1594 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/kern/lib/libsljit
Module Name:src Committed By: alnsn Date: Mon Jan 21 00:30:14 UTC 2019 Modified Files: src/sys/rump/kern/lib/libsljit: Makefile Added Files: src/sys/rump/kern/lib/libsljit/arch/aarch64: cpufunc.c sljit_rump.c Log Message: Add sljit rump glue for aarch64. XXX arm_icache_sync_range() and mips_icache_sync_range() call (void)rumpcomp_sync_icache((void *)va, (uint64_t)sz); but linking fails if I do the same on aarch64 (I suspect it also fails on 32bit arm and mips). As a workaround, I call __builtin___clear_cache(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/kern/lib/libsljit/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/lib/libsljit/arch/aarch64/cpufunc.c \ src/sys/rump/kern/lib/libsljit/arch/aarch64/sljit_rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsljit/Makefile diff -u src/sys/rump/kern/lib/libsljit/Makefile:1.5 src/sys/rump/kern/lib/libsljit/Makefile:1.6 --- src/sys/rump/kern/lib/libsljit/Makefile:1.5 Tue Jan 5 13:07:47 2016 +++ src/sys/rump/kern/lib/libsljit/Makefile Mon Jan 21 00:30:14 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2016/01/05 13:07:47 christos Exp $ +# $NetBSD: Makefile,v 1.6 2019/01/21 00:30:14 alnsn Exp $ # # Public Domain. # @@ -38,5 +38,14 @@ RUMPCOMP_USER_CPPFLAGS=-I${RUMPCOMP_INCS LIBDPLIBS+= arm ${NETBSDSRCDIR}/lib/libarch .endif +.if !empty(MACHINE_ARCH:Maarch64*) +SRCS+= cpufunc.c +RUMPCOMP_USER_SRCS= sljit_rump.c +.PATH: ${.CURDIR}/arch/aarch64 + +RUMPCOMP_INCS_DIR:= ${.PARSEDIR} +RUMPCOMP_USER_CPPFLAGS=-I${RUMPCOMP_INCS_DIR} +.endif + .include .include Added files: Index: src/sys/rump/kern/lib/libsljit/arch/aarch64/cpufunc.c diff -u /dev/null src/sys/rump/kern/lib/libsljit/arch/aarch64/cpufunc.c:1.1 --- /dev/null Mon Jan 21 00:30:14 2019 +++ src/sys/rump/kern/lib/libsljit/arch/aarch64/cpufunc.c Mon Jan 21 00:30:14 2019 @@ -0,0 +1,51 @@ +/* $NetBSD: cpufunc.c,v 1.1 2019/01/21 00:30:14 alnsn Exp $ */ + +/*- + * Copyright (c) 2019 Alexander Nasonov. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.1 2019/01/21 00:30:14 alnsn Exp $"); + +/* + * Barebone implementation of arm cpufunc routines for rump. + */ + +#include +#include + +#include "sljit_rump.h" + +void aarch64_icache_sync_range(vaddr_t, vsize_t); + +void +aarch64_icache_sync_range(vaddr_t va, vsize_t sz) +{ + + // XXX MIPS and 32-bit ARM make this call: + // (void)rumpcomp_sync_icache((void *)va, (uint64_t)sz); + // but it doesn't link. Fix Makefiles to make it link. + __builtin___clear_cache((void *)va, (char *)va + sz); +} Index: src/sys/rump/kern/lib/libsljit/arch/aarch64/sljit_rump.c diff -u /dev/null src/sys/rump/kern/lib/libsljit/arch/aarch64/sljit_rump.c:1.1 --- /dev/null Mon Jan 21 00:30:14 2019 +++ src/sys/rump/kern/lib/libsljit/arch/aarch64/sljit_rump.c Mon Jan 21 00:30:14 2019 @@ -0,0 +1,45 @@ +/* $NetBSD: sljit_rump.c,v 1.1 2019/01/21 00:30:14 alnsn Exp $ */ + +/*- + * Copyright (c) 2019 Alexander Nasonov. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. +
CVS commit: src/sys/rump/kern/lib/libsljit
Module Name:src Committed By: alnsn Date: Mon Jan 21 00:30:14 UTC 2019 Modified Files: src/sys/rump/kern/lib/libsljit: Makefile Added Files: src/sys/rump/kern/lib/libsljit/arch/aarch64: cpufunc.c sljit_rump.c Log Message: Add sljit rump glue for aarch64. XXX arm_icache_sync_range() and mips_icache_sync_range() call (void)rumpcomp_sync_icache((void *)va, (uint64_t)sz); but linking fails if I do the same on aarch64 (I suspect it also fails on 32bit arm and mips). As a workaround, I call __builtin___clear_cache(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/kern/lib/libsljit/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/lib/libsljit/arch/aarch64/cpufunc.c \ src/sys/rump/kern/lib/libsljit/arch/aarch64/sljit_rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/modules
Module Name:src Committed By: alnsn Date: Mon Jan 21 00:21:48 UTC 2019 Modified Files: src/sys/modules: Makefile Log Message: Build bpfjit and sljit modules on aarch64. To generate a diff of this commit: cvs rdiff -u -r1.214 -r1.215 src/sys/modules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.214 src/sys/modules/Makefile:1.215 --- src/sys/modules/Makefile:1.214 Wed Dec 19 13:57:52 2018 +++ src/sys/modules/Makefile Mon Jan 21 00:21:48 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.214 2018/12/19 13:57:52 maxv Exp $ +# $NetBSD: Makefile,v 1.215 2019/01/21 00:21:48 alnsn Exp $ .include @@ -212,10 +212,11 @@ SUBDIR+= ubsec # Builds on architecture .endif .if ${MKSLJIT} != "no" -# No modules for arm, mips and powerpc yet. -.if ${MACHINE_ARCH} == "i386" || \ -${MACHINE_ARCH} == "x86_64" || \ -${MACHINE_ARCH} == "sparc" +# No modules for 32-bit arm, mips and powerpc yet. +.if ${MACHINE_ARCH} == "aarch64" || \ +${MACHINE_ARCH} == "i386"|| \ +${MACHINE_ARCH} == "sparc" || \ +${MACHINE_ARCH} == "x86_64" SUBDIR+= bpfjit SUBDIR+= sljit .endif
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: alnsn Date: Mon Jan 21 00:22:24 UTC 2019 Modified Files: src/distrib/sets/lists/modules: ad.aarch64 Log Message: Add bpfjit and sljit modules. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/modules/ad.aarch64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: alnsn Date: Mon Jan 21 00:22:24 UTC 2019 Modified Files: src/distrib/sets/lists/modules: ad.aarch64 Log Message: Add bpfjit and sljit modules. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/modules/ad.aarch64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/ad.aarch64 diff -u src/distrib/sets/lists/modules/ad.aarch64:1.1 src/distrib/sets/lists/modules/ad.aarch64:1.2 --- src/distrib/sets/lists/modules/ad.aarch64:1.1 Sun Aug 10 05:47:35 2014 +++ src/distrib/sets/lists/modules/ad.aarch64 Mon Jan 21 00:22:24 2019 @@ -1,3 +1,7 @@ -# $NetBSD: ad.aarch64,v 1.1 2014/08/10 05:47:35 matt Exp $ +# $NetBSD: ad.aarch64,v 1.2 2019/01/21 00:22:24 alnsn Exp $ +./@MODULEDIR@/bpfjitbase-kernel-modules kmod,sljit +./@MODULEDIR@/bpfjit/bpfjit.kmod base-kernel-modules kmod,sljit ./@MODULEDIR@/exec_elf64 base-kernel-modules kmod ./@MODULEDIR@/exec_elf64/exec_elf64.kmod base-kernel-modules kmod +./@MODULEDIR@/sljitbase-kernel-modules kmod,sljit +./@MODULEDIR@/sljit/sljit.kmod base-kernel-modules kmod,sljit
CVS commit: src/sys/modules
Module Name:src Committed By: alnsn Date: Mon Jan 21 00:21:48 UTC 2019 Modified Files: src/sys/modules: Makefile Log Message: Build bpfjit and sljit modules on aarch64. To generate a diff of this commit: cvs rdiff -u -r1.214 -r1.215 src/sys/modules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/sljit/dist/sljit_src
Module Name:src Committed By: alnsn Date: Mon Jan 21 00:07:11 UTC 2019 Modified Files: src/sys/external/bsd/sljit/dist/sljit_src: sljitLir.c Log Message: Add #ifndef _KERNEL guard around userspace #includes To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/sljit/dist/sljit_src
Module Name:src Committed By: alnsn Date: Mon Jan 21 00:07:11 UTC 2019 Modified Files: src/sys/external/bsd/sljit/dist/sljit_src: sljitLir.c Log Message: Add #ifndef _KERNEL guard around userspace #includes To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c:1.6 src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c:1.7 --- src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c:1.6 Sun Jan 20 23:14:16 2019 +++ src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c Mon Jan 21 00:07:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sljitLir.c,v 1.6 2019/01/20 23:14:16 alnsn Exp $ */ +/* $NetBSD: sljitLir.c,v 1.7 2019/01/21 00:07:10 alnsn Exp $ */ /* *Stack-less Just-In-Time compiler @@ -30,9 +30,11 @@ #if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED) +#ifndef _KERNEL /* These libraries are needed for the macros below. */ #include #include +#endif #endif /* SLJIT_STD_MACROS_DEFINED */
CVS commit: src/sys/net
Module Name:src Committed By: alnsn Date: Sun Jan 20 23:36:58 UTC 2019 Modified Files: src/sys/net: bpfjit.c Log Message: Add missing include. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/net/bpfjit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/bpfjit.c diff -u src/sys/net/bpfjit.c:1.46 src/sys/net/bpfjit.c:1.47 --- src/sys/net/bpfjit.c:1.46 Fri Jul 29 20:29:38 2016 +++ src/sys/net/bpfjit.c Sun Jan 20 23:36:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bpfjit.c,v 1.46 2016/07/29 20:29:38 alnsn Exp $ */ +/* $NetBSD: bpfjit.c,v 1.47 2019/01/20 23:36:57 alnsn Exp $ */ /*- * Copyright (c) 2011-2015 Alexander Nasonov. @@ -31,9 +31,9 @@ #include #ifdef _KERNEL -__KERNEL_RCSID(0, "$NetBSD: bpfjit.c,v 1.46 2016/07/29 20:29:38 alnsn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpfjit.c,v 1.47 2019/01/20 23:36:57 alnsn Exp $"); #else -__RCSID("$NetBSD: bpfjit.c,v 1.46 2016/07/29 20:29:38 alnsn Exp $"); +__RCSID("$NetBSD: bpfjit.c,v 1.47 2019/01/20 23:36:57 alnsn Exp $"); #endif #include @@ -61,6 +61,7 @@ __RCSID("$NetBSD: bpfjit.c,v 1.46 2016/0 #include #include #include +#include #else #include #include
CVS commit: src/sys/net
Module Name:src Committed By: alnsn Date: Sun Jan 20 23:36:58 UTC 2019 Modified Files: src/sys/net: bpfjit.c Log Message: Add missing include. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/net/bpfjit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/sljit
Module Name:src Committed By: alnsn Date: Sun Jan 20 23:23:01 UTC 2019 Modified Files: src/sys/external/bsd/sljit: README.import Log Message: Update sljit revision. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/sljit/README.import Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/sljit/README.import diff -u src/sys/external/bsd/sljit/README.import:1.5 src/sys/external/bsd/sljit/README.import:1.6 --- src/sys/external/bsd/sljit/README.import:1.5 Sun May 29 17:56:20 2016 +++ src/sys/external/bsd/sljit/README.import Sun Jan 20 23:23:01 2019 @@ -1,6 +1,6 @@ There are no CVS/SVN ids in sljit repository but don't forget to remove .svn before importing the new version. -Current sljit import is @ r313: +Current sljit import is @ r333: -svn co https://svn.code.sf.net/p/sljit/code@r313 dist +svn co https://svn.code.sf.net/p/sljit/code@r333 dist
CVS commit: src/sys/external/bsd/sljit
Module Name:src Committed By: alnsn Date: Sun Jan 20 23:23:01 UTC 2019 Modified Files: src/sys/external/bsd/sljit: README.import Log Message: Update sljit revision. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/sljit/README.import Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/sljit/dist
Module Name:src Committed By: alnsn Date: Sun Jan 20 23:14:16 UTC 2019 Modified Files: src/sys/external/bsd/sljit/dist/sljit_src: sljitConfig.h sljitConfigInternal.h sljitExecAllocator.c sljitLir.c sljitLir.h sljitNativeARM_32.c sljitNativeARM_64.c sljitNativeARM_T2_32.c sljitNativeMIPS_32.c sljitNativeMIPS_64.c sljitNativeMIPS_common.c sljitNativePPC_32.c sljitNativePPC_64.c sljitNativePPC_common.c sljitNativeSPARC_32.c sljitNativeSPARC_common.c sljitNativeTILEGX-encoder.c sljitNativeTILEGX_64.c sljitNativeX86_32.c sljitNativeX86_64.c sljitNativeX86_common.c sljitUtils.c src/sys/external/bsd/sljit/dist/test_src: sljitTest.c Removed Files: src/sys/external/bsd/sljit/dist: hist Log Message: Resolve conflicts. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 src/sys/external/bsd/sljit/dist/hist cvs rdiff -u -r1.14 -r1.15 \ src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c cvs rdiff -u -r1.7 -r1.8 \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX-encoder.c cvs rdiff -u -r1.8 -r1.9 \ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c cvs rdiff -u -r1.9 -r1.10 \ src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/sljit/dist/test_src/sljitTest.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/sys/external/bsd/sljit/dist
Module Name:src Committed By: alnsn Date: Sun Jan 20 22:44:26 UTC 2019 Update of /cvsroot/src/sys/external/bsd/sljit/dist In directory ivanova.netbsd.org:/tmp/cvs-serv663 Log Message: Update sljit to version 0.93 (svn revision r333). Changes since the last import: r333 More x86 fixes and a new stack test. r332 Improve stack allocation on x86. r331 Make sljit_free_unused_memory_exec public, PPC flush takes priority. r330 Reverse the stack utility to top-down. r329 Add sljit_set_current_flags function. r328 Add two more virtual registers to x86/32, ARM-32 refactor. r327 Remove value caching on ARM-32. r326 Remove value caching on ARM-Thumb2. r325 Move with update rework. r324 Arm32 store fixes. r323 Update macros and remove copyright years. r322 Reworking flags, removing keep flags. r321 Quick fix for regexjit. r320 Improve protected executable allocator. Patch insipred by Christian Persch. r319 Fully support dynamic code modifications again. r318 Support protected allocator on all architectures except TILEGX. r317 Rework protected allocator, only x86 linux is supported now. r316 Add protected executable allocator. r315 Remove SLJIT_MEMMOVE. r314 Fix unaligned accesses on x86. Patch by Marc Mutz. Status: Vendor Tag: TNF Release Tags: SLJIT-r333 U src/sys/external/bsd/sljit/dist/API_CHANGES U src/sys/external/bsd/sljit/dist/INTERNAL_CHANGES U src/sys/external/bsd/sljit/dist/Makefile U src/sys/external/bsd/sljit/dist/README C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h C src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h C src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX-encoder.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c N src/sys/external/bsd/sljit/dist/sljit_src/sljitProtExecAllocator.c U src/sys/external/bsd/sljit/dist/test_src/sljitMain.c C src/sys/external/bsd/sljit/dist/test_src/sljitTest.c U src/sys/external/bsd/sljit/dist/regex_src/regexJIT.c U src/sys/external/bsd/sljit/dist/regex_src/regexMain.c U src/sys/external/bsd/sljit/dist/regex_src/regexJIT.h U src/sys/external/bsd/sljit/dist/doc/overview.txt U src/sys/external/bsd/sljit/dist/doc/tutorial/brainfuck.c U src/sys/external/bsd/sljit/dist/doc/tutorial/func_call.c U src/sys/external/bsd/sljit/dist/doc/tutorial/struct_access.c U src/sys/external/bsd/sljit/dist/doc/tutorial/sljit_tutorial.html U src/sys/external/bsd/sljit/dist/doc/tutorial/99bottles.bf U src/sys/external/bsd/sljit/dist/doc/tutorial/array_access.c U src/sys/external/bsd/sljit/dist/doc/tutorial/first_program.c U src/sys/external/bsd/sljit/dist/doc/tutorial/loop.c U src/sys/external/bsd/sljit/dist/doc/tutorial/README U src/sys/external/bsd/sljit/dist/doc/tutorial/branch.c U src/sys/external/bsd/sljit/dist/doc/tutorial/hello.bf U src/sys/external/bsd/sljit/dist/doc/tutorial/temp_var.c 23 conflicts created by this import. Use the following command to help the merge: cvs checkout -jTNF:yesterday -jTNF src/sys/external/bsd/sljit/dist
CVS import: src/sys/external/bsd/sljit/dist
Module Name:src Committed By: alnsn Date: Sun Jan 20 22:44:26 UTC 2019 Update of /cvsroot/src/sys/external/bsd/sljit/dist In directory ivanova.netbsd.org:/tmp/cvs-serv663 Log Message: Update sljit to version 0.93 (svn revision r333). Changes since the last import: r333 More x86 fixes and a new stack test. r332 Improve stack allocation on x86. r331 Make sljit_free_unused_memory_exec public, PPC flush takes priority. r330 Reverse the stack utility to top-down. r329 Add sljit_set_current_flags function. r328 Add two more virtual registers to x86/32, ARM-32 refactor. r327 Remove value caching on ARM-32. r326 Remove value caching on ARM-Thumb2. r325 Move with update rework. r324 Arm32 store fixes. r323 Update macros and remove copyright years. r322 Reworking flags, removing keep flags. r321 Quick fix for regexjit. r320 Improve protected executable allocator. Patch insipred by Christian Persch. r319 Fully support dynamic code modifications again. r318 Support protected allocator on all architectures except TILEGX. r317 Rework protected allocator, only x86 linux is supported now. r316 Add protected executable allocator. r315 Remove SLJIT_MEMMOVE. r314 Fix unaligned accesses on x86. Patch by Marc Mutz. Status: Vendor Tag: TNF Release Tags: SLJIT-r333 U src/sys/external/bsd/sljit/dist/API_CHANGES U src/sys/external/bsd/sljit/dist/INTERNAL_CHANGES U src/sys/external/bsd/sljit/dist/Makefile U src/sys/external/bsd/sljit/dist/README C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h C src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h C src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX-encoder.c C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c N src/sys/external/bsd/sljit/dist/sljit_src/sljitProtExecAllocator.c U src/sys/external/bsd/sljit/dist/test_src/sljitMain.c C src/sys/external/bsd/sljit/dist/test_src/sljitTest.c U src/sys/external/bsd/sljit/dist/regex_src/regexJIT.c U src/sys/external/bsd/sljit/dist/regex_src/regexMain.c U src/sys/external/bsd/sljit/dist/regex_src/regexJIT.h U src/sys/external/bsd/sljit/dist/doc/overview.txt U src/sys/external/bsd/sljit/dist/doc/tutorial/brainfuck.c U src/sys/external/bsd/sljit/dist/doc/tutorial/func_call.c U src/sys/external/bsd/sljit/dist/doc/tutorial/struct_access.c U src/sys/external/bsd/sljit/dist/doc/tutorial/sljit_tutorial.html U src/sys/external/bsd/sljit/dist/doc/tutorial/99bottles.bf U src/sys/external/bsd/sljit/dist/doc/tutorial/array_access.c U src/sys/external/bsd/sljit/dist/doc/tutorial/first_program.c U src/sys/external/bsd/sljit/dist/doc/tutorial/loop.c U src/sys/external/bsd/sljit/dist/doc/tutorial/README U src/sys/external/bsd/sljit/dist/doc/tutorial/branch.c U src/sys/external/bsd/sljit/dist/doc/tutorial/hello.bf U src/sys/external/bsd/sljit/dist/doc/tutorial/temp_var.c 23 conflicts created by this import. Use the following command to help the merge: cvs checkout -jTNF:yesterday -jTNF src/sys/external/bsd/sljit/dist
Re: CVS commit: src/distrib/common
m...@netbsd.org wrote: > On Wed, Jan 02, 2019 at 08:42:33PM +0000, Alexander Nasonov wrote: > > https://wiki.netbsd.org/projects/project/transparent-cgd/ > > > > This page describes limitations of cgdroot.kmod. > > > > In my opinion, aes-xts should be added to efi bootloader and paramsfile > > should be merged into boot.cfg. > > If you aren't doing this, it's a *really* good beginner project. > Perhaps adjust the wiki page to be less exploratory and more with do > X,Y,Z and add it to the GSoC-able list? Adding a cgd layer on top of ffs code in libsa isn't straightforward but it should be doable. It's also not clear to me how to pass a raw encryption key from the bootloader to the kernel but I'm not very familiar with that code. Overall it would be a good GCoC project. -- Alex
Re: CVS commit: src/distrib/common
Alexander Nasonov wrote: > m...@netbsd.org wrote: > > Why are we using a memory disk for full disk encryption? I am under the > > impression that it shouldn't be required. > > We use a memory disk because cgdconfig functionality isn't available in > the bootloader. https://wiki.netbsd.org/projects/project/transparent-cgd/ This page describes limitations of cgdroot.kmod. In my opinion, aes-xts should be added to efi bootloader and paramsfile should be merged into boot.cfg. -- Alex
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: alnsn Date: Sat Dec 29 19:53:38 UTC 2018 Modified Files: src/sys/arch/aarch64/aarch64: pmapboot.c Log Message: pmapboot_pte_print() is only used when VERBOSE_INIT_ARM is defined. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/pmapboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/pmapboot.c diff -u src/sys/arch/aarch64/aarch64/pmapboot.c:1.2 src/sys/arch/aarch64/aarch64/pmapboot.c:1.3 --- src/sys/arch/aarch64/aarch64/pmapboot.c:1.2 Fri Oct 5 01:54:10 2018 +++ src/sys/arch/aarch64/aarch64/pmapboot.c Sat Dec 29 19:53:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmapboot.c,v 1.2 2018/10/05 01:54:10 ryo Exp $ */ +/* $NetBSD: pmapboot.c,v 1.3 2018/12/29 19:53:38 alnsn Exp $ */ /* * Copyright (c) 2018 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.2 2018/10/05 01:54:10 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.3 2018/12/29 19:53:38 alnsn Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -139,6 +139,7 @@ pmapboot_protect(vaddr_t sva, vaddr_t ev * it supports only maximum 7 argument, and only '%d', '%x', and '%s' formats. */ +#ifdef VERBOSE_INIT_ARM static void pmapboot_pte_print(pt_entry_t pte, int level, void (*pr)(const char *, ...) __printflike(1, 2)) @@ -152,6 +153,7 @@ pmapboot_pte_print(pt_entry_t pte, int l l0pde_pa(pte)); #endif } +#endif /* VERBOSE_INIT_ARM */ #ifdef OPTIMIZE_TLB_CONTIG static inline bool
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: alnsn Date: Sat Dec 29 19:53:38 UTC 2018 Modified Files: src/sys/arch/aarch64/aarch64: pmapboot.c Log Message: pmapboot_pte_print() is only used when VERBOSE_INIT_ARM is defined. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/pmapboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/distrib/common
m...@netbsd.org wrote: > Why are we using a memory disk for full disk encryption? I am under the > impression that it shouldn't be required. We use a memory disk because cgdconfig functionality isn't available in the bootloader. -- Alex
CVS commit: src/distrib/common
Module Name:src Committed By: alnsn Date: Sat Dec 29 13:09:35 UTC 2018 Modified Files: src/distrib/common: cgdroot.rc Log Message: ROOT.a doesn't resolve to a useful partition, hardcode wd0a and ld0a for now. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/common
Module Name:src Committed By: alnsn Date: Sat Dec 29 13:09:35 UTC 2018 Modified Files: src/distrib/common: cgdroot.rc Log Message: ROOT.a doesn't resolve to a useful partition, hardcode wd0a and ld0a for now. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/cgdroot.rc diff -u src/distrib/common/cgdroot.rc:1.3 src/distrib/common/cgdroot.rc:1.4 --- src/distrib/common/cgdroot.rc:1.3 Sat Dec 29 01:04:38 2018 +++ src/distrib/common/cgdroot.rc Sat Dec 29 13:09:35 2018 @@ -1,4 +1,4 @@ -# $NetBSD: cgdroot.rc,v 1.3 2018/12/29 01:04:38 alnsn Exp $ +# $NetBSD: cgdroot.rc,v 1.4 2018/12/29 13:09:35 alnsn Exp $ # # Copyright (c) 2013 Pierre Pronchery # All rights reserved. @@ -37,7 +37,7 @@ export EDITOR umask 022 mounted= -for dev in NAME=cgd.conf ROOT.a ; do +for dev in NAME=cgd.conf /dev/wd0a /dev/ld0a ; do if mount -o ro $dev /etc/cgd 2>/dev/null ; then mounted=$dev break
Re: CVS commit: src/distrib/common
Alexander Nasonov wrote: > Module Name: src > Committed By: alnsn > Date: Sat Dec 29 00:52:11 UTC 2018 > > Modified Files: > src/distrib/common: cgdroot.rc > > Log Message: > Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a. > > +mounted= > +for dev in NAME=cgd.conf ROOT.a ; do > + if mount -o ro $dev /etc/cgd 2>/dev/null ; then > + mounted=$dev > + fi > +done I was a bit too fast to add the second probe. ROOT.a is always /dev/md0a when booted with 'load cgdroot.kmod'. I can't think of anything other than putting back /dev/wd0a and perhaps adding few more common disks like /dev/ld0a. -- Alex
CVS commit: src/distrib/common
Module Name:src Committed By: alnsn Date: Sat Dec 29 01:04:39 UTC 2018 Modified Files: src/distrib/common: cgdroot.rc Log Message: Break the loop after a successful mount. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/cgdroot.rc diff -u src/distrib/common/cgdroot.rc:1.2 src/distrib/common/cgdroot.rc:1.3 --- src/distrib/common/cgdroot.rc:1.2 Sat Dec 29 00:52:11 2018 +++ src/distrib/common/cgdroot.rc Sat Dec 29 01:04:38 2018 @@ -1,4 +1,4 @@ -# $NetBSD: cgdroot.rc,v 1.2 2018/12/29 00:52:11 alnsn Exp $ +# $NetBSD: cgdroot.rc,v 1.3 2018/12/29 01:04:38 alnsn Exp $ # # Copyright (c) 2013 Pierre Pronchery # All rights reserved. @@ -40,6 +40,7 @@ mounted= for dev in NAME=cgd.conf ROOT.a ; do if mount -o ro $dev /etc/cgd 2>/dev/null ; then mounted=$dev + break fi done if [ -z "$mounted" ]; then
CVS commit: src/distrib/common
Module Name:src Committed By: alnsn Date: Sat Dec 29 01:04:39 UTC 2018 Modified Files: src/distrib/common: cgdroot.rc Log Message: Break the loop after a successful mount. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/common
Module Name:src Committed By: alnsn Date: Sat Dec 29 00:52:11 UTC 2018 Modified Files: src/distrib/common: cgdroot.rc Log Message: Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/common
Module Name:src Committed By: alnsn Date: Sat Dec 29 00:52:11 UTC 2018 Modified Files: src/distrib/common: cgdroot.rc Log Message: Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/cgdroot.rc diff -u src/distrib/common/cgdroot.rc:1.1 src/distrib/common/cgdroot.rc:1.2 --- src/distrib/common/cgdroot.rc:1.1 Mon Jul 15 00:25:38 2013 +++ src/distrib/common/cgdroot.rc Sat Dec 29 00:52:11 2018 @@ -1,4 +1,4 @@ -# $NetBSD: cgdroot.rc,v 1.1 2013/07/15 00:25:38 khorben Exp $ +# $NetBSD: cgdroot.rc,v 1.2 2018/12/29 00:52:11 alnsn Exp $ # # Copyright (c) 2013 Pierre Pronchery # All rights reserved. @@ -36,8 +36,13 @@ export EDITOR umask 022 -mount -o ro /dev/wd0a /etc/cgd -if [ $? -ne 0 ]; then +mounted= +for dev in NAME=cgd.conf ROOT.a ; do + if mount -o ro $dev /etc/cgd 2>/dev/null ; then + mounted=$dev + fi +done +if [ -z "$mounted" ]; then echo "Could not mount the boot partition" 1>&2 exit 2 fi
CVS commit: src/lib/libutil
Module Name:src Committed By: alnsn Date: Fri Dec 28 18:44:11 UTC 2018 Modified Files: src/lib/libutil: getfsspecname.3 Log Message: Document "ROOT." syntax before documenting a generic . To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libutil/getfsspecname.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libutil/getfsspecname.3 diff -u src/lib/libutil/getfsspecname.3:1.6 src/lib/libutil/getfsspecname.3:1.7 --- src/lib/libutil/getfsspecname.3:1.6 Sat Oct 6 13:09:53 2018 +++ src/lib/libutil/getfsspecname.3 Fri Dec 28 18:44:11 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: getfsspecname.3,v 1.6 2018/10/06 13:09:53 jmcneill Exp $ +.\" $NetBSD: getfsspecname.3,v 1.7 2018/12/28 18:44:11 alnsn Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd October 6, 2018 +.Dd December 28, 2018 .Dt GETFSSPECNAME 3 .Os .Sh NAME @@ -58,16 +58,6 @@ up to len .Pp If the .Fa spec -argument is not of the form -.Dq NAME=wedgename , -.Fa spec -is copied -to -.Fa buf -and returned. -.Pp -If the -.Fa spec argument starts with .Dq ROOT. , a path in the form @@ -85,6 +75,18 @@ is the characters following in the .Fa spec argument. +.Pp +If the +.Fa spec +argument is not of the form +.Dq NAME=wedgename +and it doesn't start with +.Dq ROOT. , +.Fa spec +is copied +to +.Fa buf +and returned. .Sh RETURN VALUES On success the absolute pathname of the underlying wedge device is returned, or the original
CVS commit: src/lib/libutil
Module Name:src Committed By: alnsn Date: Fri Dec 28 18:44:11 UTC 2018 Modified Files: src/lib/libutil: getfsspecname.3 Log Message: Document "ROOT." syntax before documenting a generic . To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libutil/getfsspecname.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/cgdconfig
Module Name:src Committed By: alnsn Date: Fri Dec 28 18:33:54 UTC 2018 Modified Files: src/sbin/cgdconfig: cgdconfig.8 Log Message: s/Dec/December/. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sbin/cgdconfig/cgdconfig.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/cgdconfig/cgdconfig.8 diff -u src/sbin/cgdconfig/cgdconfig.8:1.42 src/sbin/cgdconfig/cgdconfig.8:1.43 --- src/sbin/cgdconfig/cgdconfig.8:1.42 Thu Dec 27 21:17:08 2018 +++ src/sbin/cgdconfig/cgdconfig.8 Fri Dec 28 18:33:54 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: cgdconfig.8,v 1.42 2018/12/27 21:17:08 alnsn Exp $ +.\" $NetBSD: cgdconfig.8,v 1.43 2018/12/28 18:33:54 alnsn Exp $ .\" .\" Copyright (c) 2002, The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd Dec 27, 2018 +.Dd December 27, 2018 .Dt CGDCONFIG 8 .Os .Sh NAME
CVS commit: src/sbin/cgdconfig
Module Name:src Committed By: alnsn Date: Fri Dec 28 18:33:54 UTC 2018 Modified Files: src/sbin/cgdconfig: cgdconfig.8 Log Message: s/Dec/December/. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sbin/cgdconfig/cgdconfig.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sbin/cgdconfig
Christoph Badura wrote: > Using /etc/cgd/ROOT. has the advantage that the cgd will configure > if the root device changes name, thus upholding POLA. > > E.g. moving disks from a controller that attaches sd(4)s to one that > attaches ld(4)s. I believe you can see that when dd'ing an image from > SDcard to MMC on Pinebook. > > It seems to me that similar behaviour for NAME=label would be more useful > too. dk(4) attachments move around in practice. Yeah, I discovered it the hard way ;-) Perhaps the simplest change would be to pass an unresolved (original) name when composing a paramsfile. E.g. /etc/cgd/NAME=mylabel /etc/cgd/ROOT.e -- Alex
CVS commit: src/lib/libutil
Module Name:src Committed By: alnsn Date: Thu Dec 27 21:35:48 UTC 2018 Modified Files: src/lib/libutil: getfsspecname.c Log Message: No need to quadruple a buffer because strunvis(3) doesn't expand. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libutil/getfsspecname.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libutil/getfsspecname.c diff -u src/lib/libutil/getfsspecname.c:1.7 src/lib/libutil/getfsspecname.c:1.8 --- src/lib/libutil/getfsspecname.c:1.7 Sat Oct 6 23:48:00 2018 +++ src/lib/libutil/getfsspecname.c Thu Dec 27 21:35:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: getfsspecname.c,v 1.7 2018/10/06 23:48:00 christos Exp $ */ +/* $NetBSD: getfsspecname.c,v 1.8 2018/12/27 21:35:48 alnsn Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: getfsspecname.c,v 1.7 2018/10/06 23:48:00 christos Exp $"); +__RCSID("$NetBSD: getfsspecname.c,v 1.8 2018/12/27 21:35:48 alnsn Exp $"); #include #include @@ -108,7 +108,7 @@ getfsspecname(char *buf, size_t bufsiz, #ifdef COMPAT_DKWEDGE search: #endif - vname = malloc(strlen(name) * 4 + 1); + vname = malloc(strlen(name) + 1); if (vname == NULL) { savee = errno; strlcpy(buf, "malloc failed", bufsiz);
CVS commit: src/lib/libutil
Module Name:src Committed By: alnsn Date: Thu Dec 27 21:35:48 UTC 2018 Modified Files: src/lib/libutil: getfsspecname.c Log Message: No need to quadruple a buffer because strunvis(3) doesn't expand. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libutil/getfsspecname.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/cgdconfig
Module Name:src Committed By: alnsn Date: Thu Dec 27 21:17:08 UTC 2018 Modified Files: src/sbin/cgdconfig: cgdconfig.8 Log Message: Document that cgd.conf supports NAME=label and ROOT. targets. XXX Default paramsfile for NAME=label is /etc/cgd/dkNN (resolved wedge partition) and /etc/cgd/ROOT. for ROOT.. This isn't yet documented. IMO, it should be the other way around: /etc/cgd/label for the former and /et/cgd/[root-device] for the latter. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sbin/cgdconfig/cgdconfig.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/cgdconfig/cgdconfig.8 diff -u src/sbin/cgdconfig/cgdconfig.8:1.41 src/sbin/cgdconfig/cgdconfig.8:1.42 --- src/sbin/cgdconfig/cgdconfig.8:1.41 Sat Sep 1 11:46:52 2018 +++ src/sbin/cgdconfig/cgdconfig.8 Thu Dec 27 21:17:08 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: cgdconfig.8,v 1.41 2018/09/01 11:46:52 prlw1 Exp $ +.\" $NetBSD: cgdconfig.8,v 1.42 2018/12/27 21:17:08 alnsn Exp $ .\" .\" Copyright (c) 2002, The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 9, 2018 +.Dd Dec 27, 2018 .Dt CGDCONFIG 8 .Os .Sh NAME @@ -248,6 +248,24 @@ A at the end of a line indicates that the next line is a continuation of the current line. .Pp +If the second field is of the form +.Dq NAME= +then all the +.Xr dk 4 +wedge partitions are searched for one that has a wedge name equal to +.Ar +and the device corresponding to it is selected. +.Pp +If the second field starts with the prefix +.Dq ROOT. +the prefix is replaced with +.Dq /dev/[root_device] , +where +.Bq root_device +is the value of the +.Dq kern.root_device +sysctl. +.Pp See .Sx EXAMPLES for an example of @@ -418,7 +436,7 @@ An example # cgd target [paramsfile] cgd0 /dev/wd0e - cgd1 /dev/sd0h /usr/local/etc/cgd/sd0h + cgd1 NAME=mycgd /usr/local/etc/cgd/mycgd .Ed .Pp Note the first entry will store the parameters file as @@ -439,6 +457,8 @@ program's execution. .Sh SEE ALSO .Xr cgd 4 , .Xr disklabel 8 , +.Xr dk 4 , +.Xr fstab 5 , .Xr gpt 8 .Pp .Dq PKCS #5 v2.0: Password-Based Cryptography Standard ,