Commit Graph

288916 Commits

Author SHA1 Message Date
dholland ca7439cb21 Fix confusion arising from whether FOLLOW or NOFOLLOW is 0.
In vn_open, don't set and then throw away FOLLOW, and clarify the
comment about requesting FOLLOW/NOFOLLOW behavior.

Related to PR 56316.
2021-07-18 09:30:36 +00:00
kardel b5f331ca20 PR kern/56316: vn_open doesn't follow symlinks
remove setting of O_NOFOLLOW. restores ZFS being able
to open devices via symlinks again.
2021-07-18 07:22:22 +00:00
mlelstv f046e98190 skip symbol tables that were unloaded again to avoid EFAULT when reading
ksyms.

also restore TAILQ_FOREACH idiom.
2021-07-18 06:57:28 +00:00
dholland cbee569422 Mark t_execsnoop xfail (PR 53417) 2021-07-18 06:24:58 +00:00
thorpej 26bc586398 Allow for the SGMAP implementation to specify a minimum alignment for
SGMAP DMA segments.  If not specified, PAGE_SIZE will be used, as before.
2021-07-18 05:12:27 +00:00
thorpej f7b05b48ee Oops, pass the correct bus_dma_tag_t to the "hi" sgmap init function. 2021-07-18 05:09:47 +00:00
thorpej acc6540cac - Don't bother issuing a warning if we program the WBASE / WSM register
to different values than the firmware.
- Reduce the differences in how we initialize the DMA tags vis a vis the
  other Alpha implementations.
- Use Window 2 to provide a 1G @ 3G PCI SGMAP window on systems with more
  than 1G of RAM, rather than falling back on the ISA DMA window which is
  small and could get starved by PCI devices.
- Make sure we set TBASE to 0 for direct-mapped windows.
2021-07-18 00:01:20 +00:00
thorpej 9243e2ebee - Define the DAC enable bit that's present in WSBA3.
- Define symbolic constants for the valid WSM values.
2021-07-17 23:53:02 +00:00
martin f15fffe7ba Use strlcpy() to copy the wedge device name (the code still assumes
the string is short enough and 0 terminated, but now gcc is happy).
2021-07-17 19:27:22 +00:00
martin 9238070ceb PR 56310: if we fail to create a wedge this either means there is
a bug here (and we requested something nonsensial), or there are pre-
existing "foreign" wedges which disturb our work.
So remove all wedges on this disk that we do not know about and retry
to add our new wedge.
2021-07-17 18:07:22 +00:00
christos 528f04f801 provide an equivalent alignment for __float128 for clang and i386 that
does not have it. Idea from mrg@
2021-07-17 16:31:51 +00:00
hannken e28106a5fc Mark vlan_safe_ifpromisc_locked() as "__unused" to appease LLVM.
Maybe completely remove this short helper?
2021-07-17 15:37:04 +00:00
martin b025f918be PR 56313: fix eroneous = that was meant to be == 2021-07-17 14:03:35 +00:00
martin 2f5e5e5d38 PR 56310: avoid assert() failures (or crashes) when the runtime addition
of a wedge fails (for whatever reasons).
2021-07-17 11:32:50 +00:00
riastradh f71e925086 puc(4): Add Intel Core 5G (mobile) KT. 2021-07-17 10:45:58 +00:00
mrg bab709e468 regen. 2021-07-17 07:13:19 +00:00
mrg daac1ef515 add current generation NVIDIA graphics cards (3050-3090 etc.) 2021-07-17 07:11:35 +00:00
thorpej 7a0e5c5392 Back in rev 1.21, mhitch@ fixed an issue with his 1.5GB RAM PWS 500au
by using a fall-back to the ISA DMA window if DMA was out of range for
the 1G @ 1G PCI DMA window.  Alas, the ISA DMA window is pretty small
(8M @ 8M), and it's possible to starve it with PCI devices that might
have, for example, large control data structures there.

So, instead, if the system has more than 1G of RAM, use Window 3
(previously unused) as a SGMAP window 1G @ 3G, and set that as the
fall-back if the direct-mapped window fails.
2021-07-17 00:30:39 +00:00
andvar b1c18296f1 Fix incorrect function name, some grammar and typos in comments. Remove trailing tab symbol.
No functional change intended.
2021-07-16 21:18:41 +00:00
thorpej 7550fba125 Instrument success/faulure of phyisically contiguous uarea allocation. 2021-07-16 19:13:21 +00:00
thorpej 2d9a5a589e The Alpha AXP Architecture Reference Manual is explcit that the only
valid bits in the PSL are the IPL and USER bits, the latter of which
will always be clear when in the kernel, and that all other bits MBZ.
So, when reading the PSL to get the current IPL, don't bother masking
with ALPHA_PSL_IPL_MASK.
2021-07-16 19:02:22 +00:00
thorpej e494967323 On LCA45 systems, look at the memory controller's Bcache configuration
to initialize uvmexp.ncolors rather than hard-coding a value per model
(some models can have more than one configuration).
2021-07-16 18:50:19 +00:00
thorpej 2d2ec986fc Define the memory controller registers, and contents for the Cache
register.
2021-07-16 17:09:33 +00:00
christos 60a1ed1f7a When fflush fails, adjust pointers and the io vectors. From RVP. Fixes
core-dump at cvs(1) exit(3).
2021-07-16 12:34:10 +00:00
andvar 8249b82c42 Add missing RCSID, remove non-breaking space characters in copyright, remove vim modeline (from yambo in IRC).
ok riastradh
2021-07-16 12:20:01 +00:00
andvar 6b362760a4 Remove commented code, including empty if block. Replace tab with whitespace in usage declaration. 2021-07-16 12:09:36 +00:00
rin 013c9183cf PR port-sh3/56311
Correct misinterpretation for the cause of the problem, and link to
the bug report for upstream.
2021-07-16 10:02:50 +00:00
ozaki-r 6cecaa578a tests, altq: fix checks of altqd startup
Hopefully the fix stabilizes test results on qemu/anita.
2021-07-16 02:33:32 +00:00
rillig c77d454d85 lint: reduce verboseness of merge_signedness
No functional change.
2021-07-15 23:54:22 +00:00
rillig f1aeaba52d lint: rename merge_type_specifiers to merge_signedness
No functional change.
2021-07-15 23:47:00 +00:00
rillig 9f9ab1f57c lint: replace switch statement in dcs_merge_declaration_specifiers
Grouping the rules by their abstract type took a lot of visual space.
Instead, move each of the rules from C11 6.7.2 into its own if
statement, so that the rules almost read like in the standard.

No functional change.
2021-07-15 23:42:49 +00:00
rillig bf70490b5f lint: extract dcs_merge_declaration_specifiers from end_type
No functional change.
2021-07-15 23:07:05 +00:00
rillig 395848e890 lint: clean up mix of 'case' and 'if'
No functional change.
2021-07-15 22:47:17 +00:00
rillig aebe54c9a6 lint: remove warning about _Complex long double in traditional C
Complex types have been introduced in C99, so there is no danger of
anyone trying to use them in traditional C.
2021-07-15 22:42:46 +00:00
andvar 6ca8aaa395 Make sure that mutex is released before conditional return statements. Fixes PR kern/56242
ok riastradh
2021-07-15 22:39:06 +00:00
rillig b393dec2d4 lint: fix internal error for sizeof(typeof) 2021-07-15 21:56:51 +00:00
rillig b94f2613f0 tests/lint: cover abstract_declaration, discover internal error 2021-07-15 21:34:11 +00:00
rillig 915d5cedf0 lint: allow pointer casts from 'char *' and 'unsigned char *'
For the sake of traditional code that did not yet migrate to using 'void
*' for arbitrary pointers.

In the standard NetBSD build, this reduces the number of lint warnings
by around 7000, of 57000 total.
2021-07-15 21:22:19 +00:00
rillig 8efa1be512 tests/lint: demonstrate questionable warnings for pointer casts 2021-07-15 21:12:46 +00:00
rillig ae95f90ee9 tests/lint: cover more edge cases in the parser 2021-07-15 21:00:05 +00:00
rillig a8f0cd4b03 lint: remove message 66 about missing semicolon in struct-declaration 2021-07-15 20:05:49 +00:00
rillig ebf03b177e tests/lint: test struct declarations 2021-07-15 19:51:29 +00:00
rhialto 7a21ea705e Add some OpenStack support.
I found that in the cloud I tried, by the time this script runs, there
is no default route in effect yet. That takes some 5 to 10 seconds
longer. So I added a retry loop, and to make that easier, changed the
order of queries.  To make sure it doesn't wait ~forever for a
non-existent service I added the -q 1 option to ftp invocations.

I also added OpenStack-specific metadata which contains a different
random_seed of 512 bytes every time it is requested.  See
https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L355
It may not be trusted data but only in the strictest sense of the word.
The data can only be observed by people with access to the cloud's
overlay network for the particular VM.
2021-07-15 19:03:17 +00:00
rillig 9419f5a0db lint: merge duplicate code in declarations
No functional change, code coverage outside cgram.y stays the same.
2021-07-15 18:18:15 +00:00
rillig dae1687f09 lint: rename grammar rule 'declaration' to 'declaration_or_error'
This prepares for merging the duplicate code from top_level_declaration.
The code coverage outside cgram.y is exactly the same as before.

No functional change.
2021-07-15 18:13:25 +00:00
rillig 4c2e26604d tests/lint: explain global variables in __attribute__ 2021-07-15 17:48:10 +00:00
rillig 4617d7fea8 lint: in the grammar, replace %prec with explicit rules
This way, in the arguments of __attribute__, where only constant
expressions are expected, a '=' leads to a syntax error.  Previously,
this was not detected.

No noticeable change in practice since these cases are already handled
by the compilers.
2021-07-15 17:20:57 +00:00
rhialto 9e2fdf32c3 Recognize OpenStack too (it also has a metadata service).
Typical values for machdep.dmi are:

machdep.dmi.system-vendor = OpenStack Foundation
machdep.dmi.system-product = OpenStack Nova
machdep.dmi.system-version = 17.0.12
machdep.dmi.system-serial = c46130fb-a56e-43f2-9d98-492d24656b9c
machdep.dmi.system-uuid = 680b8119-0d74-4f78-a6fd-e79dfede905c
machdep.dmi.bios-vendor = SeaBIOS
machdep.dmi.bios-version = 1.10.2-1ubuntu1
machdep.dmi.bios-date = 20140401
machdep.dmi.chassis-vendor = QEMU
machdep.dmi.chassis-type = QEMU
machdep.dmi.chassis-version = pc-i440fx-2.8
machdep.dmi.processor-vendor = QEMU
machdep.dmi.processor-version = pc-i440fx-2.8
machdep.dmi.processor-frequency = 2000 MHz
2021-07-15 17:20:25 +00:00
rillig 60f9e3d3c0 tests/lint: test precedence of operators 2021-07-15 17:09:08 +00:00
rillig 582a074b3e lint: replace call to ttos with type_name
Since tyname.c 1.20 from 2021-01-02, type_name is as simple to use as
ttos and more expressive.  It can also be called multiple times without
invalidating the returned strings.

Used only in debug mode.
2021-07-15 17:03:50 +00:00