Commit Graph

277246 Commits

Author SHA1 Message Date
christos e4bfa5b301 Make libuv private, requested by joerg@ 2020-05-30 20:47:58 +00:00
ad a638247c0b Fix merge error - adjust assertions. 2020-05-30 20:23:25 +00:00
ad 2c626bbc9e Regen. 2020-05-30 20:16:34 +00:00
ad b17e3baa45 A couple of small changes to lookup that cut 5-10% system time from
"build.sh release" on my test system:

- Crossing mount points during lookup is slow because the set up for, and
  act of doing VFS_ROOT() is quite involved.  Use the name cache to help
  with this.  Cache an "impossible" zero-length name with covered vnodes,
  that points to the root of the file system mounted there.  Use it to cross
  mounts.  When cache_purge() is called on either of the vnodes involved the
  cache entry will disappear.  All of the needed calls for that are already
  in place (vnode reclaim, unmount, etc).

- In lookup_fastforward(), if the the last component has been found and the
  parent directory (searchdir) is not going to be returned, then don't get a
  reference to it.
2020-05-30 20:16:14 +00:00
christos dc0fae96c0 Allow LIBISPRIVATE to build a pic version of itself for embedding into
other shared libraries.
2020-05-30 19:51:32 +00:00
jdolecek 1c446680eb catch up with changes - need bwfmreg.h before bwfmvar.h 2020-05-30 19:23:25 +00:00
ad ed913b27cb Fix a lock order reversal that caused hangs. 2020-05-30 19:16:53 +00:00
riastradh 00fb1a3a30 Merge updates from upstream to reduce stack usage of SHA3_Selftest. 2020-05-30 18:40:28 +00:00
ad f8235f86ab cache_lookup_linked():
- If the lookup fails return with the same lock held.  There's no bug here
  because either parent or child's lock is sufficient to prevent both from
  disappearing into thin air, but may as well be correct.

- if FSCRED is passed in then skip the auth check.
2020-05-30 18:06:17 +00:00
jmcneill 98133a1d00 sctlr_el1 and ctr_el0 are 64-bit registers 2020-05-30 17:50:39 +00:00
jakllsch 6fe25d02bd aubtfwl(4): Use kmem_asprintf() for firmware file name creation.
A MAXPATHLEN+1 array of char on stack is "too much".
2020-05-30 17:19:45 +00:00
jdolecek 918a50ed58 slightly improve sentence, no need to 'Note' when in NOTES section 2020-05-30 17:18:22 +00:00
jdolecek 4da6fcc004 remove M_SOFTDEP from list of supported malloc types, it's long gone
also remove M_PCB - while it is used by SCTP, it's actually not defined
anywhere

in fact add new NOTES section explaining that the malloc types are
actually not used on NetBSD
2020-05-30 17:12:01 +00:00
thorpej a4ecedc295 gem_pci_attach(): avoid allocating a 2K buffer on the stack. 2020-05-30 16:35:02 +00:00
thorpej 16ea4f0d42 coredump_note_elf{32,64}(): avoid allcating register state buffers on
the stack; they could be large.
2020-05-30 16:12:56 +00:00
roy 877982596a terminfo: test strlcpy result against space free, not string length
riastradh@ yep, looks good.
2020-05-30 16:03:58 +00:00
jdolecek 1f937b3fb2 discussed with thorpej@, and it seems it's better to allocate the bss
alignment buffer statically (as part of softc) just to be sure to not
affect performance
2020-05-30 15:55:47 +00:00
rmind b899bfd96f Major NPF improvements (merge from upstream):
- Switch to the C11-style atomic primitives using atomic_loadstore(9).

- npfkern: introduce the 'state.key.interface' and 'state.key.direction'
  settings.  Users can now choose whether the connection state should be
  strictly per-interface or global at the configuration level.  Keep NAT
  logic to be always per-interface, though.

- npfkern: rewrite the G/C worker logic and make it self-tuning.

- npfkern and libnpf: multiple bug fixes; add param exporting; introduce
  more parameters.  Remove npf_nvlist_{copyin,copyout}() functions and
  refactor npfctl_load_nvlist() with others; add npfctl_run_op() to have
  a single entry point for operations.  Introduce npf_flow_t and clean up
  some code.

- npfctl: lots of fixes for the 'npfctl show' logic; make 'npfctl list'
  more informative; misc usability improvements and more user-friendly
  error messages.

- Amend and improve the manual pages.
2020-05-30 14:16:56 +00:00
jdolecek 94a3f73568 reduce stack usage in genfb_calc_hsize() 2020-05-30 14:15:43 +00:00
jdolecek 6f9c6cfca3 reduce stack usage in bwfm_rx_event_cb(), can use KM_SLEEP because
this is called from workqueue handler (i.e. thread context)
2020-05-30 14:03:08 +00:00
jdolecek 4de17f98a0 constify, and make static where possible 2020-05-30 13:41:58 +00:00
jdolecek 8f624da18d add bwfm* at pci?, which is present in GENERIC 2020-05-30 13:35:31 +00:00
jdolecek cd91c1ceb5 fix wdcprobe_with_reset() to avoid allocating big structures on stack 2020-05-30 13:23:14 +00:00
jdolecek e7cfc031b7 allocate memory for dtv_ts_section using kmem_alloc() in dtv_demux_read(),
instead of on-stack

XXX compile-tested only
2020-05-30 13:15:10 +00:00
jmcneill 6b1f2fdc7f Make room for debug sets 2020-05-30 12:36:37 +00:00
jdolecek 91d7bdb279 change pci_conf_print() to allocate memory for the regs dynamically
instead of on-stack
2020-05-30 10:43:46 +00:00
jdolecek 00470bd7fd remove #if 0'ed pci_conf_print() call 2020-05-30 10:27:29 +00:00
maxv 10b7bc9101 Avoid passing file paths in panic strings, this results in extra long
output that is annoying and that syzbot classifies as independent reports
due to the instances having different build paths.
2020-05-30 08:50:31 +00:00
maxv 4660020b03 Introduce PTRACE_REGS_ALIGN, and on x86, enforce a 16-byte alignment, due
to fpregs having fxsave which requires 16-byte alignment.

Reported-by: syzbot+f44d47e617ebf7fda081@syzkaller.appspotmail.com
2020-05-30 08:41:22 +00:00
tsutsui 907d055849 Revert 0(sp) -> CALLFRAME_S0(sp) changes in rev 1.4.
0(sp) is safe here even on O32 because the only callee function
mips_cp0_cause_read() doesn't take arguments, but it's caller's
responsibility to choose proper stackframe region and the name
of CALLFRAME_S0 is just confusing.  No binary change.
2020-05-30 04:11:21 +00:00
tsutsui 4981fca22f Avoid use of CALLFRAME_S0 on calling ARC BIOS functions.
On O32 and O64, 0(sp) could be clobbered by callee functions
to save argument a0, so we can't use it to save caller registers.
Use CALLFRAME_SP instead because a frame pointer is not used here.
Maybe all other references of CALLFRAME_S0 might also be problematic
on O32.  Discussed with soda@.
2020-05-30 03:16:31 +00:00
simonb fed1041e0a CN70XX iobdma limit appears to be 128 words, so gather that many samples
as a time.
Gather the full 512 bytes of samples and process in a single call to
rnd_add_data_sync() - about 10% faster than 4 calls to rnd_add_data_sync().
Put sample buffer in the softc to save some stack usage.
2020-05-30 03:12:52 +00:00
tsutsui 0d22babaca Explicitly use MIPS_CURLWP macro. No binary change. 2020-05-30 02:56:54 +00:00
uwe 3cee218d31 Initialize puffs9p::server (though it's not used anywhere). 2020-05-30 02:53:30 +00:00
tsutsui 8bf812ff0a Don't forget to save MIPS_CURLWP (t8) register before restoring it.
Maybe harmless because the only ARC BIOS function that takes
more than four arguments is currently unused.
2020-05-30 02:46:07 +00:00
uwe 2da8d56162 Provide list of options for ease of reference. 2020-05-30 00:00:35 +00:00
uwe 22cb1031f1 Fix vio9p device name in a comment. 2020-05-29 23:49:08 +00:00
tsutsui 5ff334bfad Try to shrink kernels to smaller than ~6MB due to ARC BIOS restriction.
Currently NetBSD/arc kernels are loaded at 0x80200000
(on some machines ARC BIOS uses regions before it) and
ARC BIOS also uses around 0x807f0000, so bootloader fails
on loading >6MB kernels.

Note GXemul doesn't have this restriction because it loads
a kernel directly via a command line argument.

Tested by installing using sysinst on RAMDISK kernel on netbsd-9.

Should be pulled up to netbsd-9.
2020-05-29 23:24:39 +00:00
tsutsui 4cfa80aabb Shrink ramdisk to make RAMDISK kernel smaller for ARC BIOS restriction. 2020-05-29 23:12:12 +00:00
tsutsui fa359005be Make sure to preserve MIPS_CURLWP (t8) register from ARC BIOS calls.
Fixes silent hangup right after starting a kernel on my
Express5800/230 R4400 PCI (finally I've repaired its PSU and RTC).
Reviewed by soda@.  Maybe other ARC machines are also affected.

Note GXemul was not affected by this problem because it doesn't
have actual ARC BIOS ROM and emulates ARC functions internally.

Should be pulled up to at least netbsd-9.
2020-05-29 23:02:51 +00:00
ad 2ac4ea76ff Reported-by: syzbot+fd9be59aa613bbf4eba8@syzkaller.appspotmail.com
Reported-by: syzbot+15dd4dbac6ed159faa4a@syzkaller.appspotmail.com
Reported-by: syzbot+38fa02d3b0e46e57c156@syzkaller.appspotmail.com

pmap_remove_all(): need to drain PV pages only after the PTEs are unmapped,
otherwise there can be a context switch with them mapped in.  XXX amd64
should use the direct map.
2020-05-29 22:40:15 +00:00
christos f0574a0e8b make it compile again 2020-05-29 20:56:27 +00:00
christos 5b7d12e411 Add more printf annotations 2020-05-29 20:54:16 +00:00
christos fc16d48c3b put back the warn flags 2020-05-29 20:16:07 +00:00
christos 22eebdc3bb fix printf format warning with format_arg 2020-05-29 20:15:37 +00:00
christos 1c87ec2c04 Add explicit casts 2020-05-29 20:15:14 +00:00
rin 482eef7050 For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
2020-05-29 12:30:38 +00:00
christos 91395abedd delete previous and fix bug instead. 2020-05-29 12:15:30 +00:00
christos bdbda1b005 Fix printf format error. 2020-05-29 12:14:49 +00:00
christos b44539c331 fix WORDS_BIGENDIAN 2020-05-29 11:01:53 +00:00