Commit Graph

296718 Commits

Author SHA1 Message Date
msaitoh db46f7733c Modify CPUID Fn0000000a %ebx's string. Add new string for %ecx. 2022-06-15 16:25:33 +00:00
brad 826c516bfb Fix typo ..
the Adafruit 931 module is mask 0x03 and the 938 module is mask 0x04.
2022-06-15 15:54:40 +00:00
hannken cefc293e00 Set provider to NULL -- "pam" is not a valid security key helper library.
Now ssh-agent no longer fails key addition with

    error: Cannot add provider: RSA is not an authenticator-hosted key
2022-06-15 08:31:34 +00:00
knakahara b962bef537 in6p_hash isn't used, either. 2022-06-15 04:31:22 +00:00
rillig 22a704b367 make: document parsing of short variable names, such as $i
No binary change.
2022-06-14 19:57:56 +00:00
rillig 30e27d8866 make: reduce indentation in ParseVarnameShort
No functional change.
2022-06-14 19:43:02 +00:00
rillig 83bb1d13fb make: simplify return type of IsShortVarnameValid
No functional change.
2022-06-14 19:37:11 +00:00
kre d73b978a64 Implement "raidctl -t config-file"
This does the same config file parse  that -c/-C do, but only
that (hence no raidframe device is needed, or accepted).

Any syntax errors in the config file will be reported, nothing
else happens.
2022-06-14 08:06:18 +00:00
kre b958b2dc5a Fix some config file parsing.
First, and what got me started on this set of cleanups, the queue
length in the "queue" section (START queue) is limited to what will
fit in a char without losing accuracy (I tried setting it to 200,
rather than the more common (universal?) 100 and found that the
value configured into the array was -56 instead.

Why the value needs to be passed through a char variable I have no
idea (it is an int in the filesystem raidframe headers) - but that's
the way it is done, and changing it would be an ABI change I believe
(and so need versioning to alter) and that isn't worth it for this
(or not now, IMO).

Instead check that the value in the char is the same value as was
read from the config file, and complain if not.   Those of you with
unsigned chars will be able to have queue lengths up to 255, the
rest of us are limited to 127.

While looking at that, I noticed some code that obviously fails to
understand that scanf("%s") will never return a string containing
spaces, and proceeded to attempt to remove trailing spaces from the
result ... amusingly, after having used the result for its intended
purpose (non existent trailing spaces unremoved), after which that
buffer was never used again.   That code is now gone (but for now,
just #if 0'd rather than actually deleted - it should be cleaned up
sometime).

Then I saw some other issues with how the config was parsed - a
simple (unbounded) scanf("%s") into a buffer, which hypothetically
might not be large enough (not a security issue really, raidctl has
no special privs, and it isn't likely that root could easily be
tricked into running it on a bogus config file - or not without
looking first anyway, and a huge long string would rather stand
out).   Bound the string length to something reasonable, and
assert() that the buffer is big enough to contain it.

Lastly, in the event of one particular detected error in the
config file, the code would write a warning, but then just go
ahead and use the bad data (or nothing perhaps) anyway - a
failure of logic flow (unlikely to have ever happened, everyone
seems to simply copy the sample config from the man page, and
make minor adjustments as needed).

If any of these changes make any difference to anyone (except
me with my attempt to make longer queues - for no particularly
well thought out reason), I'd be very surprised.
2022-06-14 08:06:13 +00:00
kre 5a1ff55a3a In the previous (and some earlier) version(s) of raidctl.c
the following comment appeared:

	/*
	 * After NetBSD 9, convert this to not output the numRow's value,
	 * which is no longer required or ever used.
	 */

We are after NetBSD 9 (well after).   The change requested in that
comment is made here, and the comment is thus removed.

A couple of places in rf_configure.c where a value for the "rows"
parameter was output in an error message (always simply as the
constant 0) have also been updated (those messages will no longer
include "row 0", which they always said previously).   One of them
was also slightly reworded to be clearer what problem it was
experiencing (when it said 'unable to get device file' it meant
it was unable to locate the name for the device in the config file,
not that it was found, and there was some other problem with it).
2022-06-14 08:06:07 +00:00
kre 681f9ba5c2 Reorder the getopts() switch () (slightly) to sort the options. NFCI. 2022-06-14 08:06:01 +00:00
kre ee1e729e87 KNF (whitespace & 80 column limits) - NFCI.
This is the first of a series of 5 commits in this
directory, all coming within minutes or now.
2022-06-14 08:05:55 +00:00
andvar 2af44958aa s/begens/begins/ 2022-06-13 20:16:53 +00:00
skrll 95e95a0b5c Whitespace 2022-06-13 19:49:33 +00:00
andvar 549aa5640f s/caled/called/ in comments and man page, also few more fixes. 2022-06-13 17:26:34 +00:00
skrll 934c436b1e Provide a __canonicalize_funcptr_for_compare which only needs to return
the passed value as the kernel doesn't do PLABELS.

PR/56878 (hppa: kernel module lua fails to load)
2022-06-13 16:03:07 +00:00
skrll 8ad5b80d68 Don't need $$sh_func_adrs 2022-06-13 16:00:05 +00:00
christos d714e8afed Remove comment explaining why the code was disabled before (Jose Luis Duran) 2022-06-13 15:00:20 +00:00
martin c95185db45 Restore arm in the list of architectures supporting ifunc, accidently
lost in the OABI removal.
2022-06-13 12:55:06 +00:00
msaitoh 052df59bc6 Disable the unsupported events from the bit vector length in EAX. 2022-06-13 09:28:58 +00:00
knakahara d80c914270 Refactor like in_pcb.c:r1.187 and in6_pcb.c:r1.168.
Use TAILQ_FOREACH instead of TAILQ_FOREACH_SAFE about inpt_queue.
rip_pcbnotify() doesn't use "ninph" pointer and doesn't remove elements.
2022-06-13 09:23:23 +00:00
martin d9e5a99cb7 PR 56879: bump timeout for the wg_malformed test to 100 seconds,
as suggested by Tom Lane - the test takes ~32 seconds on my unloaded sh4
machine.
2022-06-13 07:59:15 +00:00
msaitoh c07439c64e Add topdown-slots to Intel architectural performance monitoring version 1. 2022-06-13 07:40:58 +00:00
msaitoh ff79b730f0 Add top-down slots event bit of architectural performance monitoring leaf. 2022-06-13 06:22:31 +00:00
wiz d437c8ecad fix some minor issues 2022-06-12 20:17:35 +00:00
christos 123a18fe3d Handle 0 sized messages (Jose Luis Duran) 2022-06-12 17:54:15 +00:00
andvar 37beea0d2d fix few typos in comments. 2022-06-12 16:22:37 +00:00
rillig 5e8f47d131 make: document ExprLen, which is part of a .for loop
No binary change
2022-06-12 16:09:21 +00:00
skrll ac615257a7 Put the sprinkled -static in the right place, i.e. fix up previous.
Thanks to rillig for spotting my mistake.
2022-06-12 15:08:38 +00:00
rillig 550adcb732 tests/make: make test for null bytes in .for loop more readable 2022-06-12 15:03:27 +00:00
rillig 158db354d4 cgram: allow cursor navigation with KEY_BEG as well 2022-06-12 14:59:44 +00:00
rillig c697d06cb5 tests/make: demonstrate what happens for 'make -DVAR=value' 2022-06-12 14:27:06 +00:00
rillig 67f66322f4 make: reorganize Parse_Error
Determining the location where the error occurred is now done by
ParseVErrorInternal.  This frees the remaining code from keeping the
filename and the line number together.  It also makes Parse_Error short
enough that it might be worth providing a separate function for each of
the 3 log levels.

No functional change.
2022-06-12 13:37:32 +00:00
bouyer 290a03b105 XenPV: in cpu_switchto(), reset ci_xen_clockf_usermode/ci_xen_clockf_pc,
in case a clock interrupt is deffered while we're switching lwp.
Fix a (rare) panic:
panic: kernel diagnostic assertion "p != NULL" failed: file "/usr/src/sys/kern/kern_clock.c", line 438
seen when xen_timer_handler() is called from the splx() at the end of
mi_switch()
2022-06-12 11:36:42 +00:00
skrll 4bb9965c48 Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
2022-06-12 08:55:36 +00:00
skrll 4a76333117 Attach when dr_mode is "otg" and the controller has the "usb-role-switch" and
"role-switch-default-mode" as seen in the Apple M1 dts.

This assumes the controller is properly setup for host mode already.
2022-06-12 08:04:07 +00:00
tsutsui 57ca9549ec Regen from GENERIC.in rev 1.122.
> Specify -fno-unwind-tables to shrink binaries.
2022-06-12 06:57:07 +00:00
tsutsui 661601a447 Specify -fno-unwind-tables to shrink binaries. 2022-06-12 06:54:32 +00:00
tsutsui 34941bda13 Add luna68k specific section 4 man pages.
Taken from mostly OpenBSD/luna88k and partially NetBSD/hp300.
2022-06-12 03:51:13 +00:00
christos 029f8ccd89 fix usage for ctl too (Jose Luis Duran) 2022-06-11 19:23:26 +00:00
christos f29041209b fix usage error (Jose Luis Duran) 2022-06-11 19:15:58 +00:00
martin 74e9a67aa7 Slightly improved error handling when converion from one partition table
format to another is not lossless.
2022-06-11 18:30:02 +00:00
martin d5590295ea Avoid integer arithmetic overflow when checking a partition table without
any partitions.
Fix some comments.
2022-06-11 18:27:22 +00:00
martin f32fb33e15 Since rev 1.101 DIOCAWEDGE could return success without filling in the
wedge device name - which is quite confusing for userland.
Always fill the name if we return success.
2022-06-11 18:17:00 +00:00
rillig 78deb0379f make: fix memory leak in wildcard targets and sources
$ cat <<'EOF' > glob-leak.mk
all:
	@pid=$$$$; \
	ppid=$$(ps -o ppid -p "$$pid" | sed 1d); \
	ps -o vsz,rsz -p $$ppid | sed 1d

.for _ in ${:U:${:Urange=$n}}
bin/*: source
.endfor
EOF

$ make.before -r -f glob-leak.mk n=1
19424 5280
$ make.before -r -f glob-leak.mk n=10
24220 10208
$ make.before -r -f glob-leak.mk n=100
71280 58504
$ make.before -r -f glob-leak.mk n=1000
556356 541620

$ make.after -r -f glob-leak.mk n=1
19208 5040
$ make.after -r -f glob-leak.mk n=10
22132 8092
$ make.after -r -f glob-leak.mk n=100
49040 35940
$ make.after -r -f glob-leak.mk n=1000
324160 314400

That's a saving of 40% already.  The remaining 60% are suspicious as
well since after the first iteration of the .for loop, make's internal
state doesn't change conceptually, so there's no need to throw more
memory at it.
2022-06-11 17:58:15 +00:00
rillig 1b9860a94b make: separate cases in HandleDependencyTargetMundane
Most targets do not use wildcards, so there is no need to put the single
item into a list.

No functional change.
2022-06-11 17:41:35 +00:00
rillig 8a67ed90c9 make: extract HandleSingleDependencyTargetMundane
No functional change.
2022-06-11 16:47:24 +00:00
rillig c5de507a3a make: remove redundant include for stdint.h
No functional change.
2022-06-11 16:43:16 +00:00
tsutsui be57fcbdf6 Pull SMALLPROG stuff to disable unnecessary partitioning methods etc. 2022-06-11 16:41:55 +00:00
tsutsui aaa792c210 Add explicit PART_BOOT_MOUNT for ews4800mips.
XXX: FS_SYSVBFS stuff for the MD boot partition is untested.
2022-06-11 16:38:51 +00:00