Commit Graph

286522 Commits

Author SHA1 Message Date
rillig
7b6e605eda lint: rename global variables in filename management
No functional change.
2021-03-27 12:14:49 +00:00
rillig
625ccc15a1 lint: rename srchfn to search_filename, return const value
No functional change.
2021-03-27 12:10:41 +00:00
rillig
054e76c5e6 lint: rename types in filename management
No functional change.
2021-03-27 12:01:49 +00:00
rillig
95991669ee lint: reduce indentation in fnnalloc
No functional change.
2021-03-27 11:54:35 +00:00
rillig
414d96f2ad lint: rename fnaddreplsrcdir to something less cryptic
No functional change.
2021-03-27 11:50:34 +00:00
rillig
e19973139d lint: remove unused fnalloc 2021-03-27 11:47:59 +00:00
rillig
5e491b8d10 lint: remove space between 'sizeof ('
No functional change.
2021-03-27 11:08:00 +00:00
nia
7bef196ea2 Add uxrcom(4) 2021-03-27 08:01:21 +00:00
simonb
19a5a25b1a Use LDADD/DPADD instead of PROGDPLIBS - we are linking against installed
libraries.

Use compat/exec.mk - dtrace isn't compat32 friendly (yet?).
2021-03-27 02:58:39 +00:00
simonb
8d4bbb0957 Make columns nicely aligned. 2021-03-27 02:46:45 +00:00
rillig
c74ec7a475 bind: fix typo in stdatomic to support lint + Clang
Before this fix, lint complained:
> dist/lib/isc/queue.c(203): error: expected undefined [99]

https://gitlab.isc.org/isc-projects/bind9/-/issues/2601
2021-03-27 00:06:27 +00:00
rillig
13262e443a lint: add quotes around placeholder in message about undefined variable
Before: error: expected undefined [99]
After:  error: 'expected' undefined [99]

Seen in external/mpl/bind, which for Clang defines in stdatomic.h:
> #define atomic_exchange_explicit(obj, desired, order) \
>     __c11_atomic_exchange_explicit(obj, expected, order)
Note the mismatch between 'desired' and 'expected'.
2021-03-26 23:17:33 +00:00
rillig
c162536975 indent: don't claim that indent is "the nicest C pretty printer around"
That statement may have been true in 1993, but definitely is not true
anymore, as of 2021.

The part about "needs to be completely redone" is still true though
since indent cannot even format its own source code in an acceptable
way.
2021-03-26 22:33:54 +00:00
rillig
0554da173f indent: remove workaround for array initialization bug in lint
The bug has been fixed in init.c 1.133 from 2021-03-25.
2021-03-26 22:27:43 +00:00
rillig
f8d94ead78 indent: fix Clang build everywhere but on amd64
No idea why Clang didn't complain about this on amd64, only on all other
platforms.
2021-03-26 22:02:00 +00:00
pgoyette
4bf31dd43a The install-image has grown a bit recently, and at least amd64 has
outgrown the previous size specification when the system was built
with all of MKDEBUG, MKKDEBUG, and MKDEBUGLIB set to "yes" (and
also when in-tree X11 is included).

So, bump the size a bit.
2021-03-26 21:18:29 +00:00
rillig
e355d71d52 lint: improve output format for internal errors
The new format follows the common conventions for file locations and
allows quick navigation in IDEs.

To trigger an internal error, it suffices to have 2 tokens in lint1's
input, after preprocessing: 'void __pure'.
2021-03-26 21:05:27 +00:00
christos
2fe32f22d3 use __func__ 2021-03-26 20:51:34 +00:00
rillig
2e0a622386 lint: in malloc calls, use 'sizeof *ptr' instead of 'sizeof(type)'
No functional change.
2021-03-26 20:31:07 +00:00
rillig
48d931bdcb lint: rename members of struct control_statement to be more expressive
C99 does not define names for the head parts of the 'for' statements, it
just calls them clause-1, expression-2 and expression-3.  Therefore the
rather abstract name 'expr3'.

No functional change.
2021-03-26 19:17:58 +00:00
rillig
c9fcf5c0ae lint: rename pushctrl and popctrl to be more expressive
While here, remove the magic number 0 that in this context means
"function body".

No functional change.
2021-03-26 18:54:39 +00:00
rillig
108d85da05 lint: rename pushdecl and popdecl to be more expressive
The previous names were highly ambiguous.  The 'decl' could have meant
'declaration', which would be the usual abbreviation.  It could also be
split into 'dec' and 'l', meaning 'declaration level', which would make
more sense in this particular context.

To avoid having to guess anything about these names, rename the
functions.  Instead of 'push' and 'pop', I renamed them to 'begin' and
'end' since these are the high-level operation that are of interest.
That the hierarchy of declaration levels is implemented as a stack is
nice to know but not as important to understand the whole situation.

No functional change.
2021-03-26 17:44:52 +00:00
rillig
aead5d0dd4 lint: allow pointer cast to 'char *' and 'unsigned char *'
This reduces the number of warnings in the regular NetBSD build by 5560.
2021-03-26 16:59:18 +00:00
rillig
9c1785fdab lint: rename variables in check_pointer_conversion
No functional change.
2021-03-26 16:53:19 +00:00
rillig
3f6cb883b6 lint: extract decision for warning about pointer cast
This makes the code several lines longer but way more readable.  In the
previous dense expression it was hard to see what was going on at all
and that there are two completely separate situations in which this
warning applies.

No functional change.
2021-03-26 16:45:06 +00:00
rillig
21c63f2ee3 tests/lint: add tests for warning about cast to character types 2021-03-26 16:19:43 +00:00
rillig
280dddc0f6 lint: remove redundant '%prec' from grammar for compound literals
No change to the resulting binary.
2021-03-26 16:05:19 +00:00
reinoud
222afabb3b Implement nvmm_vcpu::stop, a race-free exit from nvmm_vcpu_run() without
signals. This introduces a new kernel and userland NVMM version indicating
this support.

Patch by Kamil Rytarowski <kamil@netbsd.org> and committed on his request.
2021-03-26 15:59:53 +00:00
rin
3bc8d4e817 Twiddle also for data transfer for seek. 2021-03-26 10:35:08 +00:00
chs
de4adac16c in uvm_pglistalloc_contig_aggressive(), avoid looking forward past
the end of the target range of the physseg.
fixes PR 56074.
2021-03-26 09:35:18 +00:00
wiz
5dda8b9865 expat 2.3.0 was released 2021-03-26 08:21:32 +00:00
rillig
f829424df6 lint: fix initialization for arrays with designators
From the previous commit, there was an off-by-one error left, which was
due to the interaction between designation_add_subscript and
extend_if_array_of_unknown_size.

The other crucial point was to call initstack_pop_nobrace before
accessing the "current initialization stack element".  Without this
call, in msg_168.c the "current element" would point to the initializer
level for 'const char *' instead of the one for 'array of const char *'.

One more step towards supporting C99.
2021-03-25 22:53:05 +00:00
rillig
23e30dfb46 lint: improve initialization of arrays with designators
Initialization is still buggy but better than before.  The remaining bug
is that only the first designator determines the array size, and after
that, the array is no longer considered of unknown size.  This
contradicts C99.  More improvements to come.
2021-03-25 22:15:38 +00:00
rillig
35601c2713 lint: fix names of functions dealing with designations
These functions modify the whole designation, not only a single
designator.

No functional change.
2021-03-25 21:51:55 +00:00
rillig
dda1a9e968 lint: free the designator as soon as it is no longer needed
One of the latest "refactorings" introduced a small and practically
unimportant memory leak.  If the last initializer in an initialization
had a designator, that designator was not freed.

When the "current initialization" was still a global variable with
unlimited lifetime, it was freed at the beginning of the next
initialization.  After the refactorings, this "next initialization"
could no longer see anything from the previous initialization since all
references have been cleaned up at that point.  Freeing the memory so
late and in an almost totally unrelated place was a bad idea anyway.
2021-03-25 21:45:10 +00:00
nia
bc4ec85324 Move pad module to MI debug set lists 2021-03-25 21:37:10 +00:00
rillig
34b6d8b796 lint: distinguish between read and write access to initstk
There are far too many places that modify the top element of the
initializer stack.  Each of these places should get its own logging, as
long as the code is still complicated.  These places are now clearly
marked with initstk_lvalue.

No functional change.
2021-03-25 21:36:41 +00:00
rillig
b7a27c9e27 lint: replace namlist with designation and designator
This makes it possible to accurately model C99 initializers, including
their optional designators.  Previously, array subscripts had not been
modeled at all.

In the previous commit, debug_designation crashed immediately since I
had not run the code in debug mode even once.  The condition 'name !=
head' was a left-over from the old times where the designator was still
a circular list.

No functional change outside debug mode.
2021-03-25 21:07:52 +00:00
rillig
4cc73421be lint: remove over-engineered doubly-linked circular list
The designation only needs to be navigated from head to tail, not the
other way round.

No functional change.
2021-03-25 20:38:16 +00:00
rillig
4a688eae44 lint: rename debug_named_member to debug_designation
No functional change outside debug mode.
2021-03-25 20:11:18 +00:00
rillig
182cc5aa66 lint: rename i_current_object to i_next_member
No functional change outside debug mode.
2021-03-25 19:48:25 +00:00
rillig
1c9e647c42 lint: rename the few remaining instances of 'namedmem'
No functional change.
2021-03-25 19:33:44 +00:00
rillig
a58d119dde lint: split current_namedmem into lvalue and rvalue form, rename them
This is a small step towards using the terminology from C99.

No functional change.
2021-03-25 19:20:15 +00:00
rillig
0cb32f4608 lint: inline macro 'namedmem' for C99 designators
No functional change.
2021-03-25 19:11:18 +00:00
christos
7ef87f063d new OpenSSL 2021-03-25 18:52:23 +00:00
christos
542270d5b5 merge our changes between 1.1.1j and 1.1.1k 2021-03-25 18:51:18 +00:00
gdt
7e43f4cffe zfs_ioctl.c: Drop WARNING that ZFS is under development
Following discussions on current-users@, it seems many rely on ZFS to
store data, and there are not particularly large issues with ZFS.  ATF
tests with /tmp as tmpfs, ffs2, and zfs are similar, with only a
slight increase in failures under zfs.

(This commit should probably NOT be pulled up to 9.)
2021-03-25 18:41:29 +00:00
christos
c161c69ca2 Changes between 1.1.1j and 1.1.1k [xx XXX xxxx]
Fixed a problem with verifying a certificate chain when using the
X509_V_FLAG_X509_STRICT flag. This flag enables additional security
checks of the certificates present in a certificate chain. It is
not set by default.

Starting from OpenSSL version 1.1.1h a check to disallow certificates
in the chain that have explicitly encoded elliptic curve parameters
was added as an additional strict check.

An error in the implementation of this check meant that the result
of a previous check to confirm that certificates in the chain are
valid CA certificates was overwritten. This effectively bypasses
the check that non-CA certificates must not be able to issue other
certificates.

If a "purpose" has been configured then there is a subsequent
opportunity for checks that the certificate is a valid CA. All of
the named "purpose" values implemented in libcrypto perform this
check. Therefore, where a purpose is set the certificate chain will
still be rejected even when the strict flag has been used. A purpose
is set by default in libssl client and server certificate verification
routines, but it can be overridden or removed by an application.

In order to be affected, an application must explicitly set the
X509_V_FLAG_X509_STRICT verification flag and either not set a
purpose for the certificate verification or, in the case of TLS
client or server applications, override the default purpose.
([CVE-2021-3450])

Tomasz Mraz

Fixed an issue where an OpenSSL TLS server may crash if sent a
maliciously crafted renegotiation ClientHello message from a client.
If a TLSv1.2 renegotiation ClientHello omits the signature_algorithms
extension (where it was present in the initial ClientHello), but
includes a signature_algorithms_cert extension then a NULL pointer
dereference will result, leading to a crash and a denial of service
attack.

A server is only vulnerable if it has TLSv1.2 and renegotiation
enabled (which is the default configuration). OpenSSL TLS clients
are not impacted by this issue. ([CVE-2021-3449])

Peter Kaestle and Samuel Sapalski
2021-03-25 18:27:01 +00:00
rillig
e44d626769 lint: free memory at the end of an initialization
No functional change, just more clarity in the code.
2021-03-25 16:43:51 +00:00
thorpej
90dc1fdc44 ti_iic_{acquire,release}_bus are no more. Missed in rev 1.11. 2021-03-25 16:34:59 +00:00