Commit Graph

19426 Commits

Author SHA1 Message Date
wiz
fd79f0a9b0 Mark up NULL with Dv. Remove empty line. 2019-02-05 15:03:35 +00:00
maxv
b25fe2ccb5 Sync with reality, and improve. 2019-02-05 13:56:32 +00:00
mrg
504bd058ec use adrp not adr, since the data is not pc-rel. fixes brk(2). 2019-02-05 13:02:35 +00:00
mrg
82974f2217 check for snprintf() truncation and fail sanely if so, rather than
attempting to use a file that won't exist or isn't secure.
2019-02-04 08:21:11 +00:00
mrg
fd676684f8 - avoid uninitialised memory usage 2019-02-04 04:37:50 +00:00
mrg
1fcf7be45f - use -Wno-error=implicit-fallthrough with GCC7. 2019-02-04 04:05:15 +00:00
mrg
2c04daffef add some fallthru comments. 2019-02-04 03:30:20 +00:00
thorpej
68e270a267 Implement support for "pshared" POSIX semaphores.
Fixes lib/53273 (and Firefox's multi-process tab feature).
2019-02-03 03:20:23 +00:00
isaki
8b1980912d Fix minor bugs of SNDCTL_DSP_GETISPACE.
- hiwat is playback-only parameter.
- 'bytes' should not be rounded down.
2019-02-02 04:52:16 +00:00
maxv
2089a3819a Fix two issues:
* Uh I put the wrong masks in some GPRs, fuck.

 * When the opsize of MOVZX is 4, we need to combine the zero-extend from
   the instruction with the natural zero-extend of long mode.

Add two associated tests.
2019-02-01 06:49:58 +00:00
mrg
7d08015811 make the backtrace()'s tracer() return _URC_FOREIGN_EXCEPTION_CAUGHT
when the array is full.  it won't be able to do any more work if so,
and avoids infinite loops in unwinding as seen on arm64.

XXX:  lack of signal support here means that backtrace() is useless
XXX:  from a signal handler, such as attempting to display the stack
XXX:  when handling a SIGSEGV.
2019-01-30 22:46:49 +00:00
isaki
6b4163e9ca Revert a wrong SNDCTL_DSP_GETOSPACE part of rev1.33.
- 'fragments' is the number of full free blocks and should not be
  negative value.
- 'bytes' should not be rounded down.
It makes mpv work correctly (fixes a second half of kern/53028).
Reviewed by mlelstv@
2019-01-29 11:54:02 +00:00
dholland
ad8aa774f5 fix duplicated chunk from merge 2019-01-27 04:33:29 +00:00
dholland
a5dfc9a7f2 fix another mergeo 2019-01-27 02:42:32 +00:00
dholland
f4d9309d1d fix mergeo 2019-01-27 02:40:49 +00:00
pgoyette
d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
maxv
c07836be52 Ah, fix bug: when the opcode has an immediate, we fill the src with a
register storage, but then we overwrite it without zeroing out the highest
bits of the resulting immediate (which may contain garbage from the union).
2019-01-26 14:44:54 +00:00
mrg
6339cfba17 remove the new check for tlen >= PTRDIFF_MAX. the prior
checks assure the condition is met and GCC7 is happy.

suggested by kre.
2019-01-24 22:07:14 +00:00
christos
c959ea2c0d PR/53904: Jintao Zhu: Use a mutex instead of an rwlock to assure thread safety 2019-01-24 18:01:38 +00:00
uwe
7142fa3957 It's section 3 page, not section 2. While here, xref puffs(3) in the
SEE ALSO section too.
2019-01-23 19:43:49 +00:00
kre
bcc54a5c42 And as long as we're attempting to achieve perfection in code
that is never going to be executed, let's also check for possible
overflow in a sum that will never be computed...
2019-01-23 02:48:48 +00:00
kre
1f29642da2 There's no point setting errno, it is just overwritten by err
in the exit path ... this function never fails, it simply sometimes
doesn't actually expand the %m and just leaves the format string
intact.

And declare variables at the head of their scope, not at some random
place in the middle of the code, whatever C allows, that is just ugly.
2019-01-23 02:32:06 +00:00
christos
223b7e5915 limit allocation to PTRDIFF_T to appease gcc-7, from mrg@ 2019-01-23 02:00:00 +00:00
mrg
bfe7e5d8b3 memset to zero the entire array, not just 8 bytes of it.
picked up by gcc7's checker that the array size has not
been multipled by the member size.

here, we had 8 but should have had 8 * sizeof(int).

XXX: real bug - pullup-7, pullup-8
2019-01-23 00:08:06 +00:00
mrg
1fbe8d0596 remove diag assert - the compiler demands fp is non NULL now. 2019-01-23 00:05:47 +00:00
rmind
3d9a792dd8 Major NPF improvements:
- Convert NPF connection table to thmap.  State lookup is now lock-free.
- Improve connection state G/C: it is now incremental and tunable.
- Add support for dynamic NAT address.  Translation addresses can now be
  selected from a pool of addresses.  There are two selection algorithms,
  "ip-hash" and "round-robin" (see the man page).
- Translation address can be specified as e.g. ifaddrs(wm0) in npf.conf
  to dynamically choose an IP from the interface address(es).
- Add support for the NETMAP algorithm with static NAT for net-to-net
  translation (it is equivalent to iptables NETMAP logic).
- Convert 'ipset' tables to use thmap; the table lookup is now lock-free.
- Misc improvements, bug fixes and more unit tests.
- Bump NPF_VERSION (will also bump libnpf).
2019-01-19 21:19:31 +00:00
wiz
f401b5d182 Use \- for minus. 2019-01-15 07:01:01 +00:00
uwe
3e392f0443 Fly, nasal demons, fly away... 2019-01-15 03:43:15 +00:00
riastradh
f5a847d300 Use the same variable for the locale example. 2019-01-15 03:30:58 +00:00
uwe
326784a6c3 Don't talk about "the first argument" when there's only one. 2019-01-15 01:23:49 +00:00
uwe
31759755bb Fix markup pasto. 2019-01-15 01:13:49 +00:00
uwe
2a102dd013 Remove the extra cast to int in the CAVEATS example.
We removed it from EXAMPLES a few releases ago.
2019-01-15 01:11:03 +00:00
uwe
893d5ca890 Fix typo in macro flag. 2019-01-15 00:43:32 +00:00
riastradh
2712861341 Expand on correct and incorrect usage, and on compiler warnings.
Give an example program with the warning, and some example nonsense
outputs.  Also note why glibc's approach doesn't solve the problem.
2019-01-15 00:31:19 +00:00
kre
4426ee8da1 Whitespace (indent with tabs, rather than spaces), and rearrange one
line that needed wrapping so it no longer does, and is (IMO) clearer.
WHile here, note that this was created in 2019, not 2018, for the
copyright notice...

NFCI.
2019-01-14 03:30:25 +00:00
maxv
7ceb32d30a Handle more corner cases, clean up a little, and add a set of instructions
in Group1.
2019-01-13 10:43:22 +00:00
kre
7b39a1eecc Always return from expandm() with errno unaltered, so on the
off chance it failed, there's still the possibility that whatever
processes the result will be able to deal with the %m that would
(presumably) be left in the format string.

And as a frill, don't call strerror() until we know we are
going to use its result (still call it only once, no matter
how many %m's are in the format string).
2019-01-13 06:10:34 +00:00
christos
3359bf52a4 check for *. integer overflow over ptrdiff. Pointed out by kre@ 2019-01-13 01:32:51 +00:00
kre
c323915498 Make expandm() return a const char * so we can do away with __UNCONST()
and more importantly, so that we don't accidentally return a value
that is a const char * in reality (pointer to read only string) as a
char *.
2019-01-12 22:14:08 +00:00
christos
a55f258316 Don't do %%m -> %%%m escaping, requested by gson@. 2019-01-12 21:50:29 +00:00
kre
63c2be2dac Return the buffer that has not been freed, so it can be later,
rather than the one that already was.
2019-01-12 21:05:37 +00:00
christos
94a22d4c76 Provide an extra argument to store the returned pointer so we can use
the function directly as the return format (before assigning it to a
variable) to appease clang.
2019-01-12 19:08:24 +00:00
christos
feb39a8c47 Use a utility function to expand %m correctly... 2019-01-11 20:37:30 +00:00
christos
f326096470 let's try one more time: prepare the format to pass to syslog instead
of trying to escape %m.
2019-01-11 16:15:20 +00:00
christos
87cda185f0 instead of handling %m inline, escape it. 2019-01-11 13:05:57 +00:00
dholland
43fda370f5 At some point we lost the text that explains the difference between
clear() and erase(). Or possibly we never had any. Put some back.
Bump date.
2019-01-11 06:14:39 +00:00
christos
11e9eb638e PR/53856: F. Aragon: editline/libedit not prompting colors in readline mode 2019-01-10 18:41:56 +00:00
christos
0b298669b8 delete unused variable 2019-01-10 13:53:58 +00:00
christos
77ae40ee4d PR/53851: Andreas Gustafsson: libwrap prints "m" instead of errno
Handle %m inline if needed, otherwise vasprintf strips the %m and...
2019-01-10 13:53:26 +00:00
maxv
06484a82be Handle REPN. FreeBSD has a "repn movs", which is a bit unusual, but doesn't
seem illegal as far as I can tell from the AMD SDM.

With that, I can boot FreeBSD on Qemu+NVMM.
2019-01-08 07:34:22 +00:00