Add more messages for various sets operations.
Add ${_MKMSG_CREATE} to bsd.own.mk.
Enhance maketars to be a bit more verbose even with -q,
to make it more obvious why certain operations may be slow.
May help debugging PR 47562.
Intended to address an issue noted by Denis Ovsienko on port-mips,
where dhcpcd doesn't work with the netbsd-INSTALL_OCTEON kernel. (I am
not able to test this directly, but verified by mounting the ramdisk
images generated before and after this change.)
set list.
XXX
One could argue that these files are not of any use, so why install
them? I don't have a good argument either way, and this is (for
now) a simple work-around for PR bin/57455 Please feel free to
commit a different fix to avoid installing these files at all.
Rename compiler-warning-disable variables from
GCC_NO_warning
to
CC_WNO_warning
where warning is the full warning name as used by the compiler.
GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH
Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
One library defines a symbol and _doesn't_ use it, so it has no
indication of whether the symbol is for static TLS or dynamic TLS,
and then two other libraries use it in different ways.
XXX pullup-10
This restores the devcrypto engine, which was converted from static
to dynamic since the previous OpenSSL update.
XXX Pretty sure I got some of the set list package names wrong, but
it's not clear what the right ones are or what consequences any of
this has.
XXX Needs testing.
Turns out there is a regression lurking here: the devcrypto engine
was made dynamic-only (https://github.com/openssl/openssl/pull/7859),
so to maintain that functionality, we need to build dynamic engines.
Will fix the aarch64 build issue and wire things up separately.
- Engines are deprecated in openssl 3.
- We never actually had the .so engines wired up to be built in
openssl 1.1, and judging by the lack of obsolete entries in the set
lists, I don't think we ever had them wired up to be built at all.
These were only used on PDP-11 for two programs we don't ship,
and have been obsolete since the VAX days.
xstr never worked in the build.sh cross-build environment (22 years), or
parallel make environment (nearly 28 years), didn't work in the orignal 386bsd
import, and has never been needed in NetBSD as we don't have the older BSD
programs (pascal, pre-nvi ex) that needed mkstr/xstr on PDP-11.
PR toolchain/35964
Lua reports more details when os.execute fails, which is useful when
running old versions of indent for comparison. The new test driver also
supports multiple test files in the same run.
mkisofs changes files, then turns around and complains they have been
changed.
This is a self-inflicted wound, so demote the error to a warning.
Reported upstream as <https://codeberg.org/schilytools/schilytools/issues/58>.
Arguably fixes PR toolchain/42166
Request pull-ups to netbsd-{8,9,10}.
XXX What about macppc?
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
compatdir appears to be for things like /usr/lib that have
/usr/lib/eabi as a subdirectory, so for /usr/lib/openssl it would
mean we have /usr/lib/openssl/eabi as a subdirectory. But that's not
what we have; we have /usr/lib/eabi/openssl.
Let's try using NetBSD.dist.compat.in instead, which appears to be
intended for this purpose, from what I can gather.
remove them as explicit part of all arm64 builds when they're only
(currently) used and consumed by llvm builds.
this fixes gcc builds and i don't think it breaks llvm ones though
i'm still waiting for that test.
The value of the variable is passed to stat(2)
and st_mtime is new value.
An optional arg can be used if stat(2) fails, otherwise
the current time is used.
See varmod-mtime.mk for usage examples.
It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.
zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
New test case that reflects the fix in PR kern/57260. The majority of
work for this case itself was by riastradh@, who'd supplied the basis
for it in the ticket, and provided further guidance.
On ARM ports, the EFI boot loader handles a boot.cfg file if it
exists, but one is not installed by default. In contrast, both the
i386 and amd64 ports do install boot.cfg by default. Bring these
ports into agreement by installing boot.cfg on ARM ports with EFI boot
loaders.
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
The previous attempt (message 351 about 'extern' declarations outside
headers) did not cover the proposal from the tech-userlevel mailing list
but instead warns about a different usage pattern of the 'extern'
keyword.
- Split device-streams.tar.gz.uue into seperate source and
binaries device-streams-2.2.1-src.tar.gz and device-streams-2.2.1.lha
to match upstream
- Add device-streams.README.md from upstream
- Add simple 'update' script to help updating next time
- Binaries now avoid 32 bit file offset issues (they use 64 bit
offsets where supported, and otherwise avoid corrupting data due
to 32 bit limits)
- Binaries now built with updated bebbo/amiga-gcc toolchain
Pullup: netbsd-10, netbsd-9 and possibly netbsd-8
The man page itself is a skeleton/template for now. Please add short
descriptions and xrefs. If the target man page doesn't yet document
relevant __HAVE macros (hi, mutex(9)), please add something there,
possibly in a .Sh IMPLEMENTATION NOTES section.
Fetch geometry from disklabel to be consistent.
Use disktab format instead of the normal human-readable output for parsing
the disklabel.
Avoid overflows in size computation.
(Following the pattern in amd64)
When a user selects "exit installer" or hits ^Z in sysinst, the
calling install.sh runs a shell, plus shows a message indicating
they can type "exit" to return to the installer.
Add -E to the arguments to this shell, to enable command line editing,
(primarily for arrow keys, but basic emacs sequences will also work)
With the change of all the install.sh scripts in amd64, evbarm,
i386, sparc64 and vax are identical apart from NetBSD RCD tags and
the sysctl -nx kern.consdev check (some of the latter are definitely
either wrong, or have an incorrect comment attached. Will return
to later)
(Following the pattern in amd64)
When a user selects "exit installer" or hits ^Z in sysinst, the
calling install.sh runs a shell, plus shows a message indicating
they can type "exit" to return to the installer.
Add -E to the arguments to this shell, to enable command line editing,
(primarily for arrow keys, but basic emacs sequences will also work)
- Fix bug that file in DESTDIR is not referenced correctly.
- Change checksum algorithm to SHA256 from MD5.
- Remove invalid option of cksum(1) in regpkg.
The names of the tests were misleading: 'recursive' should have been
'nested', and the interesting topic in the 'cast' tests was not the cast
but the pointer dereference.
The default is to execute the script (iscsid_volumes=YES), so if you have
any volumes defined, you should also start iscsid (iscsid=YES) to avoid
error messages.
When a user selects "exist installer" or hits ^Z in sysinst, the
calling install.sh runs a shell, plus shows a message indicating
they can type "exit" to return to the installer.
Add -E to the arguments to this shell, to enable command line editing,
(primarily for arrow keys, but basic emacs sequences will also work)
At this point this is only on amd64, as this is the port which is
least likely to be installing on particularly esoteric terminal
hardware, and is also likely to have the highest proportion of less
experienced users
and data segment load sections into two pieces, for at total of 4 PT_LOAD
sections: two for text (r--, r-x) and two for data (r--, rw-). For x86_64
this changes the default max page size from 2M to 4K.
Written by Hiroshi Noguchi, of which an updated version was posted to
port-mac68k in 2001.
Attachments were added to kernel configs for platforms that already had
the Cabletron (se.4) driver added, although other platorms may benefit.
Reviewed on tech-net by Izumi Tsutsui.
atmospheric pressure sensor. This is an inexpensive to moderately
expensive chip available from a large number of places. The driver
supports all aspects of the two chips, except for the repeating read
mode which would allow for sub-second queries, such as fall detection
or perhaps even as an altimeter. This driver also only supports the
I2C interface and not the SPI interface.
The BME280, the one with humidity, is not fully tested at this point,
awaiting upon a breakout board and may not show proper humidity.
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new fsck_ffs operations "-c ea" and "-c no-ea" to convert file systems
from UFS2 to UFS2ea and vice-versa (both of which delete all existing extended
attributes in the process).
unfortunately, the i915 ioctls are no longer handled by kdump/ktruss
as the new one conflicts with base. this needs a clean build in these
dirs (and rescue). the radeon ioctls have been enabled instead.
Tested on NetBSD/amd64 with a Sound Blaster Live! Value (CT4870)
Note that this required setting outputs.master to the maximum value
allowed (255) to get sound out, and then cranking the volume pretty
high.
Additional sound cards sponsored by the NetBSD Foundation; thanks!
Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
Remove support for building extsrc/:
1. Makefile: remove do-extsrc target.
2. build.sh: remove options -y and -Y extsrcdir.
3. distrib/sets: remove support for extsrc in various tools
including the options -L ext and -y, and the extsrc sets.
4. doc/BUILDING.mdoc: remove docs for extsrc/, EXTSRCSRCDIR, MKEXTSRC (etc)
5. bsd.own.mk and various Makefiles: remove support for extsrc/,
EXTSRCSRCDIR, MKEXTSRC.
As proposed on tech-kern and tech-userlevel on 2022-01-07
and followed up on 2022-08-21.
The same problem as PR/54835 of the miniroot scripts, i.e.
avoid and replace use of -o binary primary marked obsolescent
by POSIX.1-2017:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_12
8_16
Noticed on installation of NetBSD 9.3 on TT030, and
maybe should be pulled up to netbsd-9.
viocon* at virtio?
/dev/ttyVI??
Tested under qemu with:
qemu-system-aarch64 ... \
-device virtio-serial \
-chardev socket,path=/tmp/ttyVI00,server=on,wait=off,id=ttyVI00 \
-device virtconsole,chardev=ttyVI00,name=org.NetBSD.dev.ttyVI00 \
...
I updated MAKEDEV.conf to create /dev/ttyVI?? on all ports where it
looks likely to work based on:
(a) having pci or a non-pci virtio attachment,
(b) `qemu-system-$ARCH -M ?' mentioned something resembling the port,
and
(c) `qemu-system-$ARCH -device virtio-serial' launched without
complaining about the virtio-serial device.
(Criterion (c) excluded sparc and sparc64.)
New clause `shared <id> algorithm <alg> subkey <info>' in a keygen
block enables `cgdconfig -C' to reuse a key between different params
files, so you can, e.g., use a single password for multiple disks.
This is better than simply caching the password itself because:
- Hashing the password is expensive, so it should only be done once.
Suppose your budget is time t before you get bored, and you
calibrate password hash parameters to unlock n disks before you get
bored waiting for `cgdconfig -C'.
. With n password hashings the adversary's cost goes up only by a
factor of t/n.
. With one password hashing and n subkeys the adversary's cost goes
up by a factor of n.
And if you ever add a disk, rehashing it will make `cgdconfig -C'
go over budget, whereas another subkey adds negligible cost to you.
- Subkeys work for other types of keygen blocks, like shell_cmd,
which could be used to get a key from a hardware token that needs a
button press.
The <info> parameter must be different for each params file;
everything else in the keygen block must be the same. With this
clause, the keygen block determines a shared key used only to derive
keys; the actual key used by cgdconfig is derived from the shared key
by the specified algorithm.
The only supported algorithm is hkdf-hmac-sha256, which uses
HKDF-Expand of RFC 5869 instantiated with SHA-256.
Example:
algorithm aes-cbc;
iv-method encblkno1;
keylength 128;
verify_method none;
keygen pkcs5_pbkdf2/sha1 {
iterations 39361;
salt AAAAgMoHiYonye6KogdYJAobCHE=;
shared "pw" algorithm hkdf-hmac-sha256
subkey AAAAgFlw0BMQ5gY+haYkZ6JC+yY=;
};
The key used for this disk will be derived by
HKDF-HMAC-SHA256_k(WXDQExDmBj6FpiRnokL7Jg==),
where k is the outcome of PBKDF2-SHA1 with the given parameters.
Note that <info> encodes a four-byte prefix giving the big-endian
length in bits of the info argument to HKDF, just like all other bit
strings in cgdconfig parameters files.
If you have multiple disks configured using the same keygen block
except for the info parameter, `cgdconfig -C' will only prompt once
for your passphrase, generate a shared key k with PBKDF2 as usual,
and then reuse it for each of the disks.
Make it easier to test this one out, add `load amdgpu` before boot netbsd.
XXX there should probably be a drm block in sys/modules/Makefile which
includes aarch64.
Note that realpath can act differently for root than for other users
(where an ordinary user will see EACCESS root just barrels right through).
The tests adapt themselves, when run as root, less error cases can be
tested than when run as some other user.
In the last 18 months, several lint warnings have been made adjusted to
allow common usage patterns. For example, lint no longer warns about a
constant condition in the statement 'do { ... } while (false)' (message
161), as this pattern is well-known in statement-like macros, making it
unlikely that the 'false' is a mistake. Another example is casts
between unequal pointer types (message 247) for a few well-known
patterns that are unlikely to be bugs.
Occasionally, it is useful to query the code for patterns or events that
would not justify a warning. These patterns are modeled as predefined
queries that can be selected individually, in addition to and
independently of the existing warnings and errors.
New queries can be added as needed, in the same way as new warnings.
Queries that are deemed no longer used can be deactivated in the same
way as warnings that are no longer used.
As long as none of the queries is enabled, they produce a minimal
overhead of querying a single global variable. Computations that are
more expensive than a few machine instructions should be guarded by
any_query_enabled.
https://mail-index.netbsd.org/source-changes-d/2022/06/28/msg013716.html
ok christos@
Now that each lint1 test lists all generated diagnostics as 'expect'
comments, the information from the .exp files is no longer needed. The
only information that gets lost is the order of the diagnostics, which
is mostly relevant for paired messages like 'inconsistent definition' +
'previous definition was here'.
The test had been wrong since msg_132.c 1.14 from 2022-05-30.
Using 'unsigned long' in a test that was intended to behave the same on
ILP32 and LP64 was an accident. Use 'unsigned long long' instead, which
is 64-bits wide on all platforms supported by lint.
Move the test about conversion from 'long' to 'int' to the
platform-specific test files.
Noticed by martin@ on powerpc.
allow conditionally disabling the building of certain user space
programs in the 'base' set.
There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.
This was introduced two years ago when the getrandom/getentropy API
question was still open, and removed because the discussion was
ongoing. Now getentropy is more widely adopted and soon to be in
POSIX. So reintroduce the symbol into libc since we'll be keeping it
anyway. Discussion of details of the semantics, as interpreted by
NetBSD, is ongoing, but the symbol needs to get in before the
netbsd-10 branch. The draft POSIX text is
(https://www.opengroup.org/austin/docs/austin_1110.pdf):
SYNOPSIS
#include <unistd.h>
int getentropy(void *buffer, size_t length);
DESCRIPTION
The getentropy() function shall write length bytes of data
starting at the location pointed to by buffer. The output
shall be unpredictable high quality random data, generated by
a cryptographically secure pseudo-random number
generator. The maximum permitted value for the length
argument is given by the {GETENTROPY_MAX} symbolic constant
defined in <limits.h>.
RETURN VALUES
Upon successful completion, getentropy() shall return 0;
otherwise, -1 shall be retunred and errno set to indicate the
error.
ERRORS
The getentropy() function shall fail if:
[EINVAL] The value of length is greater than
{GETENTROPY_MAX}.
The getentropy() function may fail if:
[ENOSYS] The system does not provide the necessary
source of entropy.
RATIONALE
The getentropy() function is not a cancellation point.
Minor changes from the previous introduction of getentropy into libc:
- Return EINVAL, not EIO, on buflen > 256.
- Define GETENTROPY_MAX in limits.h.
The declaration of getentropy in unistd.h and definition of
GETENTROPY_MAX in limits.h are currently conditional on
_NETBSD_SOURCE. When the next revision of POSIX is finalized, we can
expose them also under _POSIX_C_SOURCE > 20yymmL as usual -- and this
can be done as a pullup without breaking existing compiled programs.
strictly-aligned versions of memcmp(3), bcopy(3), memcpy(3), and
memmove(3).
This is used for 403 by ld.so.conf with machdep.no_unaligned variable.
With this library, unaligned memory accesses are significantly reduced
for 403 (from several hundreds to few tens per sec under heavy load);
only ld.elf_so (typically few times per fork) and statically-linked
binaries do such access.
PR bin/43821 describes the inconsistency that in a '.for i' loop, the
condition '.if ${i:M*.c}' works since 2009 while the seemingly
equivalent condition '.if !empty(i:M*.c)' does not access the variable
'i' from the .for loop but instead the global 'i'.
Resolving this situation in a backwards-compatible and non-surprising
way is hard, as make has grown several features during the last 20 years
that interact in various edge cases. For now, document the most obvious
pitfalls.