Commit Graph

277234 Commits

Author SHA1 Message Date
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
kamil f1fd2e6f4c Fix the ntpd build with Clang/LLVM
Set -Wno-format-nonliteral for ntp_refclock.c
2020-05-29 10:53:02 +00:00
christos 1091d03bdb Fix incorrect merge. 2020-05-29 10:50:36 +00:00
kamil acf22f181d Fix the libntp build with Clang/LLVM
Set -Wno-error=implicit-int-float-conversion
2020-05-29 10:47:37 +00:00
jmcneill c34f2808e8 DTB are no longer part of kernel set 2020-05-29 10:25:06 +00:00
kamil 27054a0c3f Specify -Wno-format-nonlitera for scp.c (OpenSSH)
Fixes build with Clang/LLVM.
2020-05-29 10:01:23 +00:00
rin 4f34027fb8 Make this compile again. Not tested. 2020-05-29 09:05:19 +00:00
skrll a31a340306 Use __BITS consistently and inline with specification. NFCI. 2020-05-29 06:53:40 +00:00
rin 08f17a5785 For clk_timecounter:
- Use C99 initializer.
- Leave .tc_name NULL initially.
No functional changes.
2020-05-29 05:35:47 +00:00
rin a0250cce42 u_int64_t --> uint64_t. No binary changes. 2020-05-29 05:29:23 +00:00
isaki c8e35e0151 Fix suspend/resume.
- Revert temporary usage of sc_[pr]busy during suspend.  These indicate
  whether the mixer needs to be restarted or not.
- Avoid timeout error when about to suspend.
2020-05-29 03:09:14 +00:00
mrg 0fe23762b1 remove useless MACHINE_ARCH == sh3 check for GCC 8. 2020-05-29 01:20:43 +00:00
mrg fcbd0d0d40 alpha, vax, and sh3 have switched. (sh3 swithed a month ago by
accident when i wrote ${MACHINE_ARCH} != "sh3", but this should
have been MACHINE_CPU.)  this means m68k is the only one left.

update various other parts and note some of the m68k issues.
2020-05-29 01:18:50 +00:00