Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (1h)  netbsd-8 (5d)  netbsd-10 (6d)  netbsd-9 (12d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 14:21:55 UTC Now

2018-11-24 23:51:05 UTC netbsd-8 commitmail json YAML

2018-11-24 23:50:36 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #1103):

usr.sbin/mtree/create.c: revision 1.76

Adjust test, we only want to return the structure member if the result
is not NULL.

Heads up by Sascha Wildner @ DragonFly BSD.

(martin)

2018-11-24 22:49:35 UTC MAIN commitmail json YAML

Provide a LWP_PC for Taylor

(skrll)

2018-11-24 22:18:58 UTC MAIN commitmail json YAML

attach GICv3 ITS where applicable

(jakllsch)

2018-11-24 22:17:12 UTC MAIN commitmail json YAML

Allow building when plcom isn't used.

(rjs)

2018-11-24 22:08:54 UTC MAIN commitmail json YAML

include dev/pci/pcivar.h, we use pci_attach_args directly

(jakllsch)

2018-11-24 20:31:29 UTC MAIN commitmail json YAML

Sort SEE ALSO. Fix date. Whitespace fixes.

(wiz)

2018-11-24 19:22:17 UTC MAIN commitmail json YAML

- instead of zeroing struct proc on each allocation, provide a pool cache
  constructor.
- instead of sprinkling memsets, zalloc the whole buffer.

(christos)

2018-11-24 18:48:08 UTC MAIN commitmail json YAML

aarch64: Add support for ARM Server Base System Architecture (SBSA).
The SBSA is a hardware system architecture for servers based on
64-bit ARM processors. The Server Base Boot Requirements (SBBR)
specification defines a UEFI + ACPI interface for OS bootstrap,
which is supported by a combination of a new UEFI bootloader
(bootaa64.efi) and the addition of ACPI support in the
GENERIC64 kernel config.

(jmcneill)

2018-11-24 18:38:59 UTC MAIN commitmail json YAML

2018-11-24 18:37:50 UTC MAIN commitmail json YAML

2018-11-24 18:37:16 UTC MAIN commitmail json YAML

Add my name in copyright list

(bouyer)

2018-11-24 18:23:29 UTC MAIN commitmail json YAML

Add mpii(4), a driver for LSI Megaraid Fusion controllers.
Ported from OpenBSD. This driver is MP-safe.
Note that the earlier fusion controllers (Megaraid 2208, codenamed Thunderbold)
are also supported by mfi(4). mpii will take precedence if both drivers
are enabled.
Tested on a
mfii0 at pci6 dev 0 function 0: "PERC H740P Adapter ", firmware 50.3.0-1512, 819
2MB cache
mfii0: interrupting at ioapic2 pin 2
scsibus0 at mfii0: 64 targets, 8 luns per target
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <DELL, PERC H740P Adp, 5.03> disk fixed
sd0: fabricating a geometry
sd0: 99 GB, 102399 cyl, 64 head, 32 sec, 512 bytes/sect x 209714688 sectors
sd0: tagged queueing
sd1 at scsibus0 target 1 lun 0: <DELL, PERC H740P Adp, 5.03> disk fixed
sd1: fabricating a geometry
sd1: 22254 GB, 22788608 cyl, 64 head, 32 sec, 512 bytes/sect x 46671069696 sectors
sd1: fabricating a geometry

It supports bioctl(8) ioctls, as well as sensors for the BBU and logical
drives.

Sponsored by LIP6.

(bouyer)

2018-11-24 18:15:23 UTC MAIN commitmail json YAML

Add more KASSERTS about locking.

(bouyer)

2018-11-24 18:14:44 UTC MAIN commitmail json YAML

5717 and newer handle TSO in a sighly different way. From FreeBSD.
While there, use different lowat/hiwat values if MTU is larger than ETHERMTU,
from FreeBSD.
Tested at LIP6 on a
bge0 at pci4 dev 0 function 0: Broadcom BCM5720 Gigabit Ethernet
bge0: APE firmware NCSI 1.4.22.0
bge0: interrupting at msi1 vec 0
bge0: HW config 002b1194, 00006014, 0002aa38, 00000000 0000000c
bge0: ASIC BCM5720 A0 (0x5720000), Ethernet address d0:94:66:8b:9c:18
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5720C 1000BASE-T media interface, rev. 0
with all ipv4 checksums and TSO4 enabled.

(bouyer)

2018-11-24 18:11:22 UTC MAIN commitmail json YAML

Move registers definitions to a separate file, needed for the upcomning mpii
driver. No functionnal change.

(bouyer)

2018-11-24 18:10:29 UTC MAIN commitmail json YAML

Add some definitions from OpenBSD, needed by the upcoming mfii driver.
No functionnal change.

(bouyer)

2018-11-24 18:09:14 UTC MAIN commitmail json YAML

rnd_add_uint32() doens't support concurent calls for the same rnd_source,
call it with dksc->sc_iolock held.

(bouyer)

2018-11-24 17:54:19 UTC MAIN commitmail json YAML

Mark as done the two entries I added just minutes ago, they are now fixed.

(maxv)

2018-11-24 17:52:39 UTC MAIN commitmail json YAML

Fix kernel pointer leaks in sysctl_dobuf. While here constify argument.

Also memset the buffer, to prevent leaks (even if there doesn't seem to
be currently).

(maxv)

2018-11-24 17:40:37 UTC MAIN commitmail json YAML

Fix kernel pointer leaks in sysctl_doevcnt.

While here also fix info leak; there is a big padding so use zalloc.

(maxv)

2018-11-24 17:31:10 UTC MAIN commitmail json YAML

Mark four issues as fixed, add two more. Netstat was actually
sysctl_unpcblist, so remove it as duplicate.

(maxv)

2018-11-24 17:26:27 UTC MAIN commitmail json YAML

Fix kernel pointer leaks in the kern.lwp sysctl.

(maxv)

2018-11-24 17:25:39 UTC netbsd-7 commitmail json YAML

2018-11-24 17:25:01 UTC netbsd-7-1 commitmail json YAML

2018-11-24 17:24:32 UTC netbsd-7-0 commitmail json YAML

2018-11-24 17:23:48 UTC netbsd-7-0 commitmail json YAML

Sync to HEAD (requested by mrg in ticket #1655):

libexec/httpd/testsuite/data/.bzremap          up to 1.1
libexec/httpd/testsuite/t12.out                up to 1.1
libexec/httpd/testsuite/t12.in                  up to 1.1
libexec/httpd/testsuite/t13.out                up to 1.1
libexec/httpd/testsuite/t13.in                  up to 1.1
libexec/httpd/testsuite/t14.out                up to 1.1
libexec/httpd/testsuite/t14.in                  up to 1.1
libexec/httpd/testsuite/t15.out                up to 1.1
libexec/httpd/testsuite/t15.in                  up to 1.1
libexec/httpd/CHANGES                          up to 1.28
libexec/httpd/Makefile                          up to 1.27
libexec/httpd/auth-bozo.c                      up to 1.22
libexec/httpd/bozohttpd.8                      up to 1.74
libexec/httpd/bozohttpd.c                      up to 1.96
libexec/httpd/bozohttpd.h                      up to 1.56
libexec/httpd/cgi-bozo.c                        up to 1.44
libexec/httpd/content-bozo.c                    up to 1.16
libexec/httpd/daemon-bozo.c                    up to 1.19
libexec/httpd/dir-index-bozo.c                  up to 1.28
libexec/httpd/lua-bozo.c                        up to 1.15
libexec/httpd/main.c                            up to 1.21
libexec/httpd/ssl-bozo.c                        up to 1.25
libexec/httpd/tilde-luzah-bozo.c                up to 1.16
libexec/httpd/libbozohttpd/Makefile            up to 1.3
libexec/httpd/lua/bozo.lua                      up to 1.3
libexec/httpd/lua/glue.c                        up to 1.5
libexec/httpd/lua/optparse.lua                  up to 1.2
libexec/httpd/testsuite/Makefile                up to 1.11
libexec/httpd/testsuite/html_cmp                up to 1.6
libexec/httpd/testsuite/t3.out                  up to 1.4
libexec/httpd/testsuite/t5.out                  up to 1.4
libexec/httpd/testsuite/t6.out                  up to 1.4
libexec/httpd/testsuite/test-bigfile            up to 1.5
libexec/httpd/testsuite/test-simple            up to 1.5

Cosmetic changes to Lua binding in bozohttpd.

- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.

fix ordering of a couple of words.  from Edgar Pettijohn in PR#52375.
thanks!

s/u_int/unsigned/.

from Jan Danielsson.  increases/fixes portability.

PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.

Document script handler issues with httpd(8).
From martin@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.

fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)

Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@

Bump date

Remove trailing whitespace.

use __func__ in debug().

fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.

avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.

note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin%netbsd.org@localhost
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
  is now bounded at 16KiB.  reported by JP.

from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
  initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.

move some #if support into bozohttpd.h.

fix previous: have_debug was reversed.

also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.

- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.

two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.

use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)

many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines

alpha sort the option switch.

add an assert() check on array bounds.

minor style fixes.  simplify bozo_match_content_map().

(martin)

2018-11-24 17:23:21 UTC netbsd-7-1 commitmail json YAML

Sync to HEAD (requested by mrg in ticket #1655):

libexec/httpd/testsuite/data/.bzremap          up to 1.1
libexec/httpd/testsuite/t12.out                up to 1.1
libexec/httpd/testsuite/t12.in                  up to 1.1
libexec/httpd/testsuite/t13.out                up to 1.1
libexec/httpd/testsuite/t13.in                  up to 1.1
libexec/httpd/testsuite/t14.out                up to 1.1
libexec/httpd/testsuite/t14.in                  up to 1.1
libexec/httpd/testsuite/t15.out                up to 1.1
libexec/httpd/testsuite/t15.in                  up to 1.1
libexec/httpd/CHANGES                          up to 1.28
libexec/httpd/Makefile                          up to 1.27
libexec/httpd/auth-bozo.c                      up to 1.22
libexec/httpd/bozohttpd.8                      up to 1.74
libexec/httpd/bozohttpd.c                      up to 1.96
libexec/httpd/bozohttpd.h                      up to 1.56
libexec/httpd/cgi-bozo.c                        up to 1.44
libexec/httpd/content-bozo.c                    up to 1.16
libexec/httpd/daemon-bozo.c                    up to 1.19
libexec/httpd/dir-index-bozo.c                  up to 1.28
libexec/httpd/lua-bozo.c                        up to 1.15
libexec/httpd/main.c                            up to 1.21
libexec/httpd/ssl-bozo.c                        up to 1.25
libexec/httpd/tilde-luzah-bozo.c                up to 1.16
libexec/httpd/libbozohttpd/Makefile            up to 1.3
libexec/httpd/lua/bozo.lua                      up to 1.3
libexec/httpd/lua/glue.c                        up to 1.5
libexec/httpd/lua/optparse.lua                  up to 1.2
libexec/httpd/testsuite/Makefile                up to 1.11
libexec/httpd/testsuite/html_cmp                up to 1.6
libexec/httpd/testsuite/t3.out                  up to 1.4
libexec/httpd/testsuite/t5.out                  up to 1.4
libexec/httpd/testsuite/t6.out                  up to 1.4
libexec/httpd/testsuite/test-bigfile            up to 1.5
libexec/httpd/testsuite/test-simple            up to 1.5

Cosmetic changes to Lua binding in bozohttpd.

- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.

fix ordering of a couple of words.  from Edgar Pettijohn in PR#52375.
thanks!

s/u_int/unsigned/.

from Jan Danielsson.  increases/fixes portability.

PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.

Document script handler issues with httpd(8).
From martin@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.

fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)

Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@

Bump date

Remove trailing whitespace.

use __func__ in debug().

fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.

avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.

note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin%netbsd.org@localhost
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
  is now bounded at 16KiB.  reported by JP.

from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
  initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.

move some #if support into bozohttpd.h.

fix previous: have_debug was reversed.

also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.

- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.

two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.

use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)

many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines

alpha sort the option switch.

add an assert() check on array bounds.

minor style fixes.  simplify bozo_match_content_map().

(martin)

2018-11-24 17:22:58 UTC netbsd-7 commitmail json YAML

Sync to HEAD (requested by mrg in ticket #1655):

libexec/httpd/testsuite/data/.bzremap          up to 1.1
libexec/httpd/testsuite/t12.out                up to 1.1
libexec/httpd/testsuite/t12.in                  up to 1.1
libexec/httpd/testsuite/t13.out                up to 1.1
libexec/httpd/testsuite/t13.in                  up to 1.1
libexec/httpd/testsuite/t14.out                up to 1.1
libexec/httpd/testsuite/t14.in                  up to 1.1
libexec/httpd/testsuite/t15.out                up to 1.1
libexec/httpd/testsuite/t15.in                  up to 1.1
libexec/httpd/CHANGES                          up to 1.28
libexec/httpd/Makefile                          up to 1.27
libexec/httpd/auth-bozo.c                      up to 1.22
libexec/httpd/bozohttpd.8                      up to 1.74
libexec/httpd/bozohttpd.c                      up to 1.96
libexec/httpd/bozohttpd.h                      up to 1.56
libexec/httpd/cgi-bozo.c                        up to 1.44
libexec/httpd/content-bozo.c                    up to 1.16
libexec/httpd/daemon-bozo.c                    up to 1.19
libexec/httpd/dir-index-bozo.c                  up to 1.28
libexec/httpd/lua-bozo.c                        up to 1.15
libexec/httpd/main.c                            up to 1.21
libexec/httpd/ssl-bozo.c                        up to 1.25
libexec/httpd/tilde-luzah-bozo.c                up to 1.16
libexec/httpd/libbozohttpd/Makefile            up to 1.3
libexec/httpd/lua/bozo.lua                      up to 1.3
libexec/httpd/lua/glue.c                        up to 1.5
libexec/httpd/lua/optparse.lua                  up to 1.2
libexec/httpd/testsuite/Makefile                up to 1.11
libexec/httpd/testsuite/html_cmp                up to 1.6
libexec/httpd/testsuite/t3.out                  up to 1.4
libexec/httpd/testsuite/t5.out                  up to 1.4
libexec/httpd/testsuite/t6.out                  up to 1.4
libexec/httpd/testsuite/test-bigfile            up to 1.5
libexec/httpd/testsuite/test-simple            up to 1.5

Cosmetic changes to Lua binding in bozohttpd.

- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.

fix ordering of a couple of words.  from Edgar Pettijohn in PR#52375.
thanks!

s/u_int/unsigned/.

from Jan Danielsson.  increases/fixes portability.

PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.

Document script handler issues with httpd(8).
From martin@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.

fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)

Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@

Bump date

Remove trailing whitespace.

use __func__ in debug().

fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.

avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.

note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin%netbsd.org@localhost
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
  is now bounded at 16KiB.  reported by JP.

from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
  initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.

move some #if support into bozohttpd.h.

fix previous: have_debug was reversed.

also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.

- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.

two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.

use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)

many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines

alpha sort the option switch.

add an assert() check on array bounds.

minor style fixes.  simplify bozo_match_content_map().

(martin)

2018-11-24 17:16:44 UTC MAIN commitmail json YAML

Fix kernel pointer leaks in sysctl_unpcblist.

(maxv)

2018-11-24 17:13:51 UTC netbsd-8 commitmail json YAML

Sync to HEAD (requested by mrg in ticket #1104)

libexec/httpd/testsuite/data/.bzremap          up to 1.1
libexec/httpd/testsuite/t12.out                up to 1.1
libexec/httpd/testsuite/t12.in                  up to 1.1
libexec/httpd/testsuite/t13.out                up to 1.1
libexec/httpd/testsuite/t13.in                  up to 1.1
libexec/httpd/testsuite/t14.out                up to 1.1
libexec/httpd/testsuite/t14.in                  up to 1.1
libexec/httpd/testsuite/t15.out                up to 1.1
libexec/httpd/testsuite/t15.in                  up to 1.1
libexec/httpd/CHANGES                          up to 1.28
libexec/httpd/auth-bozo.c                      up to 1.22
libexec/httpd/bozohttpd.8                      up to 1.74
libexec/httpd/bozohttpd.c                      up to 1.96
libexec/httpd/bozohttpd.h                      up to 1.56
libexec/httpd/cgi-bozo.c                        up to 1.44
libexec/httpd/content-bozo.c                    up to 1.16
libexec/httpd/daemon-bozo.c                    up to 1.19
libexec/httpd/dir-index-bozo.c                  up to 1.28
libexec/httpd/main.c                            up to 1.21
libexec/httpd/ssl-bozo.c                        up to 1.25
libexec/httpd/tilde-luzah-bozo.c                up to 1.16
libexec/httpd/lua/bozo.lua                      up to 1.3
libexec/httpd/lua/glue.c                        up to 1.5
libexec/httpd/lua/optparse.lua                  up to 1.2
libexec/httpd/testsuite/Makefile                up to 1.11
libexec/httpd/testsuite/html_cmp                up to 1.6
libexec/httpd/testsuite/t3.out                  up to 1.4
libexec/httpd/testsuite/t5.out                  up to 1.4
libexec/httpd/testsuite/t6.out                  up to 1.4
libexec/httpd/testsuite/test-bigfile            up to 1.5
libexec/httpd/testsuite/test-simple            up to 1.5

Cosmetic changes to Lua binding in bozohttpd.

- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.

fix ordering of a couple of words.  from Edgar Pettijohn in PR#52375.
thanks!

s/u_int/unsigned/.

from Jan Danielsson.  increases/fixes portability.

PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.

Document script handler issues with httpd(8).
From martin@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.

fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)

Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@

Bump date

Remove trailing whitespace.

use __func__ in debug().

fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.

avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.

note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin%netbsd.org@localhost
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
  is now bounded at 16KiB.  reported by JP.

from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
  initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.

move some #if support into bozohttpd.h.

fix previous: have_debug was reversed.

also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.

- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.

two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.

use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)

many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines

alpha sort the option switch.

add an assert() check on array bounds.

minor style fixes.  simplify bozo_match_content_map().

(martin)

2018-11-24 17:05:54 UTC MAIN commitmail json YAML

KNF, no functional change.

(maxv)

2018-11-24 16:59:11 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #1654):

usr.sbin/mtree/create.c: revision 1.76

Adjust test, we only want to return the structure member if the result
is not NULL.

Heads up by Sascha Wildner @ DragonFly BSD.
Adjust test, we only want to return the structure member if the result
is not NULL.

(martin)

2018-11-24 16:58:40 UTC MAIN commitmail json YAML

Fix kernel pointer leaks in sysctl_inpcblist.

(maxv)

2018-11-24 16:41:48 UTC MAIN commitmail json YAML

Fix kernel pointer leaks in the kern.file sysctl, same as kern.file2.

(maxv)

2018-11-24 16:25:20 UTC MAIN commitmail json YAML

Rename fill_file -> fill_file2, since that's the KERN_FILE2 sysctl.

(maxv)

2018-11-24 16:18:36 UTC MAIN commitmail json YAML

Fix kernel info leak, we do a blunt copy of struct proc, but it has
padding. So zero out the structure on each allocation. And copy field by
field while here, because many fields should be hidden by COND_SET_VALUE.

(maxv)

2018-11-24 15:44:13 UTC MAIN commitmail json YAML

Add some ThunderX CPU Ids

(skrll)

2018-11-24 15:40:57 UTC MAIN commitmail json YAML

2018-11-24 15:35:45 UTC MAIN commitmail json YAML

Handle Cavium AHCI/RAID controller BAR weirdness.

Support 64bit BARs as well.

(skrll)

2018-11-24 14:50:04 UTC MAIN commitmail json YAML

Fixup the retry loop wrt with XHCI_DISABLE_MSI{,X}

(skrll)

2018-11-24 14:43:55 UTC MAIN commitmail json YAML

2018-11-24 14:41:56 UTC MAIN commitmail json YAML

Add Rockchip vendor ID and a device. Requested by jak@

From OpenBSD

(skrll)

2018-11-24 14:37:48 UTC MAIN commitmail json YAML

Add a whole bunch of Cavium ThunderX devices

(skrll)

2018-11-24 13:10:21 UTC MAIN commitmail json YAML

2018-11-24 13:08:11 UTC MAIN commitmail json YAML

- add FALLTHROUGH comment
- one return is usually enough.

(christos)

2018-11-24 13:03:15 UTC MAIN commitmail json YAML

2018-11-24 13:02:46 UTC MAIN commitmail json YAML

one semicolon is usually enough.

(christos)

2018-11-24 12:17:35 UTC MAIN commitmail json YAML

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.

(christos)

2018-11-24 11:27:37 UTC MAIN commitmail json YAML

Support device nodes that have no entry in /dev, identify them by major:minor
numbers like the original Linux code.

While here, fix a memory leak.

(mlelstv)

2018-11-24 11:04:39 UTC MAIN commitmail json YAML

Grammar improvements.

(wiz)

2018-11-24 02:35:13 UTC MAIN commitmail json YAML

call this bozohttpd 20181124.

(mrg)

2018-11-24 02:30:56 UTC MAIN commitmail json YAML

fix a bug in the rework for -i option:  move the real code in place.

for some reason gcc does not warn about this:

  case 'x':
    stuff_here();
    break;

    other_stuff_here();
    break;

and the other_stuff_here() was what was mis-placed.

should fix atf failures in networking.

(mrg)

2018-11-24 01:04:18 UTC MAIN commitmail json YAML

attron(), attroff() - don't take a shortcut.

(uwe)

2018-11-24 00:47:52 UTC MAIN commitmail json YAML

s/time/val/ to avoid shadowing a global indentifier.

(mrg)

2018-11-23 23:41:20 UTC MAIN commitmail json YAML

Fix the <> redirection operator, which has been broken since it was
first implemented in response to PR bin/4966  (PR Feb 1998, fix Feb 1999).

The file named should not be truncated.

No other shell truncates the file (<> was added to FreeBSD sh in Oct 2000,
and did not include O_TRUNC) and POSIX certainly does not suggest that
should happen (just that the file is to be created if it does not exist.)

Bug pointed out in off-list e-mail by Martijn Dekker

(kre)

2018-11-23 23:37:22 UTC MAIN commitmail json YAML

Handle eval $'continue\ncommand' (and similar) in a loop correctly ...
"command" should not be executed.  (The issue affects multi-line
eval strings only - ie: commands after the next \n are not skipped).

Bug noted by Martijn Dekker in off-list e-mail.

Fix from FreeBSD:
src/bin/sh/eval.c: Revision 272983 Sun Oct 12 13:12:06 2014 UTC by jilles

(kre)

2018-11-23 20:40:06 UTC MAIN commitmail json YAML

Avoid long option names that differ only in character case.
Change Xtrace (the name) to xlock instead.  Aside from the different
name, there is no change to functionality.

(kre)

2018-11-23 18:08:11 UTC MAIN commitmail json YAML

Use MSIX when available

(jmcneill)

2018-11-23 16:01:27 UTC MAIN commitmail json YAML

Only allocate what we need for ITT tables

(jmcneill)

2018-11-23 14:08:40 UTC MAIN commitmail json YAML

Use acpi_intr_establish

(jmcneill)

2018-11-23 12:39:19 UTC MAIN commitmail json YAML

Update comments to help explain what's going on

(skrll)

2018-11-23 12:15:14 UTC MAIN commitmail json YAML

2018-11-23 11:49:04 UTC MAIN commitmail json YAML

Fix LPI pending table size, use correct LPI conf offset in gicv3_lpi_block_irqs, and set bit[7]=1 for G1NS interrupts when writing to the LPI configuration table.

(jmcneill)

2018-11-23 11:48:12 UTC MAIN commitmail json YAML

Fix ITT size, only need to MAPD once per device.

(jmcneill)

2018-11-23 11:38:07 UTC MAIN commitmail json YAML

Fix so the setcontext call is via the PLT and libpthread can override

(skrll)

2018-11-23 11:26:05 UTC MAIN commitmail json YAML

2018-11-23 11:16:59 UTC MAIN commitmail json YAML

wattr_set - turn off all wide attributes (fix unedited copy/paste).

(uwe)

2018-11-23 11:15:14 UTC MAIN commitmail json YAML

Rename the reserved argument from "opt" to "opts" to match SUS text.

(uwe)

2018-11-23 11:11:59 UTC MAIN commitmail json YAML

Refactor.  Move code to turn attributes on/off into separate
functions.  Express both old and new functions to manipulate
attributes using those functions.  Check that the the new API's opts
argument (reserved by the standard for future use) is NULL and error
out if not (like getcchar/setcchar).  No functional change intended.

(uwe)

2018-11-23 10:59:20 UTC MAIN commitmail json YAML

2018-11-23 08:11:20 UTC MAIN commitmail json YAML

2018-11-23 06:31:57 UTC MAIN commitmail json YAML

When merging entries with the keyboard map, print only the resulting changes.

While here, replace bcopy with standad memcpy.

(mlelstv)

2018-11-22 23:37:31 UTC MAIN commitmail json YAML

Drop a few redundant casts of a variable to its own type.

(uwe)

2018-11-22 23:29:09 UTC MAIN commitmail json YAML

Move getattrs() and wcolor_set() so that they are with their peers and
so that wide and non-wide functions are in the same order.  While here,
make __wcolor_set() static.  No functional change intended.

(uwe)

2018-11-22 22:16:45 UTC MAIN commitmail json YAML

Drop HAVE_WCHAR ifdefs from code that is not even compiled with !HAVE_WCHAR.

We still try to mainain the ability to build our curses with
!HAVE_WCHAR, but it doesn't make sense to provide stubs for new wide
API functions that just error out when !HAVE_WCHAR.  Any code that
only uses old API (and can work with !HAVE_WCHAR curses) doesn't use
those new functions.  The code that uses new API obviosly cannot work
when all the new API is stubbed out.

So the plan is to drop the stubs.  This commit does that for files
that are not even compiled with !HAVE_WCHAR (not only those stubs are
useless, they were not even there to begin with).

Same object code is generated for the normal HAVE_WCHAR case.  Nothing
is even recompiled for !HAVE_WCHAR.

Ok by blymn@ jdc@ roy@

(uwe)

2018-11-22 22:00:49 UTC MAIN commitmail json YAML

We need insstr.c for !HAVE_WCHAR too.

(uwe)

2018-11-22 21:28:21 UTC MAIN commitmail json YAML

2018-11-22 21:11:37 UTC MAIN commitmail json YAML

Make armv7.img boot on the DE0 Nano SoC. Requires u-boot from -current pkgsrc.

(aymeric)

2018-11-22 21:08:19 UTC MAIN commitmail json YAML

2018-11-22 20:47:38 UTC MAIN commitmail json YAML

use correct interrupt index

fixes intrctl list

from jmcneill@

(jakllsch)

2018-11-22 20:38:59 UTC MAIN commitmail json YAML

2018-11-22 18:42:06 UTC MAIN commitmail json YAML

add an assert() check on array bounds.

(mrg)

2018-11-22 18:21:59 UTC MAIN commitmail json YAML

alpha sort the option switch.

(mrg)

2018-11-22 15:09:46 UTC MAIN commitmail json YAML

- Add wm_k1_workaround_lv() from FreeBSD. It's PCH2 specifc:
    Workaround to set the K1 beacon duration for 82579 parts in 10Mbps.
    Disable K1 for 1000 and 100 speeds.
- Make wm_link_stall_workaround_hv() and move an 82578 specific code into it.
  Don't apply the workaround if BMCR_LOOP bit is set. Same as FreeBSD.
- Add comment. Modify comment.

(msaitoh)

2018-11-22 15:06:00 UTC MAIN commitmail json YAML

Apply MADT interrupt source overrides to interrupts established via
acpi_md_intr_establish.

(jmcneill)

2018-11-22 13:47:37 UTC MAIN commitmail json YAML

build fix until someone is brave enough to remove this kernel

(skrll)

2018-11-22 08:54:08 UTC MAIN commitmail json YAML

many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines

(mrg)

2018-11-22 08:30:58 UTC MAIN commitmail json YAML

fix condition code. x1==0 is parent.

(ryo)

2018-11-22 07:37:12 UTC MAIN commitmail json YAML

Add missing pmap_update after pmap_kenter_pa, noted by Kamil.

(maxv)

2018-11-22 06:15:06 UTC MAIN commitmail json YAML

Decode Intel/AMD MONITOR/MWAIT leaf.

(msaitoh)

2018-11-22 06:14:35 UTC MAIN commitmail json YAML

Add Intel/AMD MONITOR/MWAIT leaf.

(msaitoh)

2018-11-22 04:51:41 UTC MAIN commitmail json YAML

Add ATF for IPv6 NAT-T.

We use IPv6 NAT-T to avoid IPsec slowing down caused by dropping ESP packets
by some Customer Premises Equipments (CPE). I implement ATF to test such
situation.

I think it can also work with nat66, but I have not tested to the fine details.

(knakahara)

2018-11-22 04:48:34 UTC MAIN commitmail json YAML

2018-11-21 22:42:27 UTC MAIN commitmail json YAML

Try to provide the typesetting help requested.

(uwe)

2018-11-21 21:24:42 UTC MAIN commitmail json YAML

_REG_LR should be _lwp_exit

(skrll)

2018-11-21 21:04:15 UTC MAIN commitmail json YAML

Fix some register names in comments

(skrll)

2018-11-21 21:01:41 UTC MAIN commitmail json YAML

2018-11-21 20:36:41 UTC MAIN commitmail json YAML

- RISC OS hands us the graphics hardware in BGR mode when running 32bit colour
  pass that info on to genfb/gffb so X can show colours correctly
- set genfb properties on gffb as well

(macallan)

2018-11-21 20:18:12 UTC MAIN commitmail json YAML

A few hints that sets may come in .tar.xz format (instead of .tgz)

(martin)

2018-11-21 20:13:09 UTC MAIN commitmail json YAML

Sprinkle a few references to .tar.xz files (as alternative to .tgz files)

(martin)

2018-11-21 20:04:48 UTC MAIN commitmail json YAML

Add (optional) support for expanded static menu texts - that is: whatever
the application programmer defines as expansion, e.g. to implement
parameter substitution.
While here add rudimentary documentation of the dynamic messages
feature (so at least the parser and the syntax documented here
are in sync).
The man page could use some typesetting help...

(martin)

2018-11-21 19:03:18 UTC MAIN commitmail json YAML

further de-cargocult the new mmap() methods

(macallan)

2018-11-21 17:54:43 UTC MAIN commitmail json YAML

don't bother reading ofw properties for platinumfb

(scole)

2018-11-21 17:39:19 UTC MAIN commitmail json YAML

use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)

(mrg)

2018-11-21 14:13:47 UTC netbsd-7-0 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1652):

sys/compat/netbsd32/netbsd32_socket.c: revision 1.48 (via patch)

Fix inverted logic, which leads to buffer overflow. Detected by kASan.

(martin)

2018-11-21 12:34:21 UTC MAIN commitmail json YAML

revert PMAP_DIRECT until tested; requested by mrg@

(jdolecek)

2018-11-21 12:19:52 UTC MAIN commitmail json YAML

Decode package, core and SMT id if CPUID 0x0b is available on Intel processor.
If the value is different from the kernel value, we should fix the kernel code.

TODO: Use 0x1f if it's available.

(msaitoh)

2018-11-21 12:18:53 UTC MAIN commitmail json YAML

Add Intel CPUID Extended Topology Enumeration Fn0000000b definitions.

(msaitoh)

2018-11-21 12:15:40 UTC netbsd-7-0 commitmail json YAML

2018-11-21 12:14:30 UTC netbsd-7-0 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1653):

sys/kern/kern_event.c: revision 1.104

Fix kernel info leak. There are 4 bytes of padding in struct kevent.
[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

(martin)

2018-11-21 12:13:46 UTC netbsd-7-1 commitmail json YAML

2018-11-21 12:13:08 UTC netbsd-7-1 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1653):

sys/kern/kern_event.c: revision 1.104

Fix kernel info leak. There are 4 bytes of padding in struct kevent.
[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

(martin)

2018-11-21 12:12:44 UTC netbsd-7 commitmail json YAML

2018-11-21 12:12:15 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1653):

sys/kern/kern_event.c: revision 1.104

Fix kernel info leak. There are 4 bytes of padding in struct kevent.
[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

(martin)

2018-11-21 12:09:54 UTC netbsd-7-1 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1652):

sys/compat/netbsd32/netbsd32_socket.c: revision 1.48 (via patch)

Fix inverted logic, which leads to buffer overflow. Detected by kASan.

(martin)

2018-11-21 12:09:03 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1652):

sys/compat/netbsd32/netbsd32_socket.c: revision 1.48 (via patch)

Fix inverted logic, which leads to buffer overflow. Detected by kASan.

(martin)

2018-11-21 12:06:14 UTC netbsd-8 commitmail json YAML

2018-11-21 12:05:10 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1102):

sys/kern/kern_event.c: revision 1.104

Fix kernel info leak. There are 4 bytes of padding in struct kevent.
[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

(martin)

2018-11-21 12:01:11 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1101):

sys/net/rtsock.c: revision 1.244

Fix kernel info leak. There are 2 bytes of padding in struct if_msghdr.
[  944.607323] kleak: Possible leak in copyout: [len=176, leaked=2]
[  944.617335] #0 0xffffffff80b7c44a in kleak_note <netbsd>
[  944.627332] #1 0xffffffff80b7c4ca in kleak_copyout <netbsd>
[  944.627332] #2 0xffffffff80c91698 in sysctl_iflist_if <netbsd>
[  944.637336] #3 0xffffffff80c91d3c in sysctl_iflist <netbsd>
[  944.647343] #4 0xffffffff80c93855 in sysctl_rtable <netbsd>
[  944.647343] #5 0xffffffff80b5b328 in sysctl_dispatch <netbsd>
[  944.657346] #6 0xffffffff80b5b62e in sys___sysctl <netbsd>
[  944.667354] #7 0xffffffff8025ab3c in sy_call <netbsd>
[  944.667354] #8 0xffffffff8025ad6e in sy_invoke <netbsd>
[  944.677365] #9 0xffffffff8025adf4 in syscall <netbsd>

(martin)

2018-11-21 11:58:32 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1100):

sys/kern/kern_exec.c: revision 1.462

Fix stack info leak. There are 2x4 bytes of padding in struct ps_strings.
[  223.896199] kleak: Possible leak in copyout: [len=32, leaked=8]
[  223.906430] #0 0xffffffff80224d0a in kleak_note <netbsd>
[  223.906430] #1 0xffffffff80224d8a in kleak_copyout <netbsd>
[  223.918363] #2 0xffffffff80b1e26c in copyoutpsstrs <netbsd>
[  223.926560] #3 0xffffffff80b1e331 in copyoutargs <netbsd>
[  223.936216] #4 0xffffffff80b21768 in execve_runproc <netbsd>
[  223.946225] #5 0xffffffff80b21cc9 in execve1 <netbsd>
[  223.946225] #6 0xffffffff8025a89c in sy_call <netbsd>
[  223.956225] #7 0xffffffff8025aace in sy_invoke <netbsd>
[  223.966232] #8 0xffffffff8025ab54 in syscall <netbsd>

(martin)

2018-11-21 11:44:26 UTC MAIN commitmail json YAML

kcpuset_ffs returns the cpu number plus one, so make sure to subtract it

(jmcneill)

2018-11-21 10:34:53 UTC MAIN commitmail json YAML

- AMD also reports CPUID 7's highest subleaf. Print it.
- Use macro.

(msaitoh)

2018-11-21 10:25:17 UTC MAIN commitmail json YAML

two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.

(mrg)

2018-11-21 09:49:39 UTC MAIN commitmail json YAML

EINVAL (22) is a valid return value for ARM mmap routines; we need to
return -1 for invalid mmap attempts.

(thorpej)

2018-11-21 09:37:02 UTC MAIN commitmail json YAML

- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.

(mrg)

2018-11-21 08:55:05 UTC MAIN commitmail json YAML

2018-11-21 08:49:58 UTC MAIN commitmail json YAML

2018-11-21 08:48:23 UTC MAIN commitmail json YAML

2018-11-21 08:37:06 UTC MAIN commitmail json YAML

options<space><tab>

(skrll)

2018-11-21 06:10:25 UTC MAIN commitmail json YAML

- Use ci_feat_val[7] as CPUID 7 %edx to match x86/cpu.h
- AMD also has CPUID 6.
- Remove unused code for coretemp.
- Consistently use descs[] instead of data[].

(msaitoh)

2018-11-21 06:09:49 UTC MAIN commitmail json YAML

Modify comment. No functional change:
- AMD also has CPUID 0x06 and 0x0d.
- PCOMMIT was obsoleted.

(msaitoh)

2018-11-20 22:02:31 UTC MAIN commitmail json YAML

Compare pointers to NULL, not to zero.

(uwe)

2018-11-20 21:42:52 UTC MAIN commitmail json YAML

Drop bogus cast.

(uwe)

2018-11-20 21:41:31 UTC MAIN commitmail json YAML

Don't hide assignments inside tests.

(uwe)

2018-11-20 20:53:50 UTC MAIN commitmail json YAML

Implement PMAP_DIRECT / pmap_direct_process() in support of experimental
UBC optimizations (compile-tested only for now)

PR kern/53124

(jdolecek)

2018-11-20 20:36:24 UTC MAIN commitmail json YAML

add IA64_DCR_DEFAULT, more changes from FreeBSD

(scole)

2018-11-20 20:07:20 UTC MAIN commitmail json YAML

need to use PGO_NOBLOCKALLOC also in ubc_alloc_direct() case, same
as non-direct code - otherwise the code tries to acquire the wapbl
lock again in genfs_getpages(), and panic due to locking against itself

towards PR kern/53124

(jdolecek)

2018-11-20 19:19:21 UTC MAIN commitmail json YAML

s/failing/failed/ for the aprint_error()

(jdolecek)

2018-11-20 19:05:25 UTC MAIN commitmail json YAML

Fix locking for readdir code (Brett Lymn)

(christos)

2018-11-20 19:02:07 UTC MAIN commitmail json YAML

Convert all static menu struct initializiations to C99 name initializer
format - prerequisite for an upcoming evil hack (tm).
No functional change intended.

(martin)

2018-11-20 17:48:19 UTC MAIN commitmail json YAML

Fix color pair handling.  color_pair argument is a pair number.

(uwe)

2018-11-20 16:06:49 UTC netbsd-8 commitmail json YAML

2018-11-20 16:05:38 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by manu in ticket #1099):

sys/dev/usb/usb_quirks.c: revision 1.90
sys/dev/usb/usbdi.c: revision 1.179
sys/dev/usb/usb_quirks.h: revision 1.29
sys/dev/usb/usbdi.c: revision 1.180

Workaround NBP PN533 USB toggle bit bugs

The PN533 is known to mishandle the USB toggle bit, causing replies to
be filtered out by the host controller. As a result, the kernel sees
a timed out operation.

Vendor errata suggests that userland applications should detect the
situation on read timeout, and write a dumy frame to resync the toggle bit.
NFC Tools's libnfc does just that, but in order to succeed, the dummy
frame write must not be reported as timed out.

We therefore introduce a new USB quirk for devices known to miss output
acks. When that occur, we pretend that the operation succeeded, leaving
userland the duty to check that everything went okay.

This workaround lets libnfc recover from interrupted communications
without the need te reboot the system.

-

Build fix
From David H. Gutteridge

(martin)

2018-11-20 16:02:50 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by hannken in ticket #1098):

external/bsd/nsd/dist/server.c: revision 1.2

Fix NSD when built with --enable-recvmmsg:

When resetting a query with query_reset(queries[i], ...) always restore the
corresponding msgs[i].msg_hdr.msg_namelen from queries[i]->addrlen.

After receiving a message set queries[i]->addrlen to the received msg_namelen.

Reported upstream, will be fixed for 4.1.26

(martin)

2018-11-20 15:16:43 UTC MAIN commitmail json YAML

2018-11-20 12:23:02 UTC MAIN commitmail json YAML

Add support for MSI/MSI-X to ahcisata at pci.

The options AHCISATA_DISABLE_MSI and AHCISATA_DISABLE_MSIX are available
if required.

(skrll)

2018-11-20 10:03:39 UTC MAIN commitmail json YAML

Fix NSD when built with --enable-recvmmsg:

When resetting a query with query_reset(queries[i], ...) always restore the
corresponding msgs[i].msg_hdr.msg_namelen from queries[i]->addrlen.

After receiving a message set queries[i]->addrlen to the received msg_namelen.

Reported upstream, will be fixed for 4.1.26

(hannken)

2018-11-20 08:47:55 UTC MAIN commitmail json YAML

also set WDCTL_4BIT for the softreset, seems this one is actually also
required to fully resolve the problem

PR kern/48214 PR kern/53307 PR kern/53524

(jdolecek)

2018-11-20 07:30:18 UTC MAIN commitmail json YAML

Don't expose a getauxval symbol.

The code already knows how to handle it, but it assumes anyone who uses
GCC or clang might resolve the getauxval function to something eventually.

The only time we will expose getauxval is if a package tries to substitute
getauxval too, and then code will start having mysterious failures.

getauxval is purely a linux function (as far as I can see), so limit it to
that.

PR pkg/53387, PR port-arm/53386

(maya)

2018-11-20 06:43:26 UTC MAIN commitmail json YAML

Note support for Intel Silvermont/Airmont.

(maxv)

2018-11-20 04:04:42 UTC MAIN commitmail json YAML

- Add wm_oem_bits_config_ich8lan() to control LPLU and GbE setting base on
  the NVM's info.
- Modify wm_enable_wakeup() to reduce difference against FreeBSD and Linux.
  This modification affects to ICH8 and newer devices. I217 Rapid Start
  Technology support have not written yet (it's TODO).

(msaitoh)

2018-11-20 03:52:03 UTC MAIN commitmail json YAML

- Fix a bug that i82578 PHY can't detect correctly.
- Print PHY OUI and model number if a PHY's can't be identified.

XXX pullup-[78]

(msaitoh)

2018-11-20 01:59:51 UTC MAIN commitmail json YAML

rewrite the CPU identification on arm64:

- publish per-cpu data
- publish a whole bunch of info in struct aarch64_sysctl_cpu_id
  instead of various individual nodes (there are 16 total.)
- add MIDR extractor bits
- define ARMv8.2-A id_aa64mmfr2_el1 and id_aa64zfr0_el1 regs,
  but avoid using them until we make sure they exist.  (these
  members are added to aarch64_sysctl_cpu_id to avoid future
  compat issues.)

the arm32 and aarch32 version of these need to be adjusted as
well (and aarch32 data published at all.)  still trying to
work out how to make the same userland binary running on a
real arm32 or an aarch32 system can work sanely here.

ok ryo@.

(mrg)

2018-11-20 01:23:06 UTC MAIN commitmail json YAML

also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.

(mrg)

2018-11-20 01:19:52 UTC MAIN commitmail json YAML

fix previous: have_debug was reversed.

(mrg)

2018-11-20 01:15:50 UTC MAIN commitmail json YAML

move some #if support into bozohttpd.h.

(mrg)

2018-11-20 01:06:47 UTC MAIN commitmail json YAML

from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
  initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.

(mrg)

2018-11-19 22:21:33 UTC MAIN commitmail json YAML

enable XSAVE (and hence AVX) under XEN by default, fixes PR kern/50332

okayed by maxv@

(jdolecek)

2018-11-19 22:05:23 UTC MAIN commitmail json YAML

during SRST (softreset), make a short delay between the RST set and
clear; SATA specifies minimum 5 usec for the toggle period, and
some controllers (seems usually on AMD motherboards) actually require it

this fixes the 'clearing WDCTL_RST failed' error in PR kern/53307
and PR kern/53524

confirmed working on a ASUS Prime A320M-K mainboard by me, and by Patrick
Welche on another Ryzen system

XXX pullup-8

(jdolecek)

2018-11-19 21:52:24 UTC MAIN commitmail json YAML

if softreset during PMP detection fails, disable PMP, reset port and continue
with sig detected after the initial COMRESET

this does not yet fix the infamous 'clearing WDCTL_RST failed', but at least
now the disk is detected and usable when it happens

tested on AMD system with ASUS Prime A320M-K, similar to one from PR kern/53524

(jdolecek)

2018-11-19 21:45:37 UTC MAIN commitmail json YAML

Fix error handling of realloc, and use memmove because the areas overlap;
noted by agc@. These _nvmm_area_add/delete functions don't make a lot of
sense right now and will likely be rewritten to match the behavior
expected by Qemu; but still fix for the time being.

Also fix a collision check while here.

(maxv)

2018-11-19 20:44:52 UTC MAIN commitmail json YAML

2018-11-19 20:37:04 UTC MAIN commitmail json YAML

wbkgd - when updating window rendition for the new background character,
it's the old background characters that need to be updated, not spaces.

While here, simplify and also fix the bug introduced in 1.20 (that
lost the default color) - actually use the results of wbkgdset().

(uwe)

2018-11-19 20:28:01 UTC MAIN commitmail json YAML

2018-11-19 20:05:37 UTC MAIN commitmail json YAML

Make building boot images work with xz sets on non-NetBSD hosts.

NetBSD gzip is not toolified so we can't assume the host gzip will be able
to decompress xz files. Use the toolified xz instead in the USE_XZ_SETS case.

(aymeric)

2018-11-19 20:00:28 UTC MAIN commitmail json YAML

Prepend ${_TOOL_PREFIX} to xz, too.

(aymeric)

2018-11-19 19:52:08 UTC MAIN commitmail json YAML

consistently use the SATA correct 'port %d' instead of 'channel', some
whitespace fixes

(jdolecek)

2018-11-19 19:10:39 UTC MAIN commitmail json YAML

2018-11-19 18:29:59 UTC MAIN commitmail json YAML

"What You See Is All You Get" - Brian Kernighan

(sevan)

2018-11-19 17:35:12 UTC MAIN commitmail json YAML

Rename one constant, for clarity.

(maxv)

2018-11-19 17:17:43 UTC MAIN commitmail json YAML

Split positional argument string expansion from msg display, we can make
good use of it elsewhere too.

(martin)

2018-11-19 15:43:32 UTC MAIN commitmail json YAML

Fix editing screwup in previous...  noted by Rin Okuyama (thanks!)

(kre)

2018-11-19 13:54:15 UTC MAIN commitmail json YAML

avoid NULL deref in gicv3_fdt_disestablish()

(jakllsch)

2018-11-19 13:28:48 UTC MAIN commitmail json YAML

Remove RPI64 in favour of GENERIC64.  RPI64 was used during testing.

(skrll)

2018-11-19 11:08:16 UTC MAIN commitmail json YAML

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.

(jmcneill)

2018-11-19 10:48:59 UTC MAIN commitmail json YAML

2018-11-19 10:45:48 UTC MAIN commitmail json YAML

On second thought, get rid of "bs_base" from struct bus_space and use a
custom bs_map for acpipchb instead.

(jmcneill)

2018-11-19 10:14:40 UTC MAIN commitmail json YAML

include less headers, just the right one, suggested by thorpej

(maya)

2018-11-19 10:05:09 UTC MAIN commitmail json YAML

Hide differences between i386 and amd64 interrupt frames so XEN does
not need to know there is one.  Hopefully unbreak i386 build.

(kre)

2018-11-19 09:23:05 UTC MAIN commitmail json YAML

include sys/param.h for EINVAL used in this header.

(Make it more standalone)

(maya)

2018-11-19 08:14:28 UTC MAIN commitmail json YAML

It is not an error if we did not find any IPv4 interfaces. It could
be the case we never have V4 interfaces (in a V6 system) so this
is bogus. The code was recently changed to ignore loopback interfaces.
If mdnsd was started too early, this means that no interfaces would
be found (since interfaces down, with no addresses, or tentative
are ignored). I put back the loopback interfaces yesterday to avoid
this error, but this seems like the left hand not knowing what the
right hand does because whoever removed the loopback interfaces
from the list, did not read the 'self discovery' comment and the
special code that deals with loopback in this file. Nevertheless,
I think it is better to ignore the loopback interfaces in the long
run, but it is ok to keep them around since the code is handling
them just fine (and works both with and without them).

(christos)

2018-11-19 06:38:58 UTC MAIN commitmail json YAML

- Control TX/RX descriptor snooping control bits on ICH8 and newer.
  Only on ICH8, No-snoop bits are opposite polarity. On my Thinkpas X61,
  the default value of this bits are all zero, so this commit changes
  the snoop function enable on the machine. I tested with some other
  PCH machines and those bits are all zero (enable snoop by default),
  so this commit won't affect to some machines.
- Disable relax ordering on 82546GB(Device ID 0x1099 and 0x10b5) or >= ICH8.
  Same as other OSes.

(msaitoh)

2018-11-19 04:54:37 UTC MAIN commitmail json YAML

Use Cm instead of Li or Ar for fixed command strings

(ozaki-r)

2018-11-19 04:15:00 UTC MAIN commitmail json YAML

note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin@netbsd.org
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
  is now bounded at 16KiB.  reported by JP.

(mrg)

2018-11-19 04:13:09 UTC MAIN commitmail json YAML

avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.

(mrg)

2018-11-19 04:12:22 UTC MAIN commitmail json YAML

2018-11-19 01:08:22 UTC MAIN commitmail json YAML

Provide basic documentation on getcchar(3) and setcchar(3).

Looks like we don't have any of wide curses stuff documented, so this
seems to be a good place to start.  Needs more exposition on wide
attr_t and how it's related to non-wide chtype, etc, etc.

(uwe)

2018-11-18 23:50:48 UTC MAIN commitmail json YAML

On Xen, copy just the bits we need from the trapframe for hardclock(9)
and statclock(9).

Current, the macros that use the trapframe are:
CLKF_USERMODE()
CLKF_PC()
CLKF_INTR()

Of these, CLKF_INTR() already ignores the frame and uses the ci_idepth
variable to do its job.

Convert the two remaining ones to do this, but only for XEN.

(cherry)

2018-11-18 23:03:36 UTC MAIN commitmail json YAML

Adjust test, we only want to return the structure member if the result is not NULL.

Heads up by Sascha Wildner @ DragonFly BSD.

(sevan)

2018-11-18 22:53:22 UTC MAIN commitmail json YAML

wbkgrnd - do not duplicate code that's already in wbkgrndset()

(uwe)

2018-11-18 22:34:32 UTC MAIN commitmail json YAML

When we remove default color from attributes, just clear all __COLOR.
It's both a nono-optmization and matches the test used in counterpart
code that adds default color when none is set.

(uwe)

2018-11-18 22:18:02 UTC MAIN commitmail json YAML

Reorder "bkgrnd" functions to match the order of old "bkgd" functions.

(uwe)

2018-11-18 22:11:39 UTC MAIN commitmail json YAML

Don't fuse HAVE_WCHAR and (trivial) !HAVE_WCHAR bodies into single
function definition.  Instead provide two sets of definitions under
single #ifdef.  Same object code is generated for both HAVE_WCHAR and
!HAVE_WCHAR.

(uwe)

2018-11-18 21:01:17 UTC MAIN commitmail json YAML

wbkgd - do not duplicate the code that's already in wbkgdset()
that we do call anyway.

(uwe)

2018-11-18 20:26:29 UTC MAIN commitmail json YAML

Fix comments on bkgdset() and friends to match reality.

(uwe)

2018-11-18 20:23:18 UTC MAIN commitmail json YAML

Add virtio at pci, scsibus at scsi, and sd at scsibus

(jmcneill)

2018-11-18 20:22:20 UTC MAIN commitmail json YAML

Add support for PCI I/O space.

(jmcneill)

2018-11-18 20:21:48 UTC MAIN commitmail json YAML

Add a "bs_base" field to struct bus_space. If present, use it to translate
mappings by appending the value to the pa passed to bus_space_map.

(jmcneill)

2018-11-18 19:43:03 UTC netbsd-7 commitmail json YAML