Commit Graph

13683 Commits

Author SHA1 Message Date
joerg
e077d7edbf Ignore malformed directory entries as created by Dropbox ("/"). 2018-07-19 18:04:25 +00:00
maxv
5ae6235d0e Remove tpfmt(1). Its code was merged into tprof(8). 2018-07-13 11:14:14 +00:00
mrg
1b11df59cf don't try to decend into remove 'pmc' subdir. 2018-07-13 11:13:10 +00:00
maxv
696d8f99b2 Remove the usr.bin/pmc tool. People should use tprof instead. 2018-07-13 09:15:55 +00:00
christos
3a280067df Fix previous: cached_stats() returning < 0 means that the file is not found,
not that it was found in the cache, and centralize reporting.
2018-07-12 18:03:31 +00:00
reinoud
38c2b03323 Remove duplicate code in make(1)'s dir.c.
When the cached_stats() code was added, some old logic stayed around that
implements the cached_stats() too.
2018-07-12 17:46:37 +00:00
msaitoh
24a510d5b0 Print iqdrops, too. This change also fixes a bug that Odrops prints
iqdrops when kvm read failed.
2018-07-11 07:46:20 +00:00
christos
f4654072f5 recognize noinline attribute 2018-07-08 17:48:42 +00:00
kre
4bcba09122 Avoid printing error messages twice when an invalid
escape sequence (\ sequence) is present in an arg to a %b
conversion.
2018-07-03 01:56:39 +00:00
kre
a78ff1f90a From leot@ on tech-userlevel:
Avoid running off into oblivion when a format string,
or arg to a %b conversion ends in an unescaped backslash.

Patch from Leo slightly modified by me.
2018-07-03 01:54:42 +00:00
christos
9f321dce94 Add our syslog format. 2018-06-29 20:18:36 +00:00
christos
8910c94cf4 add missing args for 123 2018-06-29 20:18:05 +00:00
msaitoh
204f26c6d9 Print BPF direction correctly. 2018-06-26 10:00:25 +00:00
msaitoh
90fcd8faa4 Fix a bug that BPF_D_OUT isn't printed correctly. 2018-06-26 09:50:42 +00:00
msaitoh
3cd62456f9 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
2018-06-26 06:47:57 +00:00
kamil
2ca8c8d72f Specify SANITIZER_RENAME_SYMBOL in chpass
Rename local versions of getpwent getpwnam getpwnam_r getpwuid getpwuid_r
(all of the symbols are namespaced) in order to remove symbol clash with
libc.

This program uses code directly from libc.
2018-06-25 18:05:25 +00:00
christos
fd98358317 Don't require any arguments as the usage indicates; simplifies the code
and the documentation: now "jot" works like "jot -" used to (and continues
to). From Ingo Schwarze
2018-06-25 14:29:17 +00:00
kamil
b6ed70bb6e Add new option -s to crunchgen(1) -- enable sanitization
As of today typical sanitizers require dynamic executables, while
crunchgen(1) programs are produced with static properties.

Lack of specified -s will:
 - generate a Makefile file with NOSANITIZER=
 - build programs that are dependencies with NOSANITIZER=

In future there is an option to handle sanitization in statically linked
programs.

An idea with -s LGTM by <christos>
2018-06-21 10:55:54 +00:00
kamil
f4a6ea5271 Disable SANITIZER for ldd(1)
These utilities (elf32, elf32_compat, elf64, liblldb) share code with the
ELF dynamic loader that is not being sanitized and its symbols are
installed into sanitized programs (in particular __tls_get_addr()).

Additionally libldd is used in rescue that is not expected to be sanitized
as of today.
2018-06-21 10:41:45 +00:00
christos
a2ee17b347 Keep things portable (requested by joerg) by not depending on reallocarr
and instead doing the overflow check ourselves.
2018-06-18 18:33:31 +00:00
christos
759529ae76 PR/53368: Thomas Barabosch: Potential integer overflow in usr.bin/patch/inp.c 2018-06-16 00:40:14 +00:00
mrg
2951cf94c8 move 'utsname' to the main() function scope, so that the reference to
it outside the block remains valid.

should fix an asan reported issue.
2018-06-15 20:16:35 +00:00
christos
88efda49f6 remove extra quotes. 2018-06-12 15:41:35 +00:00
christos
bf830a4102 - instead of hard-coding the include paths in mkioctls, pass them in
from the Makefile so that they are consistent.
- do more sed so that destination paths are not hard-coded inside #include
  statements.
2018-06-12 15:40:39 +00:00
kamil
2760f15b81 Correct Undefined Behavior in gzip(1)
Unportable left shift reported with MKSANITIZER=yes USE_SANITIZER=undefined:

# progress -zf ./games.tgz  tar -xp -C "./" -f -
/public/src.git/usr.bin/gzip/gzip.c:2126:33: runtime error: left shift of 251 by 24 places cannot be represented in type 'int'
100% |****************************************************************************************************************| 44500 KiB  119.69 MiB/s    00:00 ETA


Refactor the following code into something that is more clear
and fix signed integer shift, by casting all buf[] elements to
(unsigned int):

unsigned char buf[8];
uint32_t usize;
[...]
else {
    usize = buf[4] | buf[5] << 8 |
            buf[6] << 16 | buf[7] << 24;
[...]

New version:

    usize = buf[4];
    usize |= (unsigned int)buf[5] << 8;
    usize |= (unsigned int)buf[6] << 16;
    usize |= (unsigned int)buf[7] << 24;

Only the "<< 24" part needs explicit cast, but for consistency make the
integer promotion explicit and clear to a code reader.

Sponsored by <The NetBSD Foundation>
2018-06-12 00:42:17 +00:00
kamil
1c426e1841 Restore the MKGROFF=bo MKCXX=yes build
Mark the documentation in dc(1), gprof(1), rogue(6) and fsck_ffs(8) with
the .roff flag in SUBDIR.

Sponsored by <The NetBSD Foundation>
2018-06-11 14:18:16 +00:00
christos
2357fc5dd5 use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
nat
911089b591 Update fstat for audio(4) and pad(4) devices.
XXX - pullup 8.

Ok christos@.
2018-06-04 01:42:49 +00:00
kamil
6d98e3fd29 ktruss: Remove symbol clash with libc
Rename local function wprintf() to xwprintf().
This is needed for installing interceptors in sanitizers.

Sponsored by <The NetBSD Foundation>
2018-06-03 13:41:30 +00:00
mrg
446e08b1e8 just include <sys/mutex.h> for mkioctls. this works fine for me
for several platforms and fixes the clang build.
2018-06-02 20:07:15 +00:00
jnemeth
bb57c3804f Update calendar files for the upcoming NetBSD 8.0 release. I'm
assuming that it will be released by August 1, which is two months
from now.  Thus I used 2018 dates for all holidays between Aug.
1st and Dec. 31st, and 2019 dates for all holidays between Jan.
1st and Jul. 31st.
2018-06-02 05:55:47 +00:00
martin
b30263c2e7 Use proper forward declaration for kmutex_t. This makes MKDTRACE=no builds
work again.
2018-05-29 14:29:53 +00:00
martin
351fd74422 Ooops, backout previous - it was an update build artifact (or something) 2018-05-29 13:10:28 +00:00
martin
2e95568bb1 Backout previous: "typedef void *kmutex_t;
is incompatible with our kmutex_t and breaks the build. ZFS will need
to find a better way to work around this.
2018-05-29 11:18:50 +00:00
wiz
b41d19c5ae Remove superfluous Pp. 2018-05-29 08:37:33 +00:00
kamil
954aa6d69d After Todd C. Miller[0] - cal(1) first appeared in Version 1 AT&T UNIX[1][2].
[0] http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/cal/cal.1?rev=1.28&content-type=text/x-cvsweb-markup
[1] https://www.bell-labs.com/usr/dmr/www/1stEdman.html
[2] https://www.bell-labs.com/usr/dmr/www/man61.pdf

Patch submitted by @rjc via https://github.com/NetBSD/src/pull/3
2018-05-29 06:07:26 +00:00
chs
ba2539a980 merge a new version of the CDDL dtrace and ZFS code.
this changes the upstream vendor from OpenSolaris to FreeBSD,
and this version is based on FreeBSD svn r315983.

in addition to the 10 years of improvements from upstream,
this version also has these NetBSD-specific enhancements:
 - dtrace FBT probes can now be placed in kernel modules.
 - ZFS now supports mmap().
2018-05-28 21:04:59 +00:00
christos
c50a4e606c - Introduce :q modifier for make variables and make it double escape $'s so
that passing variables to recursive makes with :q works as expected.
- Revert :Q to work as before.
- Adjust makefiles that use recursive make to use :q

Discussed on tech-toolchain@
XXX: pullup 8
2018-05-27 01:14:50 +00:00
leot
8d25f7611b Do not accept invalid octal character values (>= 0400).
This also avoid possible stack corruption (e.g. previously `tr -s '\400'' or
similars lead to them).

Reviewed and thanks to <pgoyette>!
2018-05-26 11:20:30 +00:00
christos
fe59327913 Since ${MAKE} converts $$ -> $ during parsing we need to put it back to
preserve the original variable value with :Q.
XXX: pullup-8
2018-05-24 00:27:24 +00:00
christos
45d3ba4e45 unit test for $ underquoting in :Q modifier 2018-05-24 00:25:44 +00:00
joerg
cebcb94770 deconst -> __UNCONST to avoid null pointer arithmetic 2018-05-23 21:20:20 +00:00
christos
45c59656f1 Remove Mail 2018-05-23 01:03:46 +00:00
jmcneill
f5e1fa54fa Add an optional '-p pidfile' parameter. 2018-05-15 01:41:29 +00:00
lukem
94c0b8f918 locate: fix support for multiple databases
Ensure that the first database is correctly added when
more than one database is provided.

Fixes problem I introduced in rev 1.17 on 2009-04-12,
and noticed recently by Simon.
2018-05-14 05:17:10 +00:00
sjg
7ccc79ce72 Just skip polling job token pipe.
The sigchld pipe ensures no busy wait.

PR: 53285
Reviewed by:
2018-05-13 22:13:28 +00:00
christos
e7f0fa0971 PR/53285: Andreas Gustafsson: Build times tripled with make/job.c 1.193
Revert previous:
    2018.05.12.15.14.49/bracket.db:build_wall_time=4896.09
    2018.05.12.18.17.04/bracket.db:build_wall_time=16268.98
2018-05-13 12:10:36 +00:00
sjg
68df7c9526 Skip setting wantToken.
polling the job token pipe adds a lot of overhead
for little gain.
For now, just leave wantToken=0

And avoid busy waiting when no tokens are available and
no jobs are running.

Reviewed by: christos
2018-05-12 18:17:04 +00:00
sevan
838100b8e4 Match sequence of flags with usage()
Following on from mandoc -Tlint, drop Pp macro before Bl and Tn macro.
2018-05-11 16:36:57 +00:00
christos
8234f5ded0 handle field rename. 2018-05-09 01:04:01 +00:00