Commit Graph

277927 Commits

Author SHA1 Message Date
jruoho
77e941ddd2 Add a test case for PR kern/53410. 2020-06-25 15:01:35 +00:00
uwe
aa0264d3ca Try to improve markup. 2020-06-25 14:59:51 +00:00
jdolecek
fc2c195fb4 enable gcc stack usage limit for kernel functions, set to 3.5 KiB for now
as that seems to be enough to accomodate the current biggest stack usages

there are about six functions which use over 3KiB local stack, and
about a dozen between 2-3 KiB, so pushing this further needs more work
if desired

compile tested on amd64, i386, sparc64, sparc, powerpc (evbppc - BookE),
m68k (mac68k)
2020-06-25 14:52:26 +00:00
jdolecek
7ffd9df109 avoid variable-length array 2020-06-25 14:52:00 +00:00
jruoho
5c3bd061a3 Add test cases for PR kern/53546 and PR kern/55417. Both are skipped as
both reproduce panics.
2020-06-25 14:24:45 +00:00
jdolecek
c0353a6b9f remove experimental direct pipe code (using uvm_loan()) I added in 2001 - it's
slower than the non-direct variant on MP systems, if anybody wants
to hack on this further it's available in Attic
2020-06-25 14:22:18 +00:00
uwe
9a3f56c91e Try to improve markup. 2020-06-25 14:08:48 +00:00
jdolecek
e4118f4162 make ubc_winshift / ubc_winsize constant, and based on whatever is bigger
of (1 << UBC_WINSHIFT, MAX_PAGE_SIZE)

given that default UBC_WINSHIFT is 13, this changes behaviour only
for mips and powerpc (BookE/OEA), which will now have twice as much
memory used for UBC windows; if this ever becomes a problem, it's
possible to reduce ubc_nwins in MD code similar to what is done on sparc

this eliminates variable-length arrays in ubc_fault(),
ubc_uiomove(), and ubc_zerorange() so that the stack usage can be
determined and checked in compile time
2020-06-25 14:04:30 +00:00
simonb
0a2551a360 Fix a tyop in a comment. 2020-06-25 11:48:39 +00:00
jdolecek
048189907b no need for alloca() in of_compatible(), malloc() is fine 2020-06-25 11:31:45 +00:00
jruoho
07a6f275d7 Reference also PR kern/53860. 2020-06-25 11:26:05 +00:00
jruoho
bf613d3342 Reference PRs consistently. 2020-06-25 11:12:03 +00:00
jruoho
b23ebd9451 Require root privileges. 2020-06-25 10:34:34 +00:00
jdolecek
1a9ccc4329 use maximum-size fixed size array instead of variable-length array
in uvm_aio_aiodone() so that the stack usage can be determined and
checked in compile time; this is not called recursively not
particularly deep in call stack, so there is no need to save every
last drop of stack space here
2020-06-25 09:58:44 +00:00
sevan
72bdb0fb50 space, tab 2020-06-25 09:48:29 +00:00
sevan
86e1b08aff Fix column layout 2020-06-25 09:39:19 +00:00
mlelstv
bf2615aa1b Don't assume everything is a wedge and has a parent device. On non-wedges
this crashes.

Instead, just talk to the referenced device and rely on the dk driver
to pass requests correctly.
2020-06-25 09:39:15 +00:00
simonb
2dfaf70976 Fix tyop in an acient comment. 2020-06-25 08:00:49 +00:00
msaitoh
336e9bdbc0 Reduce ixgbe's busy loop using with workqueue and kpause.
- Use workqueue instead of softint to make some functions sleepable.
- Use new workqueue and enqueue it in ixgbe_local_timer() and
  ixgbe_recovery_mode_timer() to make them sleepable.
- Make new ixgbe_delay() and use it. This functions sleeps if the time is
  more than equals 1 tick. If it's not, do delay().
2020-06-25 07:53:01 +00:00
msaitoh
a43f71394d Use unsigned to avoid undefined behavior in ixgbe_fc_enable_generic().
Same as ixgbe_common.c rev. 1.24. Found by KUBSan.
2020-06-25 06:45:10 +00:00
uwe
977c3c75e7 Use a date that is actually a real date. 2020-06-25 02:59:20 +00:00
uwe
c5ff99308b Bump date for previous. 2020-06-25 02:58:16 +00:00
uwe
24af426db6 Fix --error-output to be more like GNU m4. It's a long version of -o. 2020-06-25 02:54:50 +00:00
uwe
7c332fd36c Fix --error-output to be more like GNU m4.
GNU m4 --error-output is the same as -o despite the name.  It does NOT
affect warnings, error messages, and 'errprint' output so drop the
misguided bit of code that tried to freopen stderr without closing it
on failure.  Drop -e (which was our local invention) and make merge
--error-output with -o so that both set traceout.  Make trace_file()
preserve the old traceout on error and return error status so that the
caller can emit appropriate warning.

Do not yet support disabling tracing with an empty name, the rest of
the code is not ready, we don't do -o positionally and we don't have
`debugfile'.
2020-06-25 02:25:53 +00:00
jdolecek
481c7f2e51 don't try allocating 16KB of scratch space on stack
it's too early for kmem_alloc(), so use static variable in BSS; it's used
post reloc, so don't need to use the RELOC() macros

XXX compile-tested only on i386
2020-06-24 22:28:07 +00:00
jdolecek
4a2f7fe5ff reduce stack usage in ipf_nat_ioctl()
also, in SIOCADNAT, make sure to not leak kernel data
2020-06-24 21:54:57 +00:00
jdolecek
232edc8c48 disable inlining for couple functions which allocate usb_device_request_t
on stack to reduce total run_init() stack usage from 7KB to 2KB
2020-06-24 21:06:39 +00:00
jdolecek
7c3b3d0405 actually stop using the stack variable 2020-06-24 20:17:55 +00:00
jdolecek
987a89d496 avoid allocating almost 5k struct ibm561data on stack in ibm561_cninit();
it's too early for kmem_alloc(), so use static variable in BSS
2020-06-24 19:55:25 +00:00
jdolecek
e77dc7beab rearrange to avoid allocating softc on stack in ug_isa_match() 2020-06-24 19:24:44 +00:00
jdolecek
f1e1c62d42 avoid stack usage in match routine 2020-06-24 19:11:49 +00:00
sevan
5c85b20eb8 No truss here 2020-06-24 18:49:01 +00:00
sevan
115e612e0f mdocify 2020-06-24 18:43:38 +00:00
maxv
ccb28fca7d remove unused x86_stos 2020-06-24 18:09:37 +00:00
sevan
7226fd0ff8 mdocify 2020-06-24 18:06:01 +00:00
jdolecek
039c10d987 reduce stack usage in compat_60_ptmget_ioctl() - allocate struct ptmget
via kmem_alloc()
2020-06-24 17:47:52 +00:00
riastradh
88d5cead87 Note that -h is an extension to POSIX. Bump date. 2020-06-24 17:00:58 +00:00
riastradh
7f9ee4a0a0 New mv -h option.
`mv -h source target' just issues rename(source, target) without
discriminating on whether target resolves to a directory; this way
you can atomically replace a symlink to a directory.
2020-06-24 16:58:12 +00:00
uwe
00da1c7eff Try not to lose error output with --error-output.
Try to avoid the trap we set up ourselves while avoiding freopen(3).
When exit flushes and closes open streams it may close sfp first and
when it comes about to flush and close stderr, the descriptor is
already gone and we lose any buffered error output.  This actually
happens on some hosts, breaking --trace output used by autoconf.
2020-06-24 16:49:30 +00:00
jdolecek
ce67beced2 reduce stack usage in dsl_scan_recurse() - allocate memory for
temporary zbookmark_phys_t using kmem_alloc() rather than stack;
this recuses several times usually, and this saves 2x
sizeof(zbookmark_phys_t) == 64 bytes per recursion

part of fix for PR kern/55402 by Frank Kardel
2020-06-24 16:29:34 +00:00
jdolecek
41a612de4f change dsl_scan_visitbp() to allocate blkptr_t dynamically rather than
on-stack - this function is called recursively, and the 120 bytes per call
add up; also remove unused variable

part of fix for PR kern/55402 by Frank Kardel
2020-06-24 16:23:16 +00:00
jdolecek
5964fe3b97 reduce stack usage in vdev_queue_io_to_issue() - zio_t is about 1KB, and
the function potentially recurses into itself

part of fix for PR kern/55402 by Frank Kardel
2020-06-24 16:16:01 +00:00
martin
daa128b211 Add input files 2020-06-24 15:05:45 +00:00
martin
4c5da4561c Fix directories 2020-06-24 14:48:47 +00:00
uwe
3ed307aae1 Regen: Add AC_MSG_RESULT yes/no to the uio checks. 2020-06-24 14:44:44 +00:00
uwe
6072166471 Add AC_MSG_RESULT yes/no to the uio checks. 2020-06-24 14:39:01 +00:00
jdolecek
632d3e3518 fix tyop in KASSERT() condition which made it an assignment rather than a check
the field indeed is supposed to be set to GRANT_INVALID_REF at this moment,
the grant must be already revoked by this time

pointed out by Taylor R Campbell
2020-06-24 14:33:08 +00:00
thorpej
492187ea09 Fix pasto; use {,U}LLONG{MIN,MAX} correctly in the {u,}llong{min,max}
range checks.

PR lib/55414
2020-06-24 14:28:10 +00:00
simonb
f9650ca6cf Redo cnmac attachments - cnmacM @ gmxN @ pip0 @ iobus
Missed one file - thanks martin@.
2020-06-24 12:43:40 +00:00
jruoho
547814cf8b Also install new tests. 2020-06-24 12:31:26 +00:00