Commit Graph

304338 Commits

Author SHA1 Message Date
skrll 3c410a38ac Update RaspberryPI firmware
Update the RaspberryPI firmware to the version from

https://github.com/raspberrypi/rpi-firmware

  commit fdb9eafae4b83e553593937eae8e77b0193903c3
  Author: Dom Cobley <popcornmix@gmail.com>
  Date:   Tue Oct 17 15:59:45 2023 +0100

    kernel: Bump to 6.1.58

    ...

    firmware: config: Add [pi5] to config.txt on 2711 and earlier platforms
2023-12-27 14:24:34 +00:00
rin 9b625a9615 MI efiboot: efi_net_probe: Examine Messaging Device Path also
Network devices can be found as Hardware or Messaging Device Paths,
see Sec 10.4.4 of UEFI Spec 2.10.

In addition to Hardware Device Path, try Messaging Device Path also.
This fixes PXE boot on implementations with the latter choice, e.g.,
Raspberry Pi 4 UEFI firmware.
2023-12-27 09:40:35 +00:00
rin 9bb7bf1efd MI efiboot: Stop using efi_bootdp after exclusive open for PXE
Once boot device is exclusively opened for Simple Network Protocol,
further access via device path (efi_bootdp) is illegal.

For some implementations, boot device path gets corrupted by
exclusive open, and subsequent access by efi_device_path_depth(),
e.g., causes infinite recursion.

Fix PXE boot for QEMU/aarch64 with EDK2 on some Linux distributions.

Thanks yamaguchi@ for comments and tests.
2023-12-27 09:28:04 +00:00
skrll f8d6b19743 Trailing whitespace 2023-12-27 07:46:20 +00:00
thorpej ee2bbf4b98 Stop using magic numbers for the MMU root pointer attributes and the
Translation Control register, and also get rid of "#if PGSHIFT == ..."
where those magic numbers are used.

Instead, define new macros: MMU51_SRP_BITS, MMU51_CRP_BITS, MMU51_TCR_BITS,
and MMU40_TCR_BITS, in terms of the definitions in mmu_{40,51}.h.  These
automagically adapt to 8K and 4K pages based on the machine-specific value
of PGSHIFT.
2023-12-27 03:03:40 +00:00
thorpej 3c258f0760 Add new headers that describe the 68851 (and 68030) MMU and
68040 (and 68060) MMU structures using names that more closely
align with Motorola's documentation.

The definitions here automagically adapt to 4K or 8K pages, based
on the value of PGSHIFT, which must be a compile-time constant.
2023-12-27 02:40:31 +00:00
sjg ca3fed09ea make: ensure shellPath is set before using it. 2023-12-27 00:45:37 +00:00
sjg ece0645989 Move fflush to a point to catch all cases. 2023-12-26 20:09:42 +00:00
thorpej c007186050 Move active_pmap() and active_user_pmap() macros into pmap_motorola.c 2023-12-26 17:48:38 +00:00
thorpej 3f075aefd8 - G/C the PMAP_ACTIVATE() macro, just call loadustp() directly.
- In pmap_activate(), rather than checking for an idle LWP and skipping
  the loadustp() in that case, just check if the pmap being activate is
  the kernel pmap.  Also, KASSERT() that the specified lwp is the current
  lwp.
2023-12-26 17:42:43 +00:00
sjg 79a3642923 make: fix order of output in compat mode
Ensure that make's output is correctly ordered with the output of the
target's commands, even when the output does not go to a terminal.

Reviewed by: rillig
2023-12-26 17:12:33 +00:00
pgoyette dd048da8dc Unhook radeondrm module from the build; it doesn't work, and
it's just tempting someone to try it.  Leave the files around
in case someone wants to pursue making this work.

Should address kern/57793

XXX Related modules from the same legacy era should probably be
XXX removed, too, but so far only radeondrm has been reported
XXX as an issue.  Kep an eye out for sisdrm, savagedrm, tdfxdrm,
XXX and r128drm.
2023-12-26 16:20:01 +00:00
andvar 272ba56c61 Replace %ld/%lx format specifiers with PRIx{SIZE,ADDR} for better portability.
From Nick Hudson.
2023-12-26 09:56:44 +00:00
mrg 7426efd696 document how to use installboot on netbsd/vax. 2023-12-26 06:00:35 +00:00
thorpej 2fe4d0e57e G/C unused ploadw(). 2023-12-26 02:38:26 +00:00
thorpej ed507564d0 G/C unused flushustp(). 2023-12-26 02:31:57 +00:00
thorpej ea86bfe41b loadustp(): Optimize for the overwhelmingly common case of "not the HP MMU".
Rather than converting the level 1 table address to a page number before
calling loadustp() only to have loadustp() convert it back to an address
for the '851, '030, '040, and '060, instead pass the address and convert
to a page number only in the case of the HP MMU.

This is a wash on HP MMU machines (9000/320 and 9000/350), and saves at
least 4 instructions (2x moveq + 2x lsXl) on every context switch on
everything else.
2023-12-25 21:32:56 +00:00
skrll 907ef1d191 G/C ununsed and incorrect SIE_IM 2023-12-25 13:31:00 +00:00
skrll 56ebfa498e Count interrupts across harts and their local interrupt controllers
correctly.
2023-12-25 13:21:30 +00:00
skrll b1f7b8d5fe Deliver plic interrupts to the cpu^Whart establishing the interrupt
handler.  At least this is known to be a valid hart, but it might share
some interrupts around too.
2023-12-25 13:01:59 +00:00
kre 31fcb5661e Stop using the obsolete test(1) -o operator, use sh || instead.
Prefer sh ! over test's ! (though that one is not completely obsolete).
2023-12-25 08:38:32 +00:00
kre b151f12f8e Do away with the obsolete text(1) -a operator, use sh && instead.
Prefer sh ! operator over test's ! (less question what it means).
A few minor formatting changes.
2023-12-25 08:37:08 +00:00
kre 78a2289357 Clean up obsolete test(1) usage - use sh's || instead of test's obsolete -o,
and sh's && instead of test's obsolete -a.

Minor formatting cleanups, including removing unneeded \ line continuations.

The somewhat bizarre way that named_migrate() was made to work in a
subshell (which of itself is fine, and looks needed) has been made more
rational.  Because of that, the need to use local vars is no longer there,
(subshells can't affect the parent) and "local" in that func could be deleted
(but hasn't been).
2023-12-25 08:35:07 +00:00
kre 50379ee0d8 Clean up obsolere test(1) -a option/operator - use sh && instead.
Take the opportunity to do a little sh formatting cleanups, the \
line continuation can ususually be avoided by placing sh operators at
the appropriate places.

Note the [ x"$var" = x"$other" ] usage no longer needs the 'x',
avoiding that kind of nonsense is partly why test was much more
precisely specified, and a lot of the unnecessary stuff made obsolete.
Those however I did not remove (they're harmless).
2023-12-25 08:29:05 +00:00
kre 7ebc15ba84 Clean up obsolete test(1) usage, use sh && rather than test's old -a
(and while here prefer sh's ! operator over test's - it simplifies
things for test).
2023-12-25 08:24:58 +00:00
kre 80f0b9f9ed Clean up obsolete test(1) usage - don't use -o, use sh || instead.
This one was particularly bad:

	if [ -z ${dev} -o ${junk} ]; then

was supposed to be validating an entry read from a config file,
dev should be not empty, and junk should be empty (ie: correct
number of fields present).   If that test succeeds, the line is
bad, and we error out.

But if dev was empty, and junk was also empty, that turned into

	if [ -z -o ]; then

which tests if "-o" is the empty string, which it isn't, so instead
of succeeding, and considering the entry invalid (no dev specified)
the code would just carry on as if all was good.

Because of this, a bunch of quoting fixes were also made (there might
perhaps be more needed).
2023-12-25 08:23:35 +00:00
kre 0367de1d4a Don't use obsolete test(1) -a option/operator - use sh && instead. 2023-12-25 07:49:22 +00:00
kre 7a4bb62b07 Whitespace: 8 spaces -> tab 2023-12-25 07:46:12 +00:00
kre 4fa06fab58 No longer use obsolete test(1) -a option/operator, use sh && instead.
While here a couple of minor formatting improvements - in general it
is always a good idea to surround sh operator chars (like '>' '(' ...)
with white space, to guard against thet possibility that some other (or
later enhanced) sh might have additional operators which happen to be
the character string used.

I don't understand while the final part of the condition for not doing
anything needs to run in a subshell, but that can stay for now.
2023-12-25 07:43:03 +00:00
kre 7d757c9675 No longer use obsolete test "-a" option - use sh && instead. 2023-12-25 07:39:59 +00:00
kre c6d0f408e8 PR bin/57773
Fix a bug reported by Jarle Fredrik Greipsland in PR bin/57773,
where a substring expansion where the substring to be removed from
a variable expansion is itself a var expansion where the value
contains one (or more) of sh's CTLxxx chars - the pattern had
CTLESC inserted, the string to be matched against did not.  Fail.
We fix that by always inserting CTLESC in var assign expansions.
See the PR for all the gory details.

Thanks for the PR.

XXX pullup to everything.
2023-12-25 04:52:38 +00:00
kre 391d454067 Correct a bizarre piece of source formatting that crept in by
accident several years ago (change a space into newline tab).

NFC
2023-12-25 02:28:47 +00:00
sjg 94c9d8dd49 Compat_RunCommand call Shell_Init is shellPath is NULL
Since .SHELL is potentially used in compat mode as well,
the man page description should not imply it is only used in jobs mode.

Remove path="sh" from shell-sh unit-test - and it would have detected
this bug.

Reviewed by: rillig
2023-12-24 16:48:30 +00:00
skrll 82a99602a9 eqos(4): MP improvements
Remove the non-MP-safe scaffolding and pass MP safe flags for callout
and interrupt handlers.

Where we had #ifndef EQOS_MPSAFE splnet(), we also had EQOS_LOCK,
which implies splnet, so just remove the conditional splnet.
2023-12-24 16:12:54 +00:00
andvar 7a694ade76 Use %ld format specifier for physmem to fix VERBOSE_INIT_ARM build option.
Use epcom_kgdb_attach() instead of com_kgdb_attach() to fix KGDB build option.
2023-12-24 11:42:35 +00:00
gutteridge 6ecdff9e54 usbdevs.h & usbdevs_data.h: regen 2023-12-24 02:47:47 +00:00
gutteridge c76a535096 usbdevs: add RTL8188FU 2023-12-24 02:42:51 +00:00
andvar 37401e0cf1 Fix physmem printf format specifier %d->%ld.
Fixes VERBOSE_INIT_ARM enabled build for ADI_BRH kernel config.
2023-12-23 23:00:09 +00:00
christos 3b89067e4a PR/57767: Yoshitaka Tokugawa: When restoring, do so from a readonly copy
of the database and update the read-write copy with the new firewall ids.
Before we did not update the state file so it contained the old firewall ids.
2023-12-23 21:53:54 +00:00
andvar 16198b74c0 update usage() and usage comment with missing options. 2023-12-23 20:57:16 +00:00
christos 7f9e26ade3 new tzcode 2023-12-23 20:49:22 +00:00
christos 559c967b97 Import tzcode 2023d:
localtime.c no longer mishandles TZif files that contain a single
    transition into a DST regime.  Previously, it incorrectly assumed
    DST was in effect before the transition too.  (Thanks to Alois
    Treindl for debugging help.)

    localtime.c's timeoff no longer collides with OpenBSD 7.4.

    The C code now uses _Generic only if __STDC_VERSION__ says the
    compiler is C11 or later.

    tzselect now optionally reads zonenow.tab, to simplify when
    configuring only for timestamps dated from now on.

    tzselect no longer creates temporary files.

    tzselect no longer mishandles the following:

      Spaces and most other special characters in BUGEMAIL, PACKAGE,
      TZDIR, and VERSION.

      TZ strings when using mawk 1.4.3, which mishandles regular
      expressions of the form /X{2,}/.

      ISO 6709 coordinates when using an awk that lacks the GNU
      extension of newlines in -v option-arguments.

      Non UTF-8 locales when using an iconv command that lacks the GNU
      //TRANSLIT extension.

    zic no longer mishandles data for Palestine after the year 2075.
    Previously, it incorrectly omitted post-2075 transitions that are
    predicted for just before and just after Ramadan.  (Thanks to Ken
    Murchison for debugging help.)

    zic now works again on Linux 2.6.16 and 2.6.17 (2006).
2023-12-23 20:48:38 +00:00
christos 815db899f0 new postfix 2023-12-23 20:32:30 +00:00
christos c48c605c14 merge conflicts between 3.7.3 and 3.8.4 2023-12-23 20:30:42 +00:00
christos 059c16a85b Import Postfix 3.8.4 (last was 3.7.3)
December 22, 2023: 3.8.4/3.7.9
==============================

Security: this release adds support to defend against an email
spoofing attack (SMTP smuggling) on recipients at a Postfix server.
For background, see https://www.postfix.org/smtp-smuggling.html.

Sites concerned about SMTP smuggling attacks should enable this
feature on Internet-facing Postfix servers. For compatibility with
non-standard clients, Postfix by default excludes clients in
mynetworks from this countermeasure.

The recommended settings are:

# Optionally disconnect remote SMTP clients that send bare newlines,
# but allow local clients with non-standard SMTP implementations
# such as netcat, fax machines, or load balancer health checks.
#
smtpd_forbid_bare_newline = yes
smtpd_forbid_bare_newline_exclusions = $mynetworks
The smtpd_forbid_bare_newline feature is disabled by default.

November 1, 2023: 3.8.3/3.7.8
=============================

Bugfix (defect introduced Postfix 2.5, date 20080104): the Postfix
SMTP server was waiting for a client command instead of replying
immediately, after a client certificate verification error in TLS
wrappermode. Reported by Andreas Kinzler.

Usability: the Postfix SMTP server (finally) attempts to log the
SASL username after authentication failure. In Postfix logging,
this appends ", sasl_username=xxx" after the reason for SASL
authentication failure. The logging replaces an unavailable reason
with "(reason unavailable)", and replaces an unavailable sasl_username
with "(unavailable)". Based on code by Jozsef Kadlecsik.

Compatibility bugfix (defect introduced: Postfix 2.11, date 20130405):
in forward_path, the expression ${recipient_delimiter} would expand
to an empty string when a recipient address had no recipient
delimiter. The compatibility fix is to use a configured recipient
delimiter value instead. Reported by Tod A. Sandman.

September 1, 2023: 3.8.2/3.7.7
==============================

Bugfix (defect introduced: Postfix alpha, 19980207): the valid_hostname()
check in the Postfix DNS client library was blocking unusual but
legitimate wildcard names (*.name) in some DNS lookup results and
lookup requests. Examples:

name          class/type result
*.one.example   IN CNAME *.other.example
*.other.example IN A     10.0.0.1
*.other.example IN TLSA  ..certificate info...
Such syntax is blesed in RFC 1034 section 4.3.3.

Bugfix (defect introduced: Postfix 3.0, 20140218): when an address
verification probe fails during or after an opportunistic TLS
handshake, don't enforce a minimum time-in-queue before falling
back to plaintext. Problem reported by Serg.

June 5, 2023: 3.8.1/3.7.6
=========================

Optional: harden a Postfix SMTP server against remote SMTP clients
that violate RFC 2920 (or 5321) command pipelining constraints.
With "smtpd_forbid_unauth_pipelining = yes", the server disconnects
a client immediately, after responding with "554 5.5.0 Error: SMTP
protocol synchronization" and after logging "improper command
pipelining" with the unexpected remote SMTP client input. This
feature is disabled by default in Postfix 3.5-3.8 to avoid breaking
home-grown utilities, but it is enabled by default in Postfix 3.9.
A similar feature is enabled by default in the Exim SMTP server.

Optional: some OS distributions crank up TLS security to 11, and
in doing so increase the number of plaintext email deliveries. This
introduces basic OpenSSL configuration file support that may be
used to override OS-level settings. Details are in the postconf(5)
manpage under tls_config_file and tls_config_name.

Bugfix (defect introduced: Postfix 1.0): the command "postconf ..
name=v1 .. name=v2 .." (multiple instances of the same parameter
name) created multiple main.cf name=value entries with the same
parameter name. It now logs a warning and skips the earlier name(s)
and value(s). Found during code maintenance.

Bugfix (defect introduced: Postfix 3.3): the command "postconf -M
name1/type1='name2 type2 ...'" died with a segmentation violation
when the request matched multiple master.cf entries. The master.cf
file was not damaged. Problem reported by SATOH Fumiyasu.

Bugfix (defect introduced: Postfix 2.11): the command "postconf -M
name1/type1='name2 type2 ...'" could add a service definition to
master.cf that conflicted with an already existing service definition.
It now replaces all existing service definitions that match the
service pattern 'name1/type1' or the service name and type in 'name2
type2 ...' with a single service definition 'name2 type2 ...'.
Problem reported by SATOH Fumiyasu.

Bugfix (defect introduced: Postfix 3.8) the posttls-finger command
could access uninitialized memory when reconnecting. This also
fixes a malformed warning message when a destination contains
":service" information. Reported by Thomas Korbar.

Bugfix (defect introduced: Postfix 3.2): the MySQL client could
return "not found" instead of "error" (for example, resulting in
a 5XX SMTP status instead of 4XX) during the time that all MySQL
server connections were turned down after error. Found during code
maintenance. File: global/dict_mysql.c. This was already fixed in
Postfix 3.4-3.7.

April 18, 2023: 3.7.5
=====================

Bugfix (problem introduced in Postfix 3.5): check_ccert_access did
not handle inline map specifications. Report and fix by Sean
Gallagher.

Bugfix (problem introduced in Postfix 3.4): the posttls-finger
command failed to detect that a connection was resumed in the case
that a server did not return a certificate. Fix by Viktor Dukhovni.

Workaround: OpenSSL 3.x EVP_get_cipherbyname() can return lazily-bound
handles. Postfix now checks that the expected functionality will
be available instead of failing later. Fix by Viktor Dukhovni.

Safety: the long form "{ name = value }" in import_environment or
export_environment is not documented (with spaces around the '='),
but it was silently accepted, and it was stored in the process
environment as the invalid form "name = value", thus not setting
or overriding an entry for "name". This form is now stored as the
expected "name=value". Found during code maintenance.

Bugfix (problem introduced in Postfix 3.2): the MySQL client could
return "not found" instead of "error" (for example, resulting in
a 5XX SMTP status instead of 4XX) during the time that all MySQL
server connections were turned down after error. Found during code
maintenance.

April 17, 2023: 3.8.0
=====================

Support to look up DNS SRV records in the Postfix SMTP/LMTP client,
Based on code by Tomas Korbar (Red Hat). For example, with
"use_srv_lookup = submission" and "relayhost = example.com:submission",
the Postfix SMTP client will look up DNS SRV records for
_submission._tcp.example.com, and will relay email through the
hosts and ports that are specified with those records.

TLS obsolescence: Postfix now treats the "export" and "low" cipher
grade settings as "medium". The "export" and "low" grades are no
longer supported in OpenSSL 1.1.1, the minimum version required in
Postfix 3.6.0 and later. Also, Postfix default settings now exclude
deprecated or unused ciphers (SEED, IDEA, 3DES, RC2, RC4, RC5),
digest (MD5), key exchange algorithms (DH, ECDH), and public key
algorithm (DSS).

Attack resistance: the Postfix SMTP server can now aggregate
smtpd_client_*_rate and smtpd_client_*_count statistics by network
block instead of by IP address, to raise the bar against a memory
exhaustion attack in the anvil(8) server; Postfix TLS support
unconditionally disables TLS renegotiation in the middle of an SMTP
connection, to avoid a CPU exhaustion attack.

The PostgreSQL client encoding is now configurable with the "encoding"
Postfix configuration file attribute. The default is "UTF8".
Previously the encoding was hard-coded as "LATIN1", which is not
useful in the context of SMTP.

The postconf command now warns for #comment in or after a Postfix
parameter value. Postfix programs do not support #comment after
other text, and treat that as input.


January 12, 2023: 3.7.4
=======================

Workaround: with OpenSSL 3 and later always turn on
SSL_OP_IGNORE_UNEXPECTED_EOF, to avoid warning messages and missed
opportunities for TLS session reuse. This is safe because the SMTP
protocol implements application-level framing, and is therefore
not affected by TLS truncation attacks. Fix by Viktor Dukhovni.

Workaround: OpenSSL 3.x EVP_get_digestbyname() can return lazily-bound
handles for digest implementations. In sufficiently hostile
configurations, Postfix could mistakenly believe that a digest
algorithm is available, and fail when it is not. A similar workaround
may be needed for EVP_get_cipherbyname(). Fix by Viktor Dukhovni.

Bugfix (bug introduced in Postfix 2.11): the checkok() macro in
tls/tls_fprint.c evaluated its argument unconditionally; it should
evaluate the argument only if there was no prior error. Found during
code review.

Bugfix (bug introduced in Postfix 2.8): postscreen died with a
segmentation violation when postscreen_dnsbl_threshold < 1. It
should reject such input with a fatal error instead. Discovered by
Benny Pedersen.

Bitrot: fixes for linker warnings from newer Darwin (MacOS) versions.
Viktor Dukhovni.

Portability: Linux 6 support.

Added missing documentation that cidr:, pcre: and regexp: tables
support inline specification only in Postfix 3.7 and later.
2023-12-23 20:24:46 +00:00
andvar 9be1ef4029 Update documentation with -q and -N options. 2023-12-23 20:15:19 +00:00
andvar fa8470fcd1 Remove obsolete -d flag from documentation.
P.S. -q and -N flags need to be added.
2023-12-23 19:13:55 +00:00
andvar 48429883fa Remove "#ifdef RAMDISK_HOOKS" block, RB_DFLTROOT boot flag is obsolete long ago. 2023-12-23 18:59:27 +00:00
kre b29a6b6f4f Note update of tzdata to 2023d (2023dgtz). 2023-12-23 15:52:11 +00:00
kre cab3854849 Merge tzdata2023d 2023-12-23 15:46:44 +00:00