Commit Graph

262654 Commits

Author SHA1 Message Date
yuripv
130f730aba locale: more output fixes
- make abday, day, abmon, mon, am_pm output quoting match linux
- workaround localeconv() issue for mon_grouping and grouping (PR172215)
- for other values not available in default locale, output -1 instead of
  127 (CHAR_MAX) as returned by localeconv()

With these changes, output of `locale` and `locale -k` for all keywords
specified by POSIX exactly matches the linux one.

PR:		237752
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D21599
2019-09-11 15:39:28 +00:00
emaste
341e632828 fw_stub.awk: use @generated tag in generated files
Multiple tools use @generated to identify generated files (for example,
in a review Phabricator will by default hide diffs in enerated files).
Use the @generated tag in makesyscalls.sh as we've done for other
generated files.
2019-09-11 13:35:22 +00:00
imp
db9a07c32c Assume all the short args have optional args so allocate space for the
':'. It's slightly wasteful, but much easier (and the savings in bytes
at runtime would be tiny, but the code to do it larger).

Submitted by: Sebastian Huber
2019-09-11 13:34:19 +00:00
kevans
add96fb8ab bectl(8): Add a "check" command
This command simply returns 0 at the moment and explicitly takes no
arguments. This should be used by utilities wanting to see if bectl can
operate on the system they're running, or with a specific root (`bectl -r`).
It may grow more checks than "will libbe successfully init" in the future,
but for now this is enough as that checks for the dataset mounted at "/" and
that it looks capable of being a BE root (e.g. it's not a top-level dataset)

bectl commands can now specify if they want to be silent, and this will turn
off libbe_print_on_error so they can control the output as needed. This is
already used in `bectl check`, and may be turned on in the future for some
other commands where libbe errors are better suppressed as the failure mode
may be obvious.

Requested by:	David Fullard
MFC after:	3 days
2019-09-11 13:27:10 +00:00
emaste
c1fe73ee39 linux: add trivial renameat2 implementation
Just return EINVAL if flags != 0.  The Linux man page documents one
case of EINVAL as "The filesystem does not support one of the flags in
flags."

After r351723 userland binaries will try using new system calls.

Reported by:	mjg
Reviewed by:	mjg, trasz
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21590
2019-09-11 13:01:59 +00:00
emaste
89195b1af4 regen linuxulator sysent after r352208 2019-09-11 12:58:53 +00:00
emaste
d50f11cc69 make linux_renameat2 args consistent with linux_renameat
Use 'dfd' consistently for a directory fd.
2019-09-11 12:58:06 +00:00
hselasky
39803421e2 Use true and false when dealing with bool type in the LinuxKPI.
No functional change.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-09-11 08:24:47 +00:00
hselasky
f2bc2e1d05 Fix synchronous work drain issue in the LinuxKPI.
A work callback may restart itself. Loop in the drain function to see if the
work has been rescheduled and stop the subsequent reschedules, if any.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-09-11 08:20:13 +00:00
hselasky
9bf06d7d6b Fix broken DECLARE_TASKLET() macro after r347852.
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-09-11 07:53:49 +00:00
bapt
f91d20755b Readd _el_fn_sh_complete for backward compatibility
This function is not needed anymore, it allows old sh binary to continue
to run and avoid breaking backward compatibility.
Note that is now just calls the regular _el_fn_complete which does a proper
job at quoting.

Discussed with:	jilles
2019-09-11 07:03:17 +00:00
mav
3157c6b68c Fix assumptions of only one device per SES slot.
It is typical to have one, but no longer true for multi-actuator HDDs
with separate LUN for each actuator.

MFC after:	4 days
Sponsored by:	iXsystems, Inc.
2019-09-11 03:25:30 +00:00
mav
90935defee Remove struct ata_res_pass16, unneeded after r352082.
MFC after:	4 days
2019-09-10 23:51:46 +00:00
jgh
2da0605647 - fix a minor typo
PR:		240447
Submitted by:	brigadir15@gmail.com
MFC after:	1 week
2019-09-10 22:44:09 +00:00
jkim
5452153735 Remove unnecessary entries from the previous commit. 2019-09-10 22:24:42 +00:00
ian
0d5f7d7285 In am335x_dmtpps, use a spin mutex to interlock between PPS capture and PPS
ioctl(2) handling.  This allows doing the pps_event() work in the polling
routine, instead of using a taskqueue task to do that work.

Also, add PNPINFO, and switch to using make_dev_s() to create the cdev.

Using a spin mutex and calling pps_event() from the polling function works
around the situation which requires more than 2 sets of timecounter
timehands in a single-core system to get reliable PPS capture.  That problem
would happen when a single-core system is idle in cpu_idle() then gets woken
up with an event timer event which was scheduled to handle a hardclock tick.
That processing path would end up calling tc_windup 3 or 4 times between
when the tc polling function was called and when the taskqueue task would
eventually run, and with only two sets of timehands, the th_generation count
would always be too old to allow the captured PPS data to be used.
2019-09-10 22:08:34 +00:00
tsoome
d3ea9b4160 loader: vidconsole should set LINES and COLUMNS
Set LINES and COLUMNS based on terminal dimensions.
2019-09-10 21:53:42 +00:00
kevans
d03c822884 lualoader: Revert to ASCII menu frame for serial console
The box drawing characters we use aren't necessarily safe with a serial
console; for instance, in the report by npn@, these were causing his xterm
to send back a sequence that lua picked up as input and halted the boot.
This is less than ideal.

Fallback to ASCII frames for console with 'comconsole' in it.  This is a
partial revert r338108 by imp@ -- instead of removing the menu entirely and
disabling color/cursor sequences, just reverting the default frame to ASCII
is enough to not break in this setup.

Reported by:	npn
Triaged and recommended by:	tsoome
2019-09-10 21:30:38 +00:00
jkim
556ce8d8d3 Merge OpenSSL 1.1.1d. 2019-09-10 21:08:17 +00:00
oshogbo
9ea2c0c43b gnop: Fix initial value for the wdelayprob
Reported by:	Chuck Silvers <chuq@chuq.com>
2019-09-10 20:27:44 +00:00
mjg
e1f31f93d7 cache: avoid excessive relocking on entry removal during lookup
Due to lock ordering issues (bucket lock held, vnode locks wanted) the code
starts with trylocking which in face of contention often fails. Prior to
the change it would loop back with a possible yield.

Instead note we know what locks are needed and can take them in the right
order, avoiding retries. Then we can safely re-lookup and see if the entry
we are looking for is still there.

On a 104-way box poudriere would result in constant retries during an 11h
run as seen in the vfs.cache.zap_and_exit_bucket_fail counter.

before: 408866592
after :         0

However, a new stat reports:
vfs.cache.zap_and_exit_bucket_relock_success: 32638

Note this is only a bandaid over current design issues.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2019-09-10 20:19:29 +00:00
mjg
5924940444 cache: change the formula for calculating lock array sizes
It used to be mp_ncpus * 64, but this gives unnecessarily big values for small
machines and at the same time constraints bigger ones. In particular this helps
on a 104-way box for which the count is now doubled.

While here make cache_purgevfs less likely. Currently it is not efficient in
face of contention due to lock ordering issues. These are fixable but not worth
it at the moment.

Sponsored by:	The FreeBSD Foundation
2019-09-10 20:11:00 +00:00
mjg
3a41dd1946 cache: assorted cleanups
Sponsored by:	The FreeBSD Foundation
2019-09-10 20:08:24 +00:00
jeff
90a6cf3d6d Replace redundant code with a few new vm_page_grab facilities:
- VM_ALLOC_NOCREAT will grab without creating a page.
 - vm_page_grab_valid() will grab and page in if necessary.
 - vm_page_busy_acquire() automates some busy acquire loops.

Discussed with:	alc, kib, markj
Tested by:	pho (part of larger branch)
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D21546
2019-09-10 19:08:01 +00:00
luporl
af194fa45b Add powerpc support to libkvm probe function
PowerPC kernels are of DYN type, instead of EXEC.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D21583
2019-09-10 18:46:32 +00:00
jeff
fa230897c4 Use the sleepq lock rather than the page lock to protect against wakeup
races with page busy state.  The object lock is still used as an interlock
to ensure that the identity stays valid.  Most callers should use
vm_page_sleep_if_busy() to handle the locking particulars.

Reviewed by:	alc, kib, markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D21255
2019-09-10 18:27:45 +00:00
imp
cfd68fe938 Remove dirs (and their now-empty parents) empty since r344779 2019-09-10 17:51:22 +00:00
imp
79e2cd5e09 Remove dir empty since r327952 2019-09-10 17:50:00 +00:00
imp
ebb462bfbf Remove dir empty since r314564 2019-09-10 17:49:18 +00:00
imp
cc4efde89c Remove dirs empty since r280031 2019-09-10 17:47:38 +00:00
imp
5c6b931da5 Remove dir empty since r276851 2019-09-10 17:46:30 +00:00
jkim
388b5f16bc Import OpenSSL 1.1.1d. 2019-09-10 17:40:53 +00:00
imp
4c409c1f3f Remove empty directory after r297894 2019-09-10 17:31:06 +00:00
imp
1e3689d375 Remove empty dir after r342815 (pt 2, oops) 2019-09-10 17:30:05 +00:00
imp
7ba25c363f Remove empty dir after r288683 2019-09-10 17:26:46 +00:00
imp
26c4b9c54b Remove empty dir after r342815 2019-09-10 17:26:20 +00:00
imp
7c1db0bbd9 Remove dir empty since r214734 2019-09-10 17:20:24 +00:00
imp
b600f99c5a Remove dirs empty since r336203 2019-09-10 17:19:43 +00:00
imp
bbe3fa8b8e Remove directory empty after r266735 2019-09-10 16:58:19 +00:00
imp
c08da98409 Remove empty directory after r215937 2019-09-10 16:57:35 +00:00
imp
edf186d099 Remove empty directory after r342871 2019-09-10 16:56:43 +00:00
imp
2c50c664a6 Remove empty directory imported with r342935 2019-09-10 16:53:16 +00:00
imp
b5f0465172 Remove empty directory imported with r238438 2019-09-10 16:51:52 +00:00
imp
d9d9f3715d Remove now-empty directory after r288337 2019-09-10 16:50:38 +00:00
imp
dcfcbdd94a Remove now-empty directories after r272458 2019-09-10 16:48:49 +00:00
imp
864cc72f5a Remove gateworks directories left over from r336136 2019-09-10 16:43:05 +00:00
imp
4ec7b8f198 Remove empty tap/tun modules directories after r347241 2019-09-10 16:41:00 +00:00
imp
26f5fe69d9 Remove leftover usr.bin/send-pr after r338042 2019-09-10 16:40:00 +00:00
imp
9e2bee5855 Remove empty directory after r342256 2019-09-10 16:38:52 +00:00
imp
6dc54d9f27 Remove empty directory aftre r336532 2019-09-10 16:37:32 +00:00