Commit Graph

20646 Commits

Author SHA1 Message Date
andvar 369abe069b fix various typos, mainly s/prefered/preferred/ 2021-11-07 20:31:09 +00:00
christos 1c05296632 Commit the userland portion of the posix_spawn_chdir project by Piyush Sachdeva 2021-11-07 14:34:30 +00:00
nia cce5ae2abd usbhid(3): use reallocarr 2021-11-03 16:18:09 +00:00
thorpej cb352d50ab CFI: Saved RA needs to point to the PC slot in the ucontext_t. 2021-11-03 04:52:51 +00:00
thorpej c570a44480 Set up the CFI in a slightly more rational way. 2021-11-03 03:58:31 +00:00
nia 464e94c8b5 fts(3): Use reallocarr instead of realloc(x * y), eliminate a temporary
variable.
2021-11-02 08:39:20 +00:00
thorpej 7c30b7e17f Adjust for new __sigaction_siginfo symbol. 2021-11-02 06:54:10 +00:00
nia 122b5006ee Force at most partial RELRO for rump_server and related libraries
rump_server with -l uses lazy resolution by default and thus cannot be
used with full RELRO/BIND_NOW.
2021-11-01 21:37:32 +00:00
andvar 9a662625bc fix typos, mainly in words minimum and maximum, but also few others. 2021-11-01 21:28:01 +00:00
christos 04f561bb0b Remove workaround, @rillig fixed the issue. 2021-11-01 15:56:53 +00:00
christos 637f9844ca work around lint bug 2021-11-01 12:26:18 +00:00
thorpej 02edde8aa3 Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
2021-11-01 05:53:45 +00:00
thorpej 2b286a53d4 Don't mention the "struct sigaltstack" name of "stack_t". 2021-11-01 05:29:35 +00:00
agc 2c1df105e9 Remove the
COPTS.*+=       -Wno-error=.*

lines for building argon2 sources, by fixing the problems at source.

Addresses Rin Okuyama's concerns on tech-userlevel/tech-crypto in

	Message-ID: <f1eab199-3607-bb05-15cc-033e38721ba4@gmail.com>
2021-11-01 03:09:58 +00:00
thorpej 0d8e07b5c7 Tidy up how __sigaction14_sigtramp.c is added to SRCS. 2021-10-31 22:24:34 +00:00
nia 9c5ddbe34d libcrypt: Compile with USE_FORT, for this is cryptographic software. 2021-10-31 09:16:08 +00:00
christos 7a6d5cb630 Put back the sigcontext sigtramp code. 2021-10-30 21:39:28 +00:00
nia e2fa600c84 pam_exec: Convert realloc(x * y) to reallocarr.
Eliminate a now-redundant temporary variable.
2021-10-30 11:34:59 +00:00
nia b893c4d5e4 libtelnet: convert malloc(x * y) to reallocarr 2021-10-30 10:46:57 +00:00
nia 8221e07e84 puffs(3): Replace realloc(x * y) with reallocarr 2021-10-30 10:34:18 +00:00
nia 31c52db692 refuse(3): Simplify reallocation logic with reallocarr. 2021-10-30 09:06:34 +00:00
kre f3643917bc Add "--" 'options end' parameter to the sh -c call that runs the
command, so that the command cannot appear to be more options
(which always then fails, as there would be no arg for "-c" to
treat as the command string in that case).

For the full (LONG) explanation, see:
   http://mail-index.netbsd.org/current-users/2021/10/29/msg041629.html
2021-10-29 19:27:06 +00:00
nia 129cb9a54f libcrypt: Fix a floating point exception when a low number of HMAC-SHA1
iterations are specified.
2021-10-29 13:22:08 +00:00
nia 99f42ade26 reallocarr does not set errno. 2021-10-29 11:03:46 +00:00
nia 7ab7c5f604 citrus: Use calloc instead of malloc'ing and clearing the array manually 2021-10-29 10:54:56 +00:00
nia 2ee81e7b06 scandir(3): Convert malloc(x * y) and realloc(x * y) to reallocarr 2021-10-29 10:40:00 +00:00
nia 1aca51f7f5 radixsort(3): use reallocarr instead of malloc(x * y) 2021-10-29 10:29:51 +00:00
nia 46bf9c16cb wcsdup(3): use reallocarr to catch integer overflow 2021-10-29 10:11:57 +00:00
riastradh 436ee50286 Fix typo in comment: allows, not alows.
I don't know what an alow is, maybe some cousin of the alot.
Awaiting a nature documentary by Allie Brosh about these perhaps more
elusive beasts.

PR misc/56473, from jschauma
2021-10-28 20:56:32 +00:00
kim 3590d12b68 Use .Sq instead of a dangling .So 2021-10-28 09:51:39 +00:00
nia f76dddbc66 getaddrinfo(3): malloc + memset -> calloc 2021-10-27 19:24:38 +00:00
christos 1971734547 fix problem with uninitialized variable on malformed 32 bit time. 2021-10-27 11:27:25 +00:00
thorpej 5184898635 - Use the signal trampoline version constants from <sys/signal.h>.
- Declare the sigtramp externs as as char arrays, not int arrays; not all
  platforms have fixed-sized 32-bit instructions.
2021-10-27 04:48:33 +00:00
nia 78b3fd4666 libcrypt: Make Werror-disables for external Argon2 library per-file.
Requested by rin.
2021-10-26 20:37:18 +00:00
christos 0faead2ffb Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
  no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
  sigcontext before. all the other ports that supported sigcontext had
  the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
2021-10-26 16:16:34 +00:00
nia 1008642e66 libcrypt: fine-grained warnings for argon2, requested by rin 2021-10-26 07:51:23 +00:00
blymn d84a936f4b Fix for PR lib/47398
Move cursor to end of the currently active field and sync the cursor
location so the cursor get positioned correctly when the form window
is refreshed.
2021-10-25 06:25:18 +00:00
gutteridge e036c8bd09 setlocale.3: minor updates to reflect the current implementation
Reflect a couple of amendments noted by John Marino on tech-userlevel:
http://mail-index.netbsd.org/tech-userlevel/2021/10/19/msg013091.html
2021-10-24 17:30:19 +00:00
thorpej d5b8844629 Add support for the EVFILT_EMPTY filter, which is activated when the
write buffer associated with the file descriptor is empty.  This is
currently implemented only for sockets, and is intended primarily to
provide visibility to applications that all previously written data
has been acknowledged by the TCP layer on the receiver.  Compatible
with the same filter in FreeBSD.
2021-10-23 01:28:33 +00:00
ryoon e41648e26b Fix build failure
* Fix merge mistake.
* Cast to int for strict comparison like before.
2021-10-22 16:57:14 +00:00
christos 1b58480149 Change to code and documentation from 2021a -> 2021e
Release 2021e - 2021-10-21 18:41:00 -0700

  Changes to code

    none


Release 2021d - 2021-10-15 13:48:18 -0700

  Changes to code

    'zic -r' now uses "-00" time zone abbreviations for intervals
    with UT offsets that are unspecified due to -r truncation.
    This implements a change in draft Internet RFC 8536bis.


Release 2021c - 2021-10-01 14:21:49 -0700

  Changes to code

    Fix a bug in 'zic -b fat' that caused old timestamps to be
    mishandled in 32-bit-only readers (problem reported by Daniel
    Fischer).

  Changes to documentation

    Distribute the SECURITY file (problem reported by Andreas Radke).


Release 2021b - 2021-09-24 16:23:00 -0700

  Changes to maintenance procedure

    The new file SECURITY covers how to report security-related bugs.

    Several backward-compatibility links have been moved to the
    'backward' file.  These links, which range from Africa/Addis_Ababa
    to Pacific/Saipan, are only for compatibility with now-obsolete
    guidelines suggesting an entry for every ISO 3166 code.
    The intercontinental convenience links Asia/Istanbul and
    Europe/Nicosia have also been moved to 'backward'.

  Changes to code

    zic now creates each output file or link atomically,
    possibly by creating a temporary file and then renaming it.
    This avoids races where a TZ setting would temporarily stop
    working while zic was installing a replacement file or link.

    zic -L no longer omits the POSIX TZ string in its output.
    Starting with 2020a, zic -L truncated its output according to the
    "Expires" directive or "#expires" comment in the leapseconds file.
    The resulting TZif files omitted daylight saving transitions after
    the leap second table expired, which led to far less-accurate
    predictions of times after the expiry.  Although future timestamps
    cannot be converted accurately in the presence of leap seconds, it
    is more accurate to convert near-future timestamps with a few
    seconds error than with an hour error, so zic -L no longer
    truncates output in this way.

    Instead, when zic -L is given the "Expires" directive, it now
    outputs the expiration by appending a no-change entry to the leap
    second table.  Although this should work well with most TZif
    readers, it does not conform to Internet RFC 8536 and some pickier
    clients (including tzdb 2017c through 2021a) reject it, so
    "Expires" directives are currently disabled by default.  To enable
    them, set the EXPIRES_LINE Makefile variable.  If a TZif file uses
    this new feature it is marked with a new TZif version number 4,
    a format intended to be documented in a successor to RFC 8536.

    zic -L LEAPFILE -r @LO no longer generates an invalid TZif file
    that omits leap second information for the range LO..B when LO
    falls between two leap seconds A and B.  Instead, it generates a
    TZif version 4 file that represents the previously-missing
    information.

    The TZif reader now allows the leap second table to begin with a
    correction other than -1 or +1, and to contain adjacent
    transitions with equal corrections.  This supports TZif version 4.

    The TZif reader now lets leap seconds occur less than 28 days
    apart.  This supports possible future TZif extensions.

    Fix bug that caused 'localtime' etc. to crash when TZ was
    set to a all-year DST string like "EST5EDT4,0/0,J365/25" that does
    not conform to POSIX but does conform to Internet RFC 8536.

    Fix another bug that caused 'localtime' etc. to crash when TZ was
    set to a POSIX-conforming but unusual TZ string like
    "EST5EDT4,0/0,J365/0", where almost all the year is DST.

    Fix yet another bug that caused 'localtime' etc. to mishandle slim
    TZif files containing leap seconds after the last explicit
    transition in the table, or when handling far-future timestamps
    in slim TZif files lacking leap seconds.

    Fix localtime misbehavior involving positive leap seconds.
    This change affects only behavior for "right" system time,
    which contains leap seconds, and only if the UT offset is
    not a multiple of 60 seconds when a positive leap second occurs.
    (No such timezone exists in tzdb, luckily.)  Without the fix,
    the timestamp was ambiguous during a positive leap second.
    With the fix, any seconds occurring after a positive leap second
    and within the same localtime minute are counted through 60, not
    through 59; their UT offset (tm_gmtoff) is the same as before.
    Here is how the fix affects timestamps in a timezone with UT
    offset +01:23:45 (5025 seconds) and with a positive leap second at
    1972-06-30 23:59:60 UTC (78796800):

	time_t    without the fix      with the fix
	78796800  1972-07-01 01:23:45  1972-07-01 01:23:45 (leap second)
	78796801  1972-07-01 01:23:45  1972-07-01 01:23:46
	...
	78796815  1972-07-01 01:23:59  1972-07-01 01:23:60
	78796816  1972-07-01 01:24:00  1972-07-01 01:24:00

    Fix an unlikely bug that caused 'localtime' etc. to misbehave if
    civil time changes a few seconds before time_t wraps around, when
    leap seconds are enabled.

    Fix bug in zic -r; in some cases, the dummy time type after the
    last time transition disagreed with the TZ string, contrary to
    Internet RFC 8563 section 3.3.

    Fix a bug with 'zic -r @X' when X is a negative leap second that
    has a nonnegative correction.  Without the fix, the output file
    was truncated so that X appeared to be a positive leap second.
    Fix a similar, even-less-likely bug when truncating at a positive
    leap second that has a nonpositive correction.

    zic -r now reports an error if given rolling leap seconds, as this
    usage has never generally worked and is evidently unused.

    zic now generates a POSIX-conforming TZ string for TZif files
    where all-year DST is predicted for the indefinite future.
    For example, for all-year Eastern Daylight Time, zic now generates
    "XXX3EDT4,0/0,J365/23" where it previously generated
    "EST5EDT,0/0,J365/25" or "".  (Thanks to Michael Deckers for
    noting the possibility of POSIX conformance.)

    zic.c no longer requires sys/wait.h (thanks to spazmodius for
    noting it wasn't needed).

    When reading slim TZif files, zdump no longer mishandles leap
    seconds on the rare platforms where time_t counts leap seconds,
    fixing a bug introduced in 2014g.

    zdump -v now outputs timestamps at boundaries of what localtime
    and gmtime can represent, instead of the less-useful timestamps
    one day after the minimum and one day before the maximum.
    (Thanks to Arthur David Olson for prototype code, and to Manuela
    Friedrich for debugging help.)

    zdump's -c and -t options are now consistently inclusive for the
    lower time bound and exclusive for the upper.  Formerly they were
    inconsistent.  (Confusion noted by Martin Burnicki.)

  Changes to build procedure

    You can now compile with -DHAVE_MALLOC_ERRNO=0 to port to
    non-POSIX hosts where malloc doesn't set errno.
    (Problem reported by Jan Engelhardt.)

  Changes to documentation

    tzfile.5 better matches a draft successor to RFC 8536
    <https://datatracker.ietf.org/doc/draft-murchison-rfc8536bis/01/>.
2021-10-22 14:26:04 +00:00
andvar 6ff503baef Revert "Does not work" back to "Does no work". It wasn't a typo. 2021-10-21 21:35:02 +00:00
andvar 6f8dc1509f fix various typos, mainly in comments, but also in man pages and log messages. 2021-10-21 13:21:53 +00:00
nia 58856d1265 crypt.3: add a reference for Argon2 2021-10-20 20:29:33 +00:00
nia cb1631f686 Be a little bit more eager to let Argon2 use memory. 2021-10-20 20:21:44 +00:00
nia ac4429015a crypt(3): For argon2, default to time=3.
Good enough for a 50MHz SPARC, a shark, and the spec.
2021-10-20 16:46:33 +00:00
nia 364b5e2621 crypt(3): return 0 -> return NULL for function returning char * 2021-10-20 15:35:42 +00:00
nia 08100292d3 crypt(3): Adapt default Argon2 parameters to system performance
If the parameters are unspecified:

- Set the default memory consumption based on the amount of memory
available to userspace.

The algorithm actually slows down incredibly quickly as the "memory"
parameter is increased. We want to avoid running out of memory on low
memory systems, but increase the difficulty of bruteforcing passwords
from systems with a lot of memory. At the same time, we want to avoid
problems when concurrent logins are happening.

- Run a hashing loop for one second with steadily increasing "time"
until we settle on a value for "time". We want to use as much CPU time
as reasonable for computing the password hash without making logins
inconvenient.
2021-10-20 13:03:29 +00:00
thorpej 56265c7c8b Oops, forgot to note the history of NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE,
and NOTE_READ.
2021-10-20 03:26:20 +00:00
thorpej 982ae832c3 Overhaul of the EVFILT_VNODE kevent(2) filter:
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
2021-10-20 03:08:16 +00:00
blymn 5b90c1a33c Fix for PR lib/47397
Fix a misinterpretation of the role of field fore and back.  Now field
pad is rendered in the back attribute always instead of only being used
for the non-current field.
2021-10-19 21:22:20 +00:00
blymn 63621d5a6b Add a bit more debug. 2021-10-19 06:41:03 +00:00
blymn 669adb1459 Fix for PR pkg/55931
Don't move the cursor when getch is called if input is not going to
be echoed.  Lynx uses the cursor to mark the current selection in a
pop-up, previously the cursor was being relocated when getch was called
which broke the Lynx item marking.
2021-10-19 06:37:29 +00:00
nia f9151ba943 libcrypt: Hide more private symbols by default. Fix style. 2021-10-16 10:53:33 +00:00
nia 6d05989be6 libcrypt: work around compiler bugs to get MKARGON2 working on vax 2021-10-13 14:28:32 +00:00
thorpej dbceac44db Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER,
API-compatible with the same in FreeBSD.
2021-10-13 04:57:19 +00:00
wiz 0fe65de003 Capitalize word. 2021-10-12 21:41:13 +00:00
nia a5ad08a454 crypt.3: note parallelism caveats 2021-10-12 17:27:26 +00:00
nia 87c3d6fe5c Fix release builds with MKARGON2=yes
This changes argon2 from a separately built library into a private
dependency of libcrypt and removes the argon2(1) utility (we already
have pwhash(1)). Giving libcrypt more library dependencies
complicates things (e.g. libcrypt is a dependency of openssl).
pthreads support gets disabled in argon2 for similar reasons.

For testing argon2, we rely on the libcrypt test suite.
2021-10-12 17:24:36 +00:00
jhigh 2e485d4ad8 added missing copyright header. pointed out by nia. no functional change 2021-10-12 15:55:31 +00:00
nia d90c3514dd crypt(3): clean up some leftover debug goo 2021-10-12 15:27:41 +00:00
nia f7145efd49 crypt(3): match the Argon2 reference implementation's Base64 exactly
There are too many minor variations regarding padding and exact alphabet
to safely use the implementation in libc or an existing implementation
in libcrypt.
2021-10-12 15:25:39 +00:00
andvar da66f63158 fix typos in man pages. 2021-10-12 15:25:27 +00:00
nia 80833458d2 crypt(3): Make Argon2 implementation match the reference impl by
making sure input salts are decoded as base64.
2021-10-12 13:24:00 +00:00
nia b073515511 paranoia: use explicit_memset 2021-10-12 12:11:04 +00:00
nia b4ff5a1e43 pw_gensalt.3: add argon2 bits 2021-10-12 12:03:47 +00:00
nia 88cf501805 crypt-argon2: Properly honor user's version number.
Follow upstream by defaulting to 0x10 if it's not specified.
2021-10-12 10:51:33 +00:00
nia d595d5c387 crypt-argon2: improve resilience of the parser.
Allow the version number to be unspecified as in the argon2 upstream
test suite, properly defaulting to a version if the v= block is
entirely missing, and treating the remaining block as parameters.

Fix a null pointer derefence when the encoded password is unspecified
in the settings string.
2021-10-12 09:40:38 +00:00
skrll 07347931de Fix the lib/libc/setjmp/t_setjmp:{,_}longjmp_zero test cases 2021-10-07 06:44:18 +00:00
andvar 50d9072672 remove duplicate the article in comments. 2021-10-04 21:02:39 +00:00
andvar e49c2d1bf9 remove duplicate the article in documentation. 2021-10-04 14:35:20 +00:00
christos a8d8435dfa remove parameter names from decls. 2021-10-01 20:13:38 +00:00
christos 0d258229ce PR/56424: Clay Mayers: recvfrom() is not a cancelation point as documented
in pthread_setcanceltype.3
2021-10-01 17:13:44 +00:00
christos 30d43af96b kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fork(2)s and calls getaddrinfo(3) again might end up closing
that cached file descriptor which can end up pointing to a different
file object than the kqueue(2) original one. To fix this, associate
the kqueue(2) file descriptor with the process id that created it,
and don't close(2) it if it is being closed from a different process.
An alternative fix would be to attach the resolver to a fork(2) hook
to cleanup the res_state, but handling it internally in the resolver
is less intrusive. This was discovered by Dima Veselov when using
the FreeRADIUS package.
2021-09-30 12:35:55 +00:00
kim ab14361c39 Remove duplicate tm_isdst. Fixes PR misc/56419 for HEAD. 2021-09-28 06:45:08 +00:00
christos 02a0eff7c2 make flag unsigned to match prototype of the function used 2021-09-26 13:45:54 +00:00
christos 5679adf871 - Completion should not add a quote at the end of the line to match an
already quoted quote. (Piotr Stefaniak)
- fix lint unconst warnings for strchr
2021-09-26 13:45:37 +00:00
uwe b2936eaaca Spell the number of nanoseconds as 10^9. Forgotten in previous. 2021-09-23 13:59:27 +00:00
uwe bdf1f075ab Minor markup tweaks. 2021-09-23 13:58:26 +00:00
uwe 2d69b1f036 Spell the number of nanoseconds as 10^9.
10^9 is 1e9 (it's "e" that spells 10 here), not 10e9.  The target
audience of this man page is not likely to be very fluent in floating
point, so avoid significand/exponent spelling and use the spelling
that it is familiar with.
2021-09-23 13:49:59 +00:00
uwe 0659be6c07 Markup fixes. 2021-09-23 13:16:13 +00:00
wiz 39710f2616 printf(3): mention snprintb(3) 2021-09-23 12:17:57 +00:00
andvar 5e3df9b71e s/Plese/Please/ in comment, and fix an article in obio_wdc.c comment. 2021-09-19 20:52:47 +00:00
wiz 3bbb788fd6 Sort errors, remove extra comma. 2021-09-19 17:10:41 +00:00
thorpej e714af64e3 Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.
2021-09-19 15:51:27 +00:00
andvar c46bd13f44 some love to double letters (in comments). 2021-09-17 08:13:06 +00:00
christos fa0758113b Robustness fix: handle libraries that contain . in their basename. 2021-09-17 02:12:16 +00:00
andvar b58602814f fix typos in word "successful". 2021-09-16 22:19:10 +00:00
andvar 72e44f84cb fix typos in word "successfully", mainly s/succesfully/successfully/. 2021-09-16 21:29:41 +00:00
andvar b780d9b67b fix various typos, mainly in comments. 2021-09-16 20:17:46 +00:00
andvar 80f2027016 sysinst/partitions.h: fix typos comments, also fix same typos in other files. 2021-09-11 21:30:46 +00:00
andvar 207defd036 Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
2021-09-11 20:28:03 +00:00
rillig 7f8984330e popen.3: move popenve from BUGS to HISTORY 2021-09-11 19:58:24 +00:00
rillig 26b8655ee8 fseek.3: fix grammar 2021-09-11 18:46:22 +00:00
christos 70764037a3 Ignore failed closes (if for example a closed file descriptor is passed as
a starting point). This is how the kernel behaves.
2021-09-11 14:23:04 +00:00
christos 42a6419698 remove fake closefrom() 2021-09-11 14:22:12 +00:00
rillig d539a31d62 librumphijack: fix typo for NetBSD < 5.99.7 2021-09-11 08:32:11 +00:00
christos 0c63703b78 Ignore closefrom(3) for now; too complicated to descern between regular
and rump fds.
2021-09-10 21:22:05 +00:00
christos 86d9720796 - implement pselect so that the ssh test has a chance to work
- 1 -> EXIT_FAILURE
- more info about fds
2021-09-10 20:33:38 +00:00
rillig b52ed19590 libedit: fix indentation
No change to the resulting object files.
2021-09-10 18:51:36 +00:00
christos 4fd19b1be2 Add an LLVM fuzzing wrapper for the portable libedit (Christian Holler) 2021-09-10 13:33:45 +00:00
christos 9b290a25b2 rl_startup_hook should be called each time. From Carlos Henrique Lima Melara 2021-09-10 13:29:06 +00:00
christos d6da975b02 fix memory issues found by fuzzing (double frees and buffer overflows) 2021-09-09 20:25:30 +00:00
christos e2b95d2cb4 Add casts to appease conversions between wchar_t and wint_t 2021-09-09 20:24:07 +00:00
rin a1122fa99f Do not compile in whole fileio.c for LIBHACK.
Fix build failure when built as libhack, due to missing fileio.h.

IMO, this should be cleaner than generating fileio.h for {get,put}win(3),
that are useless for install media.
2021-09-07 12:36:57 +00:00
rin 43ea4784d7 PR lib/56388
For __newwin() and __resizewin(), the line hash was calculated as if
HAVE_WCHAR is disabled.

Fix this bug by refactoring __hash_line() function, which calculates
the line hash by an appropriate method.
2021-09-07 01:23:09 +00:00
rin 31a83dd923 Always autogen fileio.h.
Bump CURSES_LIB_MAJOR.CURSES_LIB_MINOR to 9.0 belatedly.
2021-09-06 15:17:25 +00:00
rin b09154d5e3 Style fixes most for __CTRACE(). 2021-09-06 07:45:48 +00:00
rin e149a10083 Unifdef DEBUG for CTRACE(). 2021-09-06 07:08:25 +00:00
rin 0bd3a62045 Expand __CTRACE() to __nothing #ifndef DEBUG.
Remove most of #ifdef DEBUG around __CTRACE() calls.

No binary changes, except for line numbers for assert().
2021-09-06 07:03:49 +00:00
rin 39c0485813 Fix old-style definition: curses_version() --> curses_version(void) 2021-09-06 02:50:43 +00:00
rin 19d0649ccf Fix old-style definition: use_default_colors() --> use_default_colors(void) 2021-09-06 02:48:54 +00:00
andvar f9faf20aef fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/ 2021-09-03 21:54:58 +00:00
christos 472ef8cc35 Try to refactor this in order to correct some of the memory issues
reported by Christian Holler.
2021-09-03 12:20:38 +00:00
christos cd15afc9e3 Remove lint workarounds 2021-08-30 13:12:16 +00:00
christos 6f436dc7ea Add a changes file 2021-08-30 09:18:17 +00:00
rillig 647ce63dda libc: suppress lint warning for namespacing mismatch for _mcount
This is the last remaining instance of lint warning 215, which is about
implicitly defined functions.  Since C99, these implicit declarations
have not been allowed anymore.
2021-08-29 16:44:16 +00:00
christos 152732a385 ^W is traditionally bound to ed-delete-prev-word and not kill-region
^R is traditionally bound to em-inc-search-next and not redisplay
This is what mksh, zsh bash, readline do (Baptiste Daroussin)
2021-08-29 09:41:59 +00:00
christos 6cac535e17 Respect $EDITOR when execution one (Baptiste Daroussin) 2021-08-28 17:17:47 +00:00
rillig b18bad8f33 libterminfo: remove redundant lint annotations
Since 2021-02-28, lint does not warn about constant conditions if they
involve sizeof.

The fallthrough annotations have never been necessary for case labels
that directly follow each other.
2021-08-27 18:40:28 +00:00
andvar 626fac18a1 s/priviledge/privilege/ in comments/log messages and fix one typo in descriptor. 2021-08-22 20:18:39 +00:00
andvar c69f42d323 fix mainly same typos as in my previous commit but outside sys/dev/dm. 2021-08-21 23:00:30 +00:00
christos 5b29c67870 PR/56370: mirabilos: libedit change from 2017 kills history in gdb 2021-08-21 12:38:56 +00:00
christos 7f1c6a0bae Add more api to make gdb-11 happy (but not gdbtui as usual) 2021-08-21 12:34:59 +00:00
andvar 60f3bf6a63 s/memry/memory+s/softare/software/+s/grapics/graphics+s/ouput/output 2021-08-19 20:56:36 +00:00
rillig e1288720a9 libedit: simplify calls to macro ADD_STRING
The lint comments CONSTCOND and LINTED were not necessary.  It is
simpler to just specify what to free.  GCC optimizes free(NULL) to be a
no-op.

No functional change.
2021-08-15 22:22:52 +00:00
rillig b6c4620261 readline: fix lint warning about effective unconst cast
Calling strchr to avoid the syntactical unconst cast is not necessary
here.  A simple pointer assignment is enough.

No functional change.
2021-08-15 22:14:45 +00:00
rillig 54391ee928 libcurses: fix usage of __warn_references
Since that macro can expand to an empty token list, it adds its own
semicolon as needed.  Removing the extra semicolon fixes the lint
warnings about empty declarations.  These empty declarations are a GCC
extension.
2021-08-15 15:12:36 +00:00
christos 596ba706cc This is a mess; always define MB_LEN_MAX so both the regular and libhack
version of curses compiles. Really we should not be defining MB_LEN_MAX here,
and include <limits.h> in curses_private.h to get it.
2021-08-15 12:39:39 +00:00
christos 9494102ed0 need limits.h 2021-08-15 11:54:12 +00:00
christos 1ac1056e8d Use MBL_LEN_MAX (constant) so that SSP works 2021-08-15 11:44:39 +00:00
wiz 81d6c9b9d7 Add verb to sentence. 2021-08-15 10:12:54 +00:00
christos da69b70b9f Disable attempts to handle EINTR and non-blocking I/O by default. It is
confusing to other programs and unexpected behavior. Reported by Ingo Schwarze.
This behavior is now controlled with EL_SAFEREAD.
2021-08-15 10:08:41 +00:00
christos c191adf61d Add a LINTED comment... Why doesn't NOTREACHED work? 2021-08-15 10:06:32 +00:00
andvar fbe76588ee fix typos in "environment" word. 2021-08-12 20:53:18 +00:00
christos 5aee859e4d cast from strchr fixed. 2021-08-11 09:12:07 +00:00
rillig 80321d1c1f libpam: clean up LINTFLAGS
Warning 346 is new, the other suppressions are not needed anymore.
2021-08-11 05:23:05 +00:00
andvar 6584ea569e fix various typos in compatibility, mainly in comments. 2021-08-09 20:49:08 +00:00
nia 213aa76def introduce a SOL_LOCAL for unix-domain socket level socket options
as an alias of the current 0 used for these options, as in FreeBSD.

reviewed by many.
2021-08-08 20:54:48 +00:00
dholland 22cff1a7de typo 2021-08-07 03:17:23 +00:00
andvar 461f07c9e2 fix typos in puffs man pages. 2021-08-04 09:31:25 +00:00
nia 083e568bb3 curses: clarify standout as the "best" _supported_ highlighting mode
of the current terminal
2021-08-03 07:58:50 +00:00
andvar f09c75af85 fix typo in README.compileopts text. 2021-08-02 17:45:10 +00:00
nia e8507174be curses: clarify documentation regarding the standout attribute 2021-08-02 11:11:20 +00:00
andvar 4b2769fe52 fix typos in word "otherwise". 2021-08-01 15:29:29 +00:00
andvar e16cbc3889 s/dependend/dependent/ 2021-07-31 20:51:32 +00:00
wiz 81a3b6c7f2 Fix typos, improve wording. 2021-07-28 11:29:59 +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
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
rin 76020b2c7d Improve previous:
- Add suffix ``d'' for mkdep(1).
- Improve comment a little...
2021-07-26 12:49:13 +00:00
simonb 1045db0b2f Update to reflect current reality for template characters - the process
ID is not longer used and we replace each "X" with one of 64 values not
26 values.
2021-07-25 08:52:03 +00:00
rin 043dd10516 For evbppc, use C version of bcopy(3), memcpy(3), memcmp(3), and
memmove(3) consistently for debug library (*.go) in order to avoid
alignment faults for 403.
2021-07-24 05:27:25 +00:00
christos 83df97c2da revert changes to fflush.c (1.18) and fvwrite.c (1.25) until we investigate
collateral damage. Breaks h_intr.c test. Requested by RVP.
2021-07-22 17:08:15 +00:00
tnn cadd46023e libm: build fma(3), fmaf(3), fmal(3) on alpha
Alpha has no hardware-assisted fused multiply-add, so the fallback
C implementation must be used. A basic smoke test shows the
implementation works for
"x * x - 1.0f" vs "fmaf(x, x, -1.0f)" with "volatile float x = 1.0008f;"
2021-07-21 12:05:02 +00:00
christos 9aa2b02710 Match the declaration in <sys/kauth.h> 2021-07-19 10:30:36 +00:00
christos 8b5d7e93ef There's no need to adjust `iov' in the error path.
Returning the amount written is all that's needed.
from RVP
2021-07-19 10:00:32 +00:00
christos 60a1ed1f7a When fflush fails, adjust pointers and the io vectors. From RVP. Fixes
core-dump at cvs(1) exit(3).
2021-07-16 12:34:10 +00:00
christos 5291651b6a Via Jess Thrysoee, from Adrian Bunk: Fix libedit build on Linux/Alpha
Alpha is the only Linux architecture that has SIGINFO:
    https://sources.debian.org/src/manpages/5.10-1/man7/signal.7/#L522

But even on Alpha Ctrl-T is not supported, and therefore no VSTATUS:
    https://sources.debian.org/src/manpages/5.10-1/man3/termios.3/#L603-L608

For consistency check both signal existence and character existence
2021-07-14 07:47:23 +00:00
kre 144bb499f5 Make sure dd_size is init'd, even when nothing has been read (so it
will be 0).   Reported on tech-userlevel by Mouse 20210711T044753+0000
2021-07-11 16:30:41 +00:00
christos ace315b97a Don't adjust the buffers when write returns 0. This happens with fmemopen
and other synthetic write functions. This fixes the unit-tests for fmemopen,
but adjusting should be the right behavior for all cases?
2021-07-09 09:24:16 +00:00
christos c90ee0ee4a Include the 0 return from write. Although the real write system call does
not return 0, the synthetic writes from funopen/fmemopen could. This avoids
infinite loops in >= test19 in fmemopen, but the tests still fail, perhaps
because they assume the previous behavior, where flush does not adjust the
stdio pointers on error.
2021-07-08 15:44:44 +00:00
christos f280538df1 Obey EINTR and return immediately adjusting for unwritten. From RVP 2021-07-08 09:06:51 +00:00
christos 170ddb4aae Handle EINTR, from RVP. 2021-07-06 14:22:16 +00:00
thorpej 276edc129d Ensure that the stack is always 16-byte aligned by rounding sizes as needed.
All changes from rin@ except swapcontext.S, which is from me (added
symbolic constants to make the code clearer).
2021-07-06 12:38:40 +00:00
christos 28c1b2fc8a Account for partial writes when interrupted (from FreeBSD). 2021-07-05 07:26:00 +00:00
rillig 9034303f18 libc: remove special handling for lint
In namespace.h 1.102 from 2005-07-16, the #ifndef was added to fix the
broken lint2 pass.  Somewhere between 2005 and now, lint has been
changed so that it does not need this workaround anymore.

After usr.bin/xlint/lint1/tree.c 1.303 from 2021-06-30, the #ifndef in
namespace.h caused the only warning about an implicit function
declaration in the whole NetBSD tree, in lib/libc/gen/sysconf.c:149,
where _getpagesize was not defined, but only getpagesize.
2021-07-04 16:18:50 +00:00
christos 155cd70e85 PR/56246: Yuichiro Naito: gprof(1) never show call graphs when profiling
multi-threaded application
2021-07-03 14:08:55 +00:00
skrll 45433ea2c3 Do previous differtly by pushing two registers in the same way as the
_INVOKE_CERROR macro
2021-06-30 21:20:29 +00:00
skrll 2cf21d216b The _INVOKE_CERROR macro deals with thumb so simplify the code (at the
expense of a couple more instructions).
2021-06-30 07:36:05 +00:00
skrll 9b62cdeb3a Trailing whitespace 2021-06-30 07:34:24 +00:00
rin c1d0bd11b7 Fix previous. For Thumb-1:
- sp cannot be manipulated directly
- {add,sub}s should be used instead of {add,sub}
2021-06-30 00:00:49 +00:00
rin 2251279c7d Align sp to 8-byte boundary as required by EABI.
IIUC, this change only affects libc compiled for ``Thumb-mode userland'',
which we've not officially supported yet.
2021-06-29 23:29:12 +00:00
pgoyette 74007e33ee Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE.  This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
  of MII_STR_oui_model definitions and use of oui and model rather than
  vendor and product.  This also changes the compressed data in the
  xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
  digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
  very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
  DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
  xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
  (to deal with the vendor/product vs oui/model issue), we need to
  make sure it gets compiled with -Wno-error=format-nonliteral, even
  in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO).  This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.
2021-06-29 21:03:36 +00:00
blymn d08b4150a2 Fix PR lib/55931
Only reset outcol if we actually emit a \n as cursor_down may not may
not put the cursor at the start of the next line.
2021-06-27 23:57:08 +00:00
christos 30911e5794 Fix SSP build 2021-06-27 16:24:52 +00:00
martin 042ecb94ba Fix printf format for size_t 2021-06-24 15:41:25 +00:00
blymn 5e680e5b3e Make sure we don't use wide char routines when DISABLE_WCHAR is in
effect.
2021-06-24 05:53:05 +00:00
blymn 73328adf3a Rework the fix for lib/56224.
Move the scroll check to _cursesi_addwchar
Perform the scroll check before updating the cursor location when
processing \n.
2021-06-22 07:49:09 +00:00
blymn e5cd7ade44 Fix how the slk are drawn by making sure we use ins_wchar in the
bottom left of the screen to avoid a scroll because this may cause
an ERR if scrollok is false.
2021-06-22 07:26:45 +00:00
blymn e204b5b4b7 Fix the debug output to stop spamming out the aline for row 0, we
may not be working on that row so the output is pointless.
2021-06-22 07:22:44 +00:00
christos 3151045394 fix proplib deprecation 2021-06-21 03:04:27 +00:00
christos 747b089bcb PR/56260: Alex Richardson: Out-of-bounds stack read in lib/libc/gen/vis.c
Also sync with other FreeBSD changes.
2021-06-18 10:57:14 +00:00
rin 749cec1f31 PR port-arm/55897
Fix ABI mismatch for armhf runtime routines for floating-point arithmetics;
For hard-float arm variants, provide

(1) generic runtime routines with correct calling convention, and
(2) EABI runtime routines at the same time.

I've confirmed that no binary changes for kernels.

LGTM by skrll
2021-06-16 05:21:08 +00:00
blymn 98f6983ffd Correct a previous fix for PR lib/56224.
Use wdwitch to determine the width of a wide character on the screen not
the number from mbrtowc which is the number of bytes in the character.
Thanks to Michael Forney for spotting this.
2021-06-15 22:18:55 +00:00
christos 71acbe78a8 PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core
Don't write to ((char *)malloc(size))[-1];
2021-06-15 10:56:52 +00:00
mcf 21db06c179 Add missing newline to debug trace message
ok blymn@
2021-06-10 07:15:40 +00:00
nia 5f6355cc9e ossaudio(3): continue getting capabilities if AUDIO_GETFORMAT fails
we want this to work on mixer devices too
2021-06-09 14:49:13 +00:00
nia 1cb651a104 vfork.2: clarify posix_spawn recommendation, pointed out by kre 2021-06-09 06:00:16 +00:00
nia 200ab436dc ossaudio(3): nested switch statements are hard to read, refactor 2021-06-08 19:26:48 +00:00
nia 8170080d8e ossaudio(3): refactor library into separate files 2021-06-08 18:43:54 +00:00
nia f8ad651614 vfork.2: recommend posix_spawn instead 2021-06-08 16:15:11 +00:00
hannken 32a2fc002c Document NFSSVC_REPLACEEXPORTSLIST instead of NFSSVC_SETEXPORTSLIST.
The latter is deprecated and kept only for backwards compatibility.
2021-06-08 10:02:04 +00:00
blymn 7a398f9f51 Fix for PR lib/56224
Correct addstr behaviour so it truncates the string in the case where
a string is added on the bottom line of a window where scrolling is
disabled as per the SUSv2 specification.
2021-06-06 05:06:44 +00:00
mcf bd85fcf225 Fix initial line hash calculation for subwindows
lp->hash is not initialized at this point. Since the hash is
calculated in chunks using __hash_more(), it needs to be initialized
to 0 first (just as in doupdate()).

Detected with valgrind while running python's test suite when
debugging an unrelated issue.

ok uwe@
2021-06-01 00:59:01 +00:00
joerg 9f6850785e Don't warn about frame pointer use for clang either. 2021-05-30 02:24:05 +00:00
nia 70294c72b4 wresize: don't bound pads to the size of the screen
allows avoiding a workaround in aiomixer,

ok blymn uwe
2021-05-29 09:11:14 +00:00
thorpej 2a8eed4fde POSIX sez:
The longjmp() function shall not cause setjmp() to return 0; if val
    is 0, setjmp() shall return 1.

Fixes the _longjmp_zero and longjmp_zero test cases in the t_setjmp
test on alpha.
2021-05-25 00:14:41 +00:00
riastradh 2b70a4d80e Clarify what happens when you longjmp(..., 0).
Derived from C99 7.13.2.1 `The longjmp function'.
2021-05-24 23:59:59 +00:00
kre 53e5e3df7a PR bin/56042
Fix typos (2nd acst should have been acdt), 0550 for ist should be 0530
(5.5 hours is not 5 hours and 50 minutes...).

Comment out the zp4 zp5 and zp6 zone names.   They are supposedly supported
by the source (they're in the table) but cannot work, as the parsedate
lexer doesn't allow a "word" to start with an alpha and also contain
digits.   Maybe (just maybe) that could be fixed sometime, but since these
have never worked, and no-one has ever seemed to miss them, and they're the
only words which are of that form, for now, just stop pretending they work.
2021-05-16 19:42:35 +00:00
uwe 21d563f5dc __newwin - fix BGWCOL initialization.
From Michael Forney in PR lib/56174
2021-05-15 11:06:07 +00:00
nia 6383164a17 ossaudio: Set handle on OSSv4 mixer devices 2021-05-09 12:51:45 +00:00
nia 5d7326fb2a libossaudio: Various OSSv4 fixes to allow reference programs to compile
- Define various new AFMT_*. These are not returned as supported
  formats by SNDCTL_DSP_GETFMTS, because it would be very silly to
  have Vorbis in the kernel.

- Implement PLAYTGT and RECSRC. For each NetBSD audio device
  we only return one playback and recording source, "primary".

- Return preferred channel configuration in capabilities.
  Either DSP_CH_STEREO, DSP_CH_MONO, or DSP_CH_MULTI
  depending on the current hardware format.

- SNDCTL_DSP_HALT_* simply flushes the audio device.
2021-05-09 11:28:25 +00:00
mrg ef48836c2e avoid accessing stack garbage.
on arm64eb resuming vi(1) would often crash.  in makech(), the 'csp'
variable is either set to current window data, or a local stack
variable's address '&blank'.  the window data has many lines of info
stored, and 'csp++' is used per line here.  unfortunately, a case
existed where 'csp++' operated on csp initialised from '&blank' which
eventually crashes when, on my display with 160 columns and 'csp + 155'
exceeds the mapped stack and crashes.

match the '!_cursesi_screen->curwin' conditional that initialises csp,
and avoid csp++ here.  assert() that csp != &blank in both places that
modify csp.

thanks to jdc@ and mlelstv@.

XXX: possibly also should avoid the putch() here as well.
2021-05-08 04:29:07 +00:00
christos 9feb722ead PR/56148: Andreas Gustafsson: lib/libc/stdio/t_printf:snprintf_float test
randomly fails.
Add checks to all places where lshift is called because it can return NULL
2021-05-06 16:15:33 +00:00
christos 20fa0b90d9 PR/56147: Miroslav Lichvar: Avoid memory leak if strdup fails. 2021-05-05 14:49:59 +00:00
simonb e85380d6f9 Add links for the other functions documented in arc4random(3). 2021-05-03 11:07:55 +00:00
simonb 0cdd944264 Whitespace police. 2021-05-03 08:30:30 +00:00
mrg 1c682a68c9 use GCC_NO_IMPLICIT_FALLTHRU. 2021-04-26 07:17:30 +00:00
christos e8ee02e023 Use ${MACHINE_MIPS64} 2021-04-25 23:43:20 +00:00
christos 185787c65b PR/56120: Chris Pinnock: build.sh (-m alpha) release fails on current on
Darwin in libc compilation
We build the regex code in tools without nls. We don't include any nls headers
for that, but on Darwin wint_t gets defined, so we end up with a compilation
error. The cleaner fix would have been to always use regex_foo_t types, but
the minimal fix is to only do this for the tools build, using cpp.
2021-04-22 19:20:24 +00:00
christos c510facea2 Instead of compiling files with -fcommon, create an include file and declare
the 3 symbols that need to be common using an attribute. Put all the 3 symbol
definitions in libc in one place (initfini.c). Reviewed by joerg@
2021-04-20 21:42:31 +00:00
mrg 403c2981b5 for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.
2021-04-14 08:07:49 +00:00
christos 0cf983201b - fix memory leak
- xxx questionable allocation
- remove casts
- use sizeof(*var)
- bcopy -> memcpy/memmove
2021-04-13 13:13:03 +00:00
mrg 98c521ff90 fake-use alloca()'s return value to quieten -Werror=unused-result 2021-04-13 00:31:54 +00:00
mrg 6c68c9665f allocate the potential trailing nul as well. 2021-04-13 00:29:42 +00:00
mrg 02402fe110 pass dest buffer size to strncpy() and ensure nul termination. 2021-04-13 00:29:22 +00:00
mrg 23b921d781 pass the right enum to krb5_auth_con_setkeytype(). 2021-04-12 09:17:48 +00:00
mrg 43e80ef7a6 avoid an unlikely buffer truncation. 2021-04-12 09:17:10 +00:00
mrg 72aaaacc35 add a default: case to __kernel_standard(), failing with EDOM 2021-04-12 09:15:52 +00:00
mrg 7e5e03e2b7 new GCC_NO_* uses for warning issues. most of the users of the new
GCC_NO_RETURN_LOCAL_ADDR are bugs in GCC itself, not the code.
2021-04-12 06:08:30 +00:00
mrg 4084f973da use -fcommon where necessary. 2021-04-12 03:57:06 +00:00
jkoshy 3d43236771 Avoid duplicate directory traversals when building Elftoolchain sources. 2021-04-09 20:49:05 +00:00
jkoshy d2544b1c1b Redo r1.288: traverse the complete imported Elftoolchain tree during a build. 2021-04-08 08:10:30 +00:00
jkoshy ffb100ca4c Attempt to unbreak the build by reverting r1.288. 2021-04-06 21:13:04 +00:00
jkoshy f42f5ef49e Traverse the complete imported Elftoolchain tree during a build. 2021-04-06 20:13:43 +00:00
reinoud e0d9d410b7 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.

This is the missing libnvmm part I forgot to include in the origional commit.
2021-04-06 08:40:17 +00:00
simonb 8fab31f439 For MIPS N32, register_t needs to be uint64_t as "long" isn't
big enough.
2021-04-03 07:38:11 +00:00
rillig bc7a3fe21e libc/gen: fix hack for previously unsupported lint initializers
Supported since init.c 1.182 from 2021-03-30.
2021-03-30 15:31:51 +00:00
christos ba06fc1c94 Only unescape when we are quoting and don't add a space if we are quoting
(we already did) (Piotr Stefaniak)
2021-03-28 13:39:39 +00:00
christos 1740d9142b document the flag 2021-03-28 13:38:10 +00:00
christos b94551931c Pass the unescaped filename the the append function so it has to do less work
(for example it can call stat(2) directly (Piotr Stefaniak)
2021-03-28 13:33:54 +00:00
dholland 2ab5b263a3 Document EINVAL for out of range socket address lengths.
This is what happens, but wasn't documented. Applies to bind(2),
connect(2), and send(2).
2021-03-28 03:29:31 +00:00
dholland 7ec5b82b08 In getvfsstat(2), clarify that the size argument is in bytes.
That the size argument is in bytes (not the count of structures) and
the return value is the count of structures (not bytes) is
counterintuitive.
2021-03-27 23:35:37 +00:00
christos 65371df829 Add fn_complete2() that controls the quoting of the returned match.
Before it was based on the heuristic that we were not supplied an
attempted_completion_function, which worked well because programs
that supplied that function were not shells and did not want/understand
shell quoting. Recently though Piotr Stefaniak wanted to enhance command
completion for the Bourne Shell and this could benefit quoting the returned
command. This function adds an extra flags argument that controls that quoting.
2021-03-27 18:55:02 +00:00
mrg f96996de73 note that ttyaction.[35] first appeared in netbsd 1.3. 2021-03-21 23:29:36 +00:00
christos ef57a5cc6b simplify expression, daemon is an array can't be NULL. 2021-03-18 01:49:09 +00:00
wiz b891559281 Remove superfluous article. 2021-03-17 08:13:29 +00:00
dholland 7e9db02257 Clarify use of open flags in open(2).
(Avoid using values of three that are equal to four.)
2021-03-17 08:04:39 +00:00
nia 53793f01c2 ossv4 mixer API: be extra careful with the inputs to AUDIO_MIXER_READ.
some drivers (not hdaudio(4), but uaudio(4), eap(4), sb(4), various other
old cards) will return error if a AUDIO_MIXER_VALUE is requested and the
number of channels is not specified as input. this is not documented as
well as it should be, unfortunately.
2021-03-15 10:58:05 +00:00
christos 9c2966c186 record the libblocklist dependency 2021-03-13 16:46:49 +00:00
christos d48a1fa0b9 Underscore is a word character (thanks uwe@) 2021-03-11 18:49:18 +00:00
wiz 4481672ffb Remove trailing whitespace. 2021-03-11 17:13:29 +00:00
christos be8d4886f8 improve wording. 2021-03-11 16:36:41 +00:00
christos 0ad4def4b8 Document the "C" language escapes supported in GNU mode. 2021-03-11 15:12:51 +00:00
christos 259eea82c4 recognize the "C" language backslash escapes like gnu does (except b which
is already taken)
2021-03-11 15:00:29 +00:00
msaitoh 44f4353477 s/skiping/skipping/ 2021-03-11 01:13:11 +00:00
christos 9c2964a923 Use __pthread_volatile for ptc_waiters (Greg A. Woods) 2021-03-10 15:05:11 +00:00
simonb b2de856f1a Add manpage links for asysctl(3) and asysctlbyname(3), already described
in sysctl(3).
2021-03-10 13:30:34 +00:00
christos e24596a734 cast to the proper enums for lint 2021-03-08 17:34:10 +00:00
christos b7a595bc61 fix missing chars 2021-03-07 20:54:41 +00:00