Commit Graph

6365 Commits

Author SHA1 Message Date
christos 3a3e6e6861 Update link. We should also update the data... 2023-08-15 19:05:41 +00:00
riastradh 8a22324f3b vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:48:52 +00:00
riastradh 6d340e9776 vis(3): Fix main part of PR lib/57573.
From Kyle Evans <kevans@FreeBSD.org>.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:48:37 +00:00
riastradh ad713b59f2 vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:46:16 +00:00
riastradh 4d342ca518 vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:45:03 +00:00
riastradh db2eb9a062 vis(3) tests: Add xfail test for encoding overflow.
From Kyle Evans <kevans@FreeBSD.org>.

PR lib/57573

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:43:26 +00:00
rillig fdd1c40690 tests/lint: test parsing of preprocessing directives 2023-08-11 04:27:49 +00:00
riastradh 78e153c0eb workqueue(9) tests: Fix mistake in rev. 1.9.
Somehow, despite manually verifying a build/install/test of every
revision in my patch series, I managed to commit the wrong version of
the file for what became rev. 1.9, so the test was just broken when
it went in and remained broken in the commit where I fixed the real
bug and removed the xfail marker on the test.

PR kern/5757

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-10 22:20:20 +00:00
mrg 251ecc35b2 make this build with GCC 12.
there are some odd constructs here to trigger sanitizers.
2023-08-10 20:44:37 +00:00
riastradh 53a88a4133 workqueue(9): Avoid touching running work items in workqueue_wait.
As soon as the workqueue function has called, it is forbidden to
touch the struct work passed to it -- the function might free or
reuse the data structure it is embedded in.

So workqueue_wait is forbidden to search the queue for the batch of
running work items.  Instead, use a generation number which is odd
while the thread is processing a batch of work and even when not.

There's still a small optimization available with the struct work
pointer to wait for: if we find the work item in one of the per-CPU
_pending_ queues, then after we wait for a batch of work to complete
on that CPU, we don't need to wait for work on any other CPUs.

PR kern/57574

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-09 08:23:13 +00:00
riastradh f8e8b7bf19 workqueue(9) tests: Add test for PR kern/57574.
XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-09 08:23:02 +00:00
riastradh aab7c67520 workqueue(9) tests: Destroy struct work immediately on entry. 2023-08-09 08:22:53 +00:00
riastradh a8809f1847 workqueue(9) tests: Nix trailing whitespace. 2023-08-09 08:22:43 +00:00
riastradh c6ab813da9 tests/rump/rumpkern: Use PROGDPLIBS, not explicit -L/-l.
This way we relink the t_* test programs whenever changes under
tests/rump/kernspace change libkernspace.a.
2023-08-09 08:22:33 +00:00
rillig 7e8e260d9f lint: in -a mode, do not warn about integer conversions from 'int'
Since tree.c 1.552 from 2023-07-08, lint warned about integer
conversions from 'int' or 'unsigned int' to smaller integer types.  This
only affected 32-bit platforms where size_t is 'unsigned int' rather
than 'unsigned long', as on these platforms, the integer ranks of 'int'
and 'long' are the same, see INT_RANK in inittyp.c.

Discovered by lib/libkvm, which fails on i386 when lint generates any
warnings.
2023-08-08 20:15:10 +00:00
rillig 53d7accc5b tests/lint: test integer conversions on ilp32 int platforms 2023-08-08 19:57:23 +00:00
riastradh d3dc0d63ee t_cdb: No need for weird padding any more.
cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.
2023-08-08 10:36:17 +00:00
mrg 832d47522a introduce new GCC 12 warning disables and use them in a few places
this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.
2023-08-08 06:27:31 +00:00
mrg e58149cdf7 avoid uninitialised variable.
found by GCC 12.
2023-08-07 23:29:58 +00:00
rillig 26eb44f64d tests/lint: show that portable mode depends on PTRDIFF_TSPEC
Since 2023.07.08.12.45.43, lint warns in lib/libkvm on i386.
2023-08-07 22:30:38 +00:00
rin a65365b875 t_asan_global_buffer_overflow: Avoid ODR Violation for pic variants
Common symbol triggers ODR (One Definition Rule) Violation correctly,
instead of Global Buffer Overflow.

XXX
Add test for odr_violation.
2023-08-07 00:54:54 +00:00
rillig fe7ce87087 lint: since C99, a non-void function must return a value 2023-08-06 19:44:50 +00:00
rillig dca1e8c791 tests/lint: document how much of C99 lint already implements 2023-08-06 19:31:06 +00:00
riastradh cdd57aa330 tests/crypto/opencrypto: test_asymfeat requires privileges. 2023-08-05 13:29:57 +00:00
riastradh d493b3c627 tests/net/inpcb: Tests require root. 2023-08-05 13:25:26 +00:00
riastradh 5b1bee9cea tests/net/net/t_bind: IP_BINDANY and IPV6_BINDANY require root. 2023-08-05 13:22:49 +00:00
riastradh 23336793ae tests/lib/librumphijack: Avoid trying to run rpcbind as non-root.
Can probably make this work through rumphijack, but there's no sense
in even trying the test if we can't, so let's reduce the unprivileged
false alarms.
2023-08-05 13:13:37 +00:00
riastradh 1f0bb15ec8 tests/lib/libnvmm: Tests require privileges. 2023-08-05 13:05:14 +00:00
riastradh ea54f3e2ea t_nullmnt: Need privileges for mount.
(unless vfs.generic.usermount=1 but let's keep it simple)
2023-08-05 13:01:06 +00:00
riastradh 0351610f0a tests/include/t_paths: Test all paths, nonfatally.
This way a single failure doesn't suppress failure reports for all
the other paths to test.

Omit some needless blank lines while here.
2023-08-05 12:11:05 +00:00
riastradh 3f8fc68fb9 tests/include/t_paths: /dev/ksyms requires root. 2023-08-05 11:59:09 +00:00
rillig 8d2e8478af lint: implement __builtin_offsetof for the simplest cases
Cases not covered:
1. C99 allows designators in the offsetof macro.
2. For packed types, the offset is likely to be incorrect.
2023-08-05 10:13:39 +00:00
rillig 2d4c92c54f tests/lint: fix test for packed structs on 32-bit platforms 2023-08-05 10:00:59 +00:00
rillig 222dcfd4cf tests/lint: test C99 printf conversion specifiers in lint2 2023-08-05 09:44:18 +00:00
riastradh cf9621ed16 memfd(2): Run all tests; don't stop after the first failure. 2023-08-05 08:05:16 +00:00
rin 2c57825720 t_siginfo:sigfpe_int: Adjust for GCC12
Do not use constant 1 as numerator to raise integer division by zero.
GCC >= 12 optimizes (1 / i) into (abs(i) == 1 ? i : 0), even for -O0.
2023-08-04 03:31:13 +00:00
andvar 506971ff58 fix typos in comments and one definition, mainly s/sucket/socket/. 2023-08-03 20:45:49 +00:00
rillig 0448d06008 lint: make '_Static_assert' only available in C11 or C23 mode 2023-08-03 18:48:42 +00:00
nia e6ea867424 Revert addition of epoll to libc until discussion concludes 2023-08-03 12:24:46 +00:00
rin 2fd4746018 audiotest: Appease GCC 12.3.0 -Wmisleading-indentation
It does not matter whether this statement is a part of this if-then
block or not, anyway. No binary changes.
2023-08-03 08:36:38 +00:00
rin bfa63a7066 t_etfs: Skip large_blk for system with page size > 8192
Work around kernel freeze reported as PR kern/55658 for
powerpc/ibm4xx (16K pages)
2023-08-03 03:21:56 +00:00
rin a5ca3916c3 t_getrandom: Fix false positives for short read(2)
This only affects really slooooow machines, 68030 for me :)
2023-08-03 03:18:12 +00:00
rillig 5e813441c0 lint: fix handling of unnamed function parameters 2023-08-02 21:11:35 +00:00
rillig f2bab28745 lint: fix plural form in message 150 2023-08-02 18:57:54 +00:00
rillig 039b010016 lint: distinguish between arguments and parameters 2023-08-02 18:51:25 +00:00
rillig 9192ff1d13 lint: simplify handling of old-style arguments 2023-08-02 05:44:27 +00:00
gutteridge c14f999a4e t_pollts.c: fix typo in a description string (NFC) 2023-08-01 23:41:54 +00:00
andvar 1e7139f024 fix RCSIDs. 2023-08-01 20:09:12 +00:00
rillig b525fc25f4 tests/lint: test packed and in-parameter declarations 2023-08-01 19:52:15 +00:00
mrg 1115bcb541 cdbw_output()'s 3rd argument must be a 16-byte char array, so pad the
string literals passed to it with enough nuls to make this true.

found by GCC 12.
2023-08-01 07:57:17 +00:00