Commit Graph

272074 Commits

Author SHA1 Message Date
ad
9b2ceb0ad8 mi_switch: move an over eager KASSERT defeated by kernel preemption.
Discovered during automated test.
2019-12-07 21:14:36 +00:00
kamil
61223bbb2b Revert the in_interrupt() change to use again the x86 specific code
This is prerequisite for kMSan and upcoming kernel changes.

Discussed with <maxv>
2019-12-07 19:50:33 +00:00
kamil
1826c36972 Switch proc_getlwpstatus from PT_LWPINFO to PT_GET_SIGINFO for NetBSD
PT_LWPINFO from FreeBSD is almost never intended to be expressed with
PT_LWPINFO in NetBSD. PT_GET_SIGINFO reads siginfo_t with the signal
information about the event, on FreeBSD siginfo_t is merged into
ptrace_lwpinfo and returns the thread that received the event (not the
first one in a list like on NetBSD).
2019-12-07 19:38:29 +00:00
jmcneill
472bbf0ecf sys/atomic.h for membar_* 2019-12-07 17:56:08 +00:00
ad
9079e8e09e mi_switch: move LOCKDEBUG_BARRIER later to accomodate holding two locks
on entry.
2019-12-07 17:36:33 +00:00
christos
0ca61464d2 need pfilter.h 2019-12-07 16:38:42 +00:00
christos
6ebd45802c Add some more pfilter_notify() calls where authentication attempts fail. 2019-12-07 16:32:22 +00:00
christos
ca08478982 don't call pfilter_notify() from authz_log(). Logging should not have side
effects (kim@)
2019-12-07 16:25:36 +00:00
christos
a6d8c24313 don't call pfilter_notify() twice in grace_alarm_handler(). (kim@) 2019-12-07 16:25:05 +00:00
tkusumi
6847e6b09b dm: Fix indentation 2019-12-07 16:13:39 +00:00
jmcneill
0a25dbfa87 Use bus_space_{peek,poke}_4 for pci conf reg access. 2019-12-07 16:00:36 +00:00
jmcneill
4c82ba64c0 Define __BUS_SPACE_HAS_PROBING_METHODS 2019-12-07 16:00:09 +00:00
tkusumi
b794fcf3ad dm: Fix strange pointer declarations
Should be "type *name" or "type* name", but not "type * name".
taken-from: DragonFlyBSD
2019-12-07 15:28:39 +00:00
riastradh
1ec67535be Add missing MLINK for membar_datadep_consumer(3).
Detected by the indefatigable wizd.
2019-12-07 15:13:59 +00:00
riastradh
131828f69c Restore call to pserialize_init.
We need it after all for psz_lock on the event counter.
2019-12-07 14:55:58 +00:00
martin
1a12097886 Relax restrictions on packnames, as disklabel(8) does not do full decoding
for the tag field.
Fix quoting of command args.
2019-12-07 13:33:45 +00:00
jmcneill
ee0db1e1ec Fix build for ports without __BUS_SPACE_HAS_STREAM_METHODS defined 2019-12-07 13:31:41 +00:00
wiz
ec6e765cf3 Remove trailing whitespace. 2019-12-07 12:47:07 +00:00
wiz
04ba8470c8 Really add -isoC-2018 (not just the docs). 2019-12-07 12:45:28 +00:00
wiz
61075eb365 Reduce diff to upstream. 2019-12-07 12:43:19 +00:00
wiz
97394f0e9a Remove superfluous Pp. 2019-12-07 12:35:27 +00:00
wiz
cb84b950e7 Sync usage with man page, merge single letter options.
Limit program usage line length.
2019-12-07 12:34:17 +00:00
wiz
70da9690a6 Simplify macro usage. 2019-12-07 12:22:19 +00:00
nonaka
82065bef52 Get a Hyper-V virtual processor id in cpu_hatch().
Currently, it is got in config_interrupts context.
However, since it is required when attaching a device,
it is got earlier than now.
2019-12-07 11:45:45 +00:00
maxv
ce1d0ac5b0 Panic instead of printf, same as syscall. 2019-12-07 10:19:35 +00:00
tkusumi
312beb0985 dm: Simplify list eviction code
taken-from: DragonFlyBSD
2019-12-07 06:26:31 +00:00
christos
7300145099 Drop the advertising clause to match the other files. 2019-12-07 04:55:01 +00:00
christos
6656448714 loadfile sets errno, return the correct error, not EIO. 2019-12-07 02:29:03 +00:00
macallan
b2103fc8a7 clean up the video mode selection logic, switch modes only when actually
necessary
while there make some debug output optional
2019-12-07 01:00:40 +00:00
pgoyette
ac676e6637 Note also that the load address (if provided) is also for the module's
text segment.
2019-12-06 21:45:14 +00:00
ad
4477d28d73 Make it possible to call mi_switch() and immediately switch to another CPU.
This seems to take about 3us on my Intel system.  Two changes required:

- Have the caller to mi_switch() be responsible for calling spc_lock().
- Avoid using l->l_cpu in mi_switch().

While here:

- Add a couple of calls to membar_enter()
- Have the idle LWP set itself to LSIDL, to match softint_thread().
- Remove unused return value from mi_switch().
2019-12-06 21:36:10 +00:00
ad
8e78580c11 NetBSD 9.99.20 cpu_info/cpu_data changes for topology 2019-12-06 21:07:07 +00:00
christos
21c4ca8592 Adjust snprintb(3) format from '%d' to '%ju' to reflect reality and so that
it works on big endian machines.
2019-12-06 19:37:43 +00:00
martin
11811d114c Sanitize disk type and packname a bit more - when using existing disklabel
partitions we might run into trouble later when filing this label (unescaped)
in disktab format otherwise.
2019-12-06 19:36:22 +00:00
christos
a340b0e513 Formalize that the printf formats should be uintmax_t so we can
uniformly use 'j' in the user-provided formatting strings instead
of depending on _LP64 to use 'll' or 'l' (and the PRI macros). The
alternative is to parse the printf format manually to determine
which modifier to apply which would make this transparent to the
user (they could still always use '%u' or '%x'), but that's too
painful.
2019-12-06 19:36:21 +00:00
christos
95fb71b3fc Correct the man page, and say that the printf(3) format characters need
to be uintmax_t.
2019-12-06 19:31:52 +00:00
christos
91fabc4486 Fix broken tests in big endian machines. Internally field values are
stored as uint64_t/uintmax_t so printing them with %d on big endian
ends up being 0.
2019-12-06 19:28:11 +00:00
ad
4c55fef0a6 sched_tick(): don't try to optimise something that's called 10 times a
second, it's a fine way to introduce bugs (and I did).  Use the MI
interface for rescheduling which always does the correct thing.
2019-12-06 18:33:19 +00:00
kamil
832b29588d Remove __HAVE_CPU_LWP_SETPRIVATE from aarch64
aarch64 specific cpu_lwp_setprivate() is redundant with its caller
lwp_setprivate() and there are no MD bits.
2019-12-06 18:16:22 +00:00
ad
a730537ede softint_trigger (slow case): set RESCHED_IDLE too just to be consistent.
No functional change.
2019-12-06 18:15:57 +00:00
kamil
86db9970db Remove misleading comments from core(5)
netbsd_elfcore_procinfo is still in version 1.
cpi_siglwp is stored in the same netbsd_elfcore_procinfo version (1).

The size of struct is stored in cpi_cpisize and the struct can be
expanded without versioning the struct.
2019-12-06 18:03:49 +00:00
kamil
0dd7df5e3c Correct signals in siglist+sigmask passed in kinfo_lwp
Make the union of LWP and PROC pending signals correctly.
2019-12-06 17:41:43 +00:00
maxv
9bef5cce95 cast to proper type 2019-12-06 16:54:47 +00:00
tkusumi
997f839328 dm: Remove trailing whitespace 2019-12-06 16:46:14 +00:00
tkusumi
354a4ac470 dm: Fix typos in comments/messages
taken-from: DragonFlyBSD
2019-12-06 16:33:47 +00:00
nros
fe9bbf72d9 Fix manpage due to updated aligned_alloc behavior
Since aligned_alloc does not demand that size is to be multiple of alignment
anymore, don't make that claim in the man page.
2019-12-06 16:19:32 +00:00
tkusumi
592bc73589 dm: Don't ignore dm_target_alloc() argument
dm_target_alloc() is supposed to be copying the name argument to its ->name.
taken-from: DragonFlyBSD
2019-12-06 16:11:59 +00:00
riastradh
c91905c4be Save the entropy seed daily in /etc/security. 2019-12-06 14:43:29 +00:00
riastradh
5af49f98fe Teach `rndctl -L' to update the seed file, not just delete it.
The seed file is updated by entering the old seed into the system and
then hashing the old seed together with data from /dev/urandom, and
writing it atomically with write-to-temporary/rename-to-permanent.

This way, interruption by crash or power loss does not obliterate
your persistent entropy (unless it causes file system corruption).
2019-12-06 14:43:18 +00:00
nonaka
2c4e9c99d2 Clear the allocated memory in hyperv_dma_alloc(). 2019-12-06 12:46:06 +00:00