Commit Graph

286596 Commits

Author SHA1 Message Date
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
rillig
7d8ec13de2 lint: condense debug output for initializations
This way it does not look more impressive than it really is.

No functional change outside debug mode.
2021-03-25 16:30:23 +00:00
rillig
6d41f06e4c lint: add comments about things left to do, from code review
No functional change.
2021-03-25 13:10:19 +00:00
nia
e11a27e948 Add an example for recording CD quality audio 2021-03-25 10:03:26 +00:00
nia
aca4a8ff12 don't restrict pad module to i386 and amd64.
- module build tested on amiga, vax, i386, amd64, evbarm.
- build.sh release tested on i386.
- pad module functionality tested on aarch64.
2021-03-25 09:49:00 +00:00
skrll
f9f9515b55 Remove strange padding #define and replace with anonymous struct/union 2021-03-25 08:18:03 +00:00
skrll
dba938b5f2 More debug 2021-03-25 07:31:56 +00:00
skrll
44cdaeaf20 Update a comment to reflect reality 2021-03-25 07:30:16 +00:00
rin
b917c45d10 At least KuroBox Classic and HG seem to have buggy UART, for which
ETXRDY interrupts are sometimes (once per a few hours?) lost; TX stalls
until next RX arrives.

Since interrupt-based I/O works just fine for other devices, I believe
this problem is due to UART and not to PIC or its driver.

In order to work around this bug, enable COM_HW_BROKEN_ETXRDY bit, as
well as carry out polling once per 10 sec or 1k tics (arbitrary, but
1 min seems too long).

XXX
Apply this for other MPC824x-based boards?
2021-03-25 05:35:50 +00:00
rin
5805f20f6c Introduce COM_HW_BROKEN_ETXRDY bit in sc_hwflags; push TX queue if
possible in comintr() even if IIR_NOPEND is asserted.

Combined with sc_poll_ticks, this flag works around HW bug, by which
ETXRDY interrupts are (sometimes) lost.
2021-03-25 05:34:49 +00:00
rin
c997c10360 Introduce sc_poll_ticks and obsolete COM_HW_POLL bit in sc_hwflags.
Polling is scheduled at every sc_poll_ticks ticks.

This is useful to work around H/W bug, by which interrupts are lost
*sometimes*; interrupt-based I/O mostly works and no need for polling
every counter ticks.
2021-03-25 05:33:59 +00:00
rin
31283b4a8d Fix tftp boot with RTL8169/8110.
When sending frame shorter than 60 octets, we add trailing \0's to
payload to construct 60-octet frame.

rge.c rev 1.4--1.7 did this tail-padding on buffer provided by caller,
which results in memory corruption if buffer is shorter than 60 bytes.

Instead, allocate temporary buffer on stack, and work on it.

This bug affects tftp_getnextblock() compiled by GCC8 and later, by
which stack layout has drastically changed. However, even with GCC7,
if tftp.c is compiled with -O0, the bug becomes tangible.
2021-03-25 03:44:25 +00:00
rillig
aadb627a71 lint: fix C99 initialization with expression of type 'struct'
This has been a long-standing limitation of lint.  Now it is almost
ready for C99, see the list of "major changes" in the foreword of C99.

One known remaining bug in the area of initialization is designators
with several levels, such as '.member[2].member.member'.  Oh, and
designators for arrays are only supported in the parser but not in the
type checker.  There's still some work to do.
2021-03-25 01:42:53 +00:00
rillig
586d0a84e9 lint: remove outdated comment from init_using_expr
Since C99, an aggregate type can be initialized without braces.

No functional change.
2021-03-25 00:48:58 +00:00
rillig
9d0a894bfa lint: extract check_init_expr from init_using_expr
No functional change.
2021-03-25 00:35:16 +00:00
skrll
a4ec021502 Fix previous 2021-03-24 18:19:31 +00:00
simonb
22b8901154 Remove somewhat dubious empty octfpa_desc structure. 2021-03-24 08:10:14 +00:00
skrll
53a969ad10 Trailing whitespace 2021-03-24 06:37:27 +00:00
simonb
47111af7c8 We don't really need a comment at the end of the file saying "this is
the end of the file".
2021-03-24 05:35:05 +00:00
simonb
5f885a01cf s/depreciated/deprecated/g 2021-03-24 05:00:24 +00:00
simonb
a4684467e8 Add NetBSD CVS IDs. 2021-03-24 04:46:41 +00:00
simonb
a82a6a8354 Add aarch64 and sparc64 to MKZFS yes.
Sort the machine names for the "Default: yes on ..." lines.
2021-03-24 04:36:57 +00:00
rin
5e9a98b7b0 Remove "lib" directory for cleandir. 2021-03-24 02:53:16 +00:00
rillig
09d00b786a tests/lint: fix outdated comments 2021-03-23 23:12:21 +00:00
rillig
e92d4ad150 lint: fix wrong warning about initialization using string literal
Missing braces after 'if', since init.c 1.68 from 2021-02-20.

GCC 10 doesn't complain about this even with -Wmisleading-indentation
since at least one of the involved lines is a macro invocation (in this
case both lines).  GCC 11 will warn about this.

Clang warns about this, but the regular Clang build currently fails for
other reasons, so this problem didn't show up there either.
2021-03-23 22:58:08 +00:00
jmcneill
786cfdcd70 Match generic "snps,dw-mshc" compat string as found in BeagleV. 2021-03-23 22:27:38 +00:00
christos
7f9d45e9ac From Greg A. Woods:
- add LDSTATIC to all the LINK rules, replacing CPPFLAGS which should not be
  used
- create new COMPILE_LINK rules that are like LINK rules but have CPPFLAGS
  where appropriate
2021-03-23 22:02:44 +00:00