Commit Graph

289103 Commits

Author SHA1 Message Date
jhigh be7f0281e1 print Issuer Fingerprint subpacket 33 (rfc4880bis-08:5.2.3.28) rather than Unknown 2021-07-28 22:31:45 +00:00
jdolecek 74676f8743 fix off-by-one check in another KASSERT() for bcount
still related to PR port-xen/56328
2021-07-28 22:17:49 +00:00
jdolecek 848819d954 fix intentional, but eventually faulty off-by-one for the maximum number
of segments for I/O - this was supposed to allow MAXPHYS-size I/O even
with page offset, but actually ended up letting through I/O up to
MAXPHYS+PAGE_SIZE

the KASSERT(bcount < MAXPHYS) is kept as-is, since at that place the number
of segments should already be validated, so it's kernel bug if the size
is still too big there

fixes PR port-xen/56328 by Greg Oster
2021-07-28 21:38:50 +00:00
wiz e2a90e41be Fix typos. 2021-07-28 11:32:21 +00:00
wiz 81a3b6c7f2 Fix typos, improve wording. 2021-07-28 11:29:59 +00:00
simonb 3fc2996b41 #define<tab> consistency. 2021-07-28 08:01:10 +00:00
skrll 8e8c0784cf Remove memory barriers from the atomic_ops(3) atomic operations. They're
not needed for correctness.

Add the correct memory barriers to the gcc legacy __sync built-in
functions for atomic memory access.  From the gcc documentation:

In most cases, these built-in functions are considered a full barrier.
That is, no memory operand is moved across the operation, either forward
or backward. Further, instructions are issued as necessary to prevent the
processor from speculating loads across the operation and from queuing
stores after the operation.

type __sync_lock_test_and_set (type *ptr, type value, ...)

   This built-in function is not a full barrier, but rather an acquire
   barrier. This means that references after the operation cannot move to
   (or be speculated to) before the operation, but previous memory stores
   may not be globally visible yet, and previous memory loads may not yet
   be satisfied.

void __sync_lock_release (type *ptr, ...)

   This built-in function is not a full barrier, but rather a release
   barrier. This means that all previous memory stores are globally
   visible, and all previous memory loads have been satisfied, but
   following memory reads are not prevented from being speculated to
   before the barrier.
2021-07-28 07:32:20 +00:00
macallan 564594819a check temperatures a bit more often
while there, explain why the delay is variable
2021-07-28 00:59:10 +00:00
macallan f75584d23e adjust comments, break a long line
NFC
2021-07-28 00:36:00 +00:00
macallan c16eabe095 first step towards abstracting thermal zone management out of the fcu driver
( and eventually, the smu driver )
todo:
- add sysctl()s to set zone parameters
- handle envsys
- adapt smu
2021-07-27 23:38:42 +00:00
skrll 650c56d4d8 KNF and remove #include <sys/malloc.h>
Fixes the build - prompted by cjep.
2021-07-27 21:13:41 +00:00
macallan 2282ff73b6 move the fcu driver into arch/macppc where it belongs 2021-07-27 20:23:41 +00:00
gson 1cb69d41f6 Show the stderr from execsnoop so that we can see why it fails on arm. 2021-07-27 15:29:22 +00:00
manu 9cfa8f6485 Tie the maximum file lock per unprivilegied uid to kern.maxfiles 2021-07-27 12:40:07 +00:00
skrll 24f992ccb4 PR/53417 appears fixed now so remove atf_expect_fail (for Arm). 2021-07-27 11:05:39 +00:00
manu e5ffdc00de Tie the maximum file lock per unprivilegied uid to kern.maxfiles
This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
2021-07-27 09:32:55 +00:00
rillig 3c18a23cd9 lint: inline align_as in the grammar
This saves 500 bytes in the resulting binary.

No functional change.
2021-07-27 05:52:53 +00:00
rillig 6e9ad9dcae lint: provide a direct link to the documentation
No functional change.
2021-07-27 05:42:36 +00:00
oster 47748de926 Missed cleaning up this "peek" routines the other day. Take care of it now. 2021-07-27 03:09:26 +00:00
oster d03fc4a727 rf_CreateDiskQueueData() no longer uses waitflag, and will always succeed.
Cleanup the error path for the (no longer needed) PR_NOWAIT cases.
2021-07-27 03:01:48 +00:00
thorpej 0039f264c6 - Remove unused <sys/malloc.h> include.
- Rename ahb_ecb_phys_kv() to ahb_ecb_lookup().
- Remove a bogus comment.
2021-07-27 01:18:04 +00:00
oster d077bc112e Add support for detecting and configuring nested RAID setups at boot. 2021-07-26 22:50:36 +00:00
andvar ffeddc7dfb Revert rename back to OFSET, since the name follows historical PGOFSET definition. Noted by tsutsui. 2021-07-26 21:43:11 +00:00
nia 1515619f1b The BUGS sections is incorrect again for "modern" terminals.
For example, wscons and xterm both display standout differently to bold.
2021-07-26 20:17:09 +00:00
rillig 2116d9a5d9 lint: fix parse error in conditional expression (since 2021-07-15) 2021-07-26 18:10:14 +00:00
rillig 3120116ed3 tests/lint: show bug in conditional expression (since 2021-07-15)
Since cgram.y 1.325 from 2021-07-15, conditional expressions did not
accept a comma-expression in the then-branch anymore.  In practice, this
is an edge case though since comma expressions are rare.
2021-07-26 18:06:43 +00:00
rillig 51b2be3c67 lint: fix parsing of chained assignments (since 2021-07-15)
The grammar rule for assignment_expression is quite different from those
of the other expressions, for 2 reasons: first, its precedence is
right-to-left.  Second, its left-hand side must be an lvalue, which
rules out all binary operators.  K&R C even had a grammar rule named
'lvalue' for this purpose.  Later C standards made the kinds of
expressions more fine-grained and used 'unary_expression' in this place.
2021-07-26 17:27:22 +00:00
rillig d382492611 lint: remove redundant associativity declarations
Since cgram.y 1.325 from 2021-07-15, these are not needed anymore.
Strangely, neither yacc nor Bison warned about this redundancy.

No functional change, the grammar rules are the same as before.
2021-07-26 17:15:24 +00:00
rillig 036149f3ba tests/lint: demonstrate bug in chained assignment (since 2021-07-15)
Since cgram.y 1.325 from 2021-07-15, lint has been parsing assignment
expressions correctly.  It got the associativity wrong.
2021-07-26 17:09:46 +00:00
thorpej e145d99d7c - Type hygiene.
- Rename ahb_ecb::hashkey to ahb_ecb::ecb_dma_addr, and use that value
  rather than recomputing it all the time.
2021-07-26 16:45:56 +00:00
rillig b9b3a7d957 lint: make typeok_scalar_strict_bool simpler
No functional change.
2021-07-26 16:22:24 +00:00
rin 76020b2c7d Improve previous:
- Add suffix ``d'' for mkdep(1).
- Improve comment a little...
2021-07-26 12:49:13 +00:00
rillig 52d0684901 lint: split is_ctype_function into separate parts
This reduces the number of string comparisons for function names that
start with 'is' or 'to'.

The tests now cover function names that start with 'is' or 'to' but are
not one of the well-known functions from ctype.h.  This removes the '*'
in the output from gcov.

No functional change.
2021-07-25 22:43:08 +00:00
rillig 7ed694cb89 tests/lint: cover code in ckctype.c 2021-07-25 22:31:22 +00:00
rillig 45912390fd lint: move scl_name from print.c to decl.c
It is only needed there.
2021-07-25 22:14:36 +00:00
rillig a3535e9c45 tests/lint: cover every code line in the grammar 2021-07-25 22:03:42 +00:00
rillig 3708cf68a2 lint: revert previous commit; it didn't improve readability
No functional change.
2021-07-25 21:31:01 +00:00
rillig f28112cf7c lint: merge duplicate code for abstract_declaration
No functional change; same code coverage outside of cgram.y.
2021-07-25 19:57:22 +00:00
rillig 111da90bc0 tests/lint: explain where the second __attribute__ comes from 2021-07-25 19:41:33 +00:00
rillig 1f9033885a lint: resolve conflicts in begin_type_specifier_qualifier_list
The 9 shift/reduce conflicts were all internal to the grammar rule
begin_type_specifier_qualifier_list.  Previously, there were two
possible ways to parse '__attribute__(()) const int':

1. '__attribute__(())' 'const int'
2. '__attribute__(()) const' 'int'

Both ways would produce the same result since __attribute__ has almost
no observable effects on the resulting type.

No functional change.
2021-07-25 19:27:26 +00:00
rillig f9d007a49c tests/lint: fix unintended line breaks 2021-07-25 19:22:08 +00:00
rillig bd81849e6f lint: reorder grammar rules
First the base cases, then the extensions, like in most other rules in
this file.

No functional change.
2021-07-25 19:05:27 +00:00
rillig 5aebc23c2b lint: fix parsing of enumerators with __attribute__ 2021-07-25 18:48:47 +00:00
rillig b48b63239e lint: fix parsing of __attribute__ before enum tag
The __attribute__ after the enumerators will be fixed in a follow-up
commit since lint exits after the 5th syntax error in a translation
unit, which up to now shadowed the error messages about the enumerators.
2021-07-25 18:44:21 +00:00
rillig b538fc2d6a tests/lint: test __attribute__ with enum 2021-07-25 18:34:44 +00:00
rillig 11238664ef lint: add citations for a few grammar rules
No functional change.
2021-07-25 18:01:03 +00:00
rillig c127a42574 lint: fix parsing of GNU __attribute__ after __asm
GCC only accepts them in the order __asm __attribute__, not the other
way round.  So should lint.
2021-07-25 17:40:04 +00:00
rillig b51ebfa06f tests/lint: test declarators with attributes 2021-07-25 17:27:07 +00:00
rillig 66181cb792 lint: wrap overly long lines
No functional change.
2021-07-25 16:57:23 +00:00
rillig 75b7761af5 lint: do not parse 'typeof(0)(void)' as function call
Previously, lint tried to parse 'typeof(0)(void)' as 'typeof'
'(0)(void)', which tries to call 0 as a function.
2021-07-25 15:58:24 +00:00