Commit Graph

19104 Commits

Author SHA1 Message Date
wiz
349b123f81 Use mdoc macros. 2018-04-05 11:07:00 +00:00
kre
deb0051437 Document opendisk1() - it has been around long enough.
(pity about the name...)

XXX pullup-8
2018-04-04 04:43:46 +00:00
ryo
fe33aa2786 Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)
- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
2018-04-01 04:35:01 +00:00
kamil
9ad30f3b4d Drop the USE_LIBTRE build option
libtre cannot be used any more as a replacement for regex(3).
Tt does not build and the library development is stalled in upstream.

Proposed on mailing list.

Sponsored by <The NetBSD Foundation>
2018-03-31 14:24:54 +00:00
joerg
2d65afd272 Move the complex logic for dynamically writing branches from ld.elf_so
into a header for reuse in crt0.o for static ifunc support. Change the
existing logic for sparc64 to use the Bicc variant of ba,a as it allows
+-8MB displacement compared to the BPcc variant's +-1MB. Teach the sparc
variant the same trick for using ba,a and not sethi+jmp when possible.
2018-03-29 13:23:39 +00:00
martin
4e1ffbe979 Add missing alias for ldexpl on ! __HAVE_LONG_DOUBLE architectures.
Pointed out by Hal Murray on port-arm.
2018-03-27 11:59:49 +00:00
roy
320ba6e2bf socket: report receive buffer overflows
Add soroverflow() which increments the overflow counter, sets so_error
to ENOBUFS and wakes the receive socket up.
Replace all code that manually increments this counter with soroverflow().
Add soroverflow() to raw_input().

This allows userland to detect route(4) overflows so it can re-sync
with the current state.
2018-03-19 16:26:25 +00:00
pgoyette
2461f62e8b Remove exgtraneous comma 2018-03-12 11:56:34 +00:00
eadler
736570df7c Fix signed overflow in atan2
As a component of atan2(y, x), the case of x == 1.0 is farmed out to
atan(y). The current implementation of this comparison is vulnerable
to signed integer underflow (that is, undefined behavior), and it's
performed in a somewhat more complicated way than it need be. Change
it to not be quite so cute, rather directly comparing the high/low
bits of x to the specific IEEE-754 bit pattern that encodes 1.0.

ok martin@ pgoyette@ maya@
obtained from FreeBSD
2018-03-10 09:44:47 +00:00
joerg
a64ef2fb9e Add ifunc support for statically linked applications on x86, ppc, sparc
and ARM.
2018-03-09 20:20:47 +00:00
christos
462103bc5a avoid negative shift 2018-03-06 01:14:41 +00:00
christos
0efaeed61f comment out unused variable. 2018-03-05 23:00:55 +00:00
kamil
570f001093 Remove PT_GET_SIGMASK / PT_SET_SIGMASK
These operations cloned Linux's specific PTRACE_GETSIGMASK / PTRACE_SETSIGMASK.
This feature was useful in applications like rr/criu/reptyr-like, where
the ptrace(2) interface is abused for the purpose of constructing an arbitrary
process. It's not reliable and not portable. For the NetBSD case it will be
better to invent something dedicated for serializing and deserializing a
process with threads.

Noted on tech-toolchain@ and blog entry

"LLDB restoration and return to ptrace(2)"
https://blog.netbsd.org/tnf/entry/lldb_restoration_and_return_to
2018-03-05 11:24:34 +00:00
lukem
287fdb86f8 PR/48585: Set errno when returning NULL for AF_INET
In inet_ntop4(), errno wasn't set before returning NULL.
Seems like an oversight in the existing fix for PR/48585.
Noticed by code inspection.
2018-03-02 06:31:53 +00:00
uwe
ce9b54992a PIC code clobbers %r30 so we need to update the saved oucp with
caller's %r30 manually.  Makes old context happy when it needs to do
more function calls after restore.

(oops, forgot to commit this along with swapcontext.S)
2018-02-28 21:00:02 +00:00
uwe
8e33e1ffff PIC code clobbers %r30 so we need to update the saved oucp with
caller's %r30 manually.  Makes old context happy when it needs to do
more function calls after restore.
2018-02-28 20:51:58 +00:00
christos
7767204c93 PR/53058: Nikhil Benesch: use correctly typed variables (wchar_t vs wint_t)
as parameters.
2018-02-26 17:36:14 +00:00
kamil
00e03d5b87 Document ragasub(3) & regnsub(3) implementation detail
Added note:
  Only 10 elements of the rm array can be used.

Sponsored by <The NetBSD Foundation>
2018-02-26 14:04:43 +00:00
chs
9f52f2295e remove hard-coded -fomit-frame-pointer for pthread stuff,
let these use the same setting as the rest of the tree.
the performance difference is marginal and this allows
dtrace ustack() to work better.
2018-02-25 18:51:18 +00:00
pgoyette
d831ae84a0 Remove extra "an"
Thanks to J. Lewis Muir
2018-02-22 08:33:43 +00:00
uwe
ecb11c8936 Consistenly use "host byte order". 2018-02-21 14:11:09 +00:00
wiz
c8f3c2c806 Fix endnetent prototype. Fix NULL. New sentence, new line. 2018-02-21 09:47:37 +00:00
kamil
01e8caecb0 Improve the getnetent(3) man-page
Document return type of setnetent(3) and endnetent(3). Both "void".

Sponsored by <The NetBSD Foundation>
2018-02-21 03:13:50 +00:00
uwe
9f4bd1d874 Markup "stdin". 2018-02-20 17:23:39 +00:00
uwe
250ec2c82f Make the list of STDBUF values and the list of mode values congruent
in formatting and spelling.
2018-02-20 17:21:11 +00:00
uwe
e41e0b24d7 Use semantic markup. 2018-02-20 17:16:51 +00:00
wiz
cb12e23020 Remove ineffective macros and arguments. 2018-02-20 09:36:26 +00:00
kamil
6dca39b9a1 Remove namespace restriction from pthread_condattr_{g,s}etclock(3)
These functions were marked as _NETBSD_SOURCE when introduced to the
sources. In fact they are regular POSIX threading functions available
since the 2001 standard. There is an older mention about alignment with
"IEEE Std 1003.1j-2000".

This corrects usage of these functions when a source code is compiled
with a POSIX namespace option.
2018-02-20 05:10:51 +00:00
kamil
9776919255 Improve the setbuf(3) man-page
Move historical lines to newly added HISTORY section.
Additional historical notes obtained from OpenBSD.
2018-02-20 02:52:41 +00:00
christos
5a7f327f24 Enforce that getpeereid only returns success on AF_LOCAL sockets, instead
of returning garbage for other socket types.
2018-02-16 19:21:49 +00:00
jakllsch
3f96c239a8 Fix __siglongjmp14().
Fixes SIGINT causing ksh to "longjmp botch", presumably due to incorrect
magic number.
cvs: ----------------------------------------------------------------------
2018-02-12 22:31:04 +00:00
wiz
5742f479cd Remove useless macros. Sort errors. 2018-02-11 13:30:55 +00:00
wiz
7f7561e0c4 Remove useless macro. 2018-02-11 13:28:49 +00:00
wiz
220a072a26 Remove Tn. Remove trailing whitespace. Remove useless Pp. 2018-02-11 13:28:26 +00:00
dholland
32cded6cc9 Typos. 2018-02-08 09:05:16 +00:00
christos
0f0387da88 Oops forgot one openssl version name change 2018-02-07 22:51:31 +00:00
maxv
26bc6e1cea Keep /dev/ksyms open in _kvm_open(). This way /dev/ksyms can be put into
$g_kmem without breaking the tools that need kmem+ksyms.

Discussed on tech-kern@ three weeks ago. The original issue was reported
by maya@, the patch was written by Tom Ivar Helbekkmo, ok christos@.
2018-02-07 14:03:18 +00:00
pgoyette
2829446e9d Fix typos, as reported by Eitan Adler. Update dates. 2018-02-07 11:16:05 +00:00
martin
eaf667a162 Bump date for previous 2018-02-07 09:59:56 +00:00
martin
c778dbed18 Fix typo, from Eitan Adler. 2018-02-07 09:55:35 +00:00
christos
97e40f12ae fix duplicate declaration of pthread_atfork in unistd.h 2018-02-06 20:22:23 +00:00
mrg
4146fd94aa copy the i386 workaround for amd64. 2018-02-05 22:12:37 +00:00
christos
6fec6006f2 pretend we have openssl-1.1 2018-02-05 11:57:28 +00:00
christos
04dc679937 Adjust to openssl 1.1 2018-02-05 00:43:06 +00:00
skrll
239256a2b3 lower case 'ret' to avoid macro clash 2018-02-04 18:32:31 +00:00
christos
0c048d5af5 switch everyone to openssl.old 2018-02-04 03:19:51 +00:00
mrg
8fdd01b3ee fixes for GCC 6:
- -Wstrict-prototypes is not available for C++, so don't try to
  ignore it for C++.
- remove many _DIAGASSERT() checks against not NULL for functions
  with arguments with nonnull attributes.  in two cases, leave
  code behind that should set defaults to "(null)".
- use -Wno-error=frame-address for i386 mcount, as it seems valid
  to assume the caller will have a frame.fair
2018-02-04 01:13:45 +00:00
christos
cf47161082 Merge tzcode2018c [ changelog with changes to tzdata sections removed ]
Release 2018c - 2018-01-22 23:00:44 -0800

  Changes to build procedure

    The build procedure now works around mawk 1.3.3's lack of support
    for character class expressions.  (Problem reported by Ohyama.)


Release 2018b - 2018-01-17 23:24:48 -0800

  Changes to build procedure

    The distribution now contains the file 'pacificnew' again.
    This file was inadvertantly omitted in the 2018a distribution.
    (Problem reported by Matias Fonzo.)


Release 2018a - 2018-01-12 22:29:21 -0800

  Changes to build procedure

    The default installation locations have been changed to mostly
    match Debian circa 2017, instead of being designed as an add-on to
    4.3BSD circa 1986.  This affects the Makefile macros TOPDIR,
    TZDIR, MANDIR, and LIBDIR.  New Makefile macros TZDEFAULT, USRDIR,
    USRSHAREDIR, BINDIR, ZDUMPDIR, and ZICDIR let installers tailor
    locations more precisely.  (This responds to suggestions from
    Brian Inglis and from Steve Summit.)

    The default installation procedure no longer creates the
    backward-compatibility link US/Pacific-New, which causes
    confusion during user setup (e.g., see Debian bug 815200).
    Use 'make BACKWARD="backward pacificnew"' to create the link
    anyway, for now.  Eventually we plan to remove the link entirely.

    tzdata.zi now contains a version-number comment.
    (Suggested by Tom Lane.)

    The Makefile now quotes values like BACKWARD more carefully when
    passing them to the shell.  (Problem reported by Zefram.)

    Builders no longer need to specify -DHAVE_SNPRINTF on platforms
    that have snprintf and use pre-C99 compilers.  (Problem reported
    by Jon Skeet.)

  Changes to code

    zic has a new option -t FILE that specifies the location of the
    file that determines local time when TZ is unset.  The default for
    this location can be configured via the new TZDEFAULT makefile
    macro, which defaults to /etc/localtime.

    Diagnostics and commentary now distinguish UT from UTC more
    carefully; see theory.html for more information about UT vs UTC.

    zic has been ported to GCC 8's -Wstringop-truncation option.
    (Problem reported by Martin Sebor.)

  Changes to documentation and commentary

    The zic man page now documents the longstanding behavior that
    times and years can be out of the usual range, with negative times
    counting backwards from midnight and with year 0 preceding year 1.
    (Problem reported by Michael Deckers.)

    The theory.html file now mentions the POSIX limit of six chars
    per abbreviation, and lists alphabetic abbreviations used.

    The files tz-art.htm and tz-link.htm have been renamed to
    tz-art.html and tz-link.html, respectively, for consistency with
    other file names and to simplify web server configuration.
2018-01-25 22:48:42 +00:00
christos
26ca7efe45 use named initializers 2018-01-25 03:54:21 +00:00
kamil
1bcc014257 Revert to commits as they broke few rump tests
"Include namespace.h in a few of libc source files
[...]
    This change finishes elimination of usage of the global name of the
    following symbols:
      - close -> _close
      - execve -> _execve
      - fcntl -> _fcntl
      - setcontext -> _setcontext
      - wait6 -> _wait6
      - write -> _write
      - writev -> _writev"

"Register more syscalls in namespace.h (of libc)

    Add weak symbols for:
     - fcntl
     - close
     - execve
     - setcontext
     - wait6
     - write
     - writev"

These changes broke:

    fs/nfs/t_rquotad:get_nfs_be_1_both
    fs/nfs/t_rquotad:get_nfs_be_1_group
    fs/nfs/t_rquotad:get_nfs_be_1_user
    fs/nfs/t_rquotad:get_nfs_le_1_both
    fs/nfs/t_rquotad:get_nfs_le_1_group
    fs/nfs/t_rquotad:get_nfs_le_1_user
    lib/librumphijack/t_config:fdoff
    lib/librumphijack/t_tcpip:http
    lib/librumphijack/t_tcpip:nfs
    lib/librumphijack/t_vfs:cpcopy
    lib/librumphijack/t_vfs:mv_x
    lib/librumphijack/t_vfs:paxcopy
    net/net/t_forwarding:ipforwarding_fastforward_v4
    net/net/t_forwarding:ipforwarding_fastforward_v6
    net/net/t_forwarding:ipforwarding_fragment_v4
    net/net/t_forwarding:ipforwarding_misc
    net/net/t_mtudisc6:mtudisc6_basic

This revert fixes the failures, except lib/librumphijack/t_vfs.

The original changes were added in order to facilitate a usage of
sanitizers against programs linked with NetBSD's libc. It is no longer
needed, so abandon these changes.

Sponsored by <The NetBSD Foundation>
2018-01-17 01:24:29 +00:00