]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoMFC r358089, r358797
Alan Somers [Sun, 22 Mar 2020 15:03:09 +0000 (15:03 +0000)]
MFC r358089, r358797

r358089:
[skip ci] delete obsolete comment in fusefs tests

It should've been deleted by r349436

r358797:
[skip ci] fix typo in comment in the fusefs tests

4 years agoMFC r357835:
Alan Somers [Sun, 22 Mar 2020 15:01:13 +0000 (15:01 +0000)]
MFC r357835:

fusefs: fix some memory leaks in the tests.

Oddly, most of these were not detected by Coverity.

Reported by: Coverity (one of them, anyway)
Coverity CID: 1404490

4 years agoMFC r353909, r355192, r355218, r355218, r358506, r359005:
Pedro F. Giffuni [Sun, 22 Mar 2020 01:22:44 +0000 (01:22 +0000)]
MFC r353909, r355192, r355218, r355218, r358506, r359005:
calendar(1): Updates and corrections for some calendar files.

PR: 242909, 242918

4 years agoMFC r359070: if_muge: use C99 bool for boolean vars
Ed Maste [Sat, 21 Mar 2020 00:34:28 +0000 (00:34 +0000)]
MFC r359070: if_muge: use C99 bool for boolean vars

4 years agoMFC r359009: if_muge: whitespace and style cleanup
Ed Maste [Sat, 21 Mar 2020 00:32:43 +0000 (00:32 +0000)]
MFC r359009: if_muge: whitespace and style cleanup

4 years agoMFC r359007: muge: drop CSUM from MUGE_DEFAULT_TSO_CSUM_ENABLE
Ed Maste [Sat, 21 Mar 2020 00:31:27 +0000 (00:31 +0000)]
MFC r359007: muge: drop CSUM from MUGE_DEFAULT_TSO_CSUM_ENABLE

TSO is independent of checksum offload

4 years agoMFC r358979: muge: correct RX checksum offload
Ed Maste [Sat, 21 Mar 2020 00:29:16 +0000 (00:29 +0000)]
MFC r358979: muge: correct RX checksum offload

4 years agoMFC: r359060, r359061, r359066
Jung-uk Kim [Fri, 20 Mar 2020 21:43:08 +0000 (21:43 +0000)]
MFC: r359060, r359061, r359066

Merge OpenSSL 1.1.1e.

4 years agoMFC r358643:
Dimitry Andric [Thu, 19 Mar 2020 22:33:24 +0000 (22:33 +0000)]
MFC r358643:

Link stand/i386 components using a linker script

LLD 10.0.0 changed the behavior of the -Ttext option, so that using
-Ttext=0x0 now causes linking of the loaders to fail with:

ld: error: output file too large: 18446744073707016908 bytes

I reported this in https://bugs.llvm.org/show_bug.cgi?id=44715, and
initially reverted the upstream change in r357259 to work around it.

However, after some discussion with Fangrui Song in the upstream ticket,
I think we can classify this as an unfortunate interaction between using
-Ttext=0 in combination with --no-rosegment.  (We added the latter
in r332090, because btxld does not correctly handle input with more
than 2 PT_LOAD segments.)

Fangrui suggested to use a linker script instead, and Warner was already
attempting this in r305353, but had to revert it due to "crypto-using
boot problems" (not sure what those were :).

This review updates the stand/i386/boot.ldscript to handle more
sections, inserts some symbols like _edata and such that we use in
libsa, and also discards any .interp section.

It uses ORG which is defined on the linker command line using
--defsym ORG=value to set the start of all the sections.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D23952

4 years agoMFC r346085: Add Cirrus CI config file to support CI builds
Ed Maste [Thu, 19 Mar 2020 18:17:43 +0000 (18:17 +0000)]
MFC r346085: Add Cirrus CI config file to support CI builds

Also followup commits:
r346121: Cirrus-CI: pass OVMF env var to test script for upcoming changes
r350302: cirrus.yml: use OVMF.fd from uefi-edk2-qemu-x86_64 package
r350449: cirrus.yml: stop fetching OVMF.fd now that we're using the pkg
r356867: Cirrus-CI: bump VM image to FreeBSD 12.1

Sponsored by: The FreeBSD Foundation

4 years agoMFC r346080: Add a smoke test QEMU boot script for CI
Ed Maste [Thu, 19 Mar 2020 18:15:09 +0000 (18:15 +0000)]
MFC r346080: Add a smoke test QEMU boot script for CI

And followon commits:
r346317 (ian): Allow this test script to be run from within src/tools/boot
r346329: Install some entropy for QEMU CI smoke test
r346330: Put QEMU CI smoke test boot log in /tmp if TMPDIR not set
r346748 (bcran): Fix tools/boot/ci-qemu-test.sh and make some improvements
r346961: revert QEMU q35 platform use from r346748
r352063: ci-qemu-test: if firmware is not available, hint at pkg to install
r358472: CI: print wired page count on boot

Sponsored by: The FreeBSD Foundation

4 years agoMFC r354240, r354252, r358906
Toomas Soome [Thu, 19 Mar 2020 16:51:57 +0000 (16:51 +0000)]
MFC r354240, r354252, r358906

libi386/comconsole.c updates:

We don't support configuring serial PCI cards in EFI. Make this clearer in the
source rather than obfuscaring it behind NO_PCI (nothing else declares that,
so it's not making the ifdefs clearer).

libi386/comconsole.c cstyle cleanup

test if port does exist via using scratch register

4 years agoMFC 358674, 358916: Add examples to ftw.3
Mateusz Piotrowski [Thu, 19 Mar 2020 10:31:46 +0000 (10:31 +0000)]
MFC 358674, 358916: Add examples to ftw.3

ftw.3: Add examples

PR: 173448 [1]
Submitted by: fernape@ (previous version) [1]
Reviewed by: jilles
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D21750

ftw.3: Follow style(9) in the example

Reported by: oshogbo
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24043

4 years agoMFC r359014:
Hans Petter Selasky [Thu, 19 Mar 2020 09:19:22 +0000 (09:19 +0000)]
MFC r359014:
Fix for double unlock in ipoib.

The ipoib_unicast_send() function is not supposed to unlock the priv lock.

Sponsored by: Mellanox Technologies

4 years agoMFC r358070:
Cy Schubert [Thu, 19 Mar 2020 03:37:02 +0000 (03:37 +0000)]
MFC r358070:

This commit makes significant changes to pam_login_access(8) to bring it
up to par with the Linux pam_access(8).

Like the Linux pam_access(8) our pam_login_access(8) is a service module
for pam(3) that allows a administrator to limit access from specified
remote hosts or terminals. Unlike the Linux pam_access, pam_login_access
is missing some features which are added by this commit:

Access file can now be specified. The default remains /etc/access.conf.
The syntax is consistent with Linux pam_access.

By default usernames are matched. If the username fails to match a match
against a group name is attempted. The new nodefgroup module option will
only match a username and no attempt to match a group name is made.
Group names must be specified in brackets, "()" when nodefgroup is
specified. Otherwise the old backward compatible behavior is used.
This is consistent with Linux pam_access.

A new field separator module option allows the replacement of the default
colon (:) with any other character. This facilitates potential future
specification of X displays. This is also consistent with Linux pam_access.

A new list separator module option to replace the default space/comma/tab
with another character. This too is consistent with Linux pam_access.

Linux pam_access options not implemented in this commit are the debug
and audit options. These will be implemented at a later date.

Reviewed by: bjk, bcr (for manpages)
Approved by: des (blanket, implicit)
Differential Revision: https://reviews.freebsd.org/D23198

4 years agoMFC r358066:
Cy Schubert [Thu, 19 Mar 2020 03:31:12 +0000 (03:31 +0000)]
MFC r358066:

When pam_login_access(5) fails to match a username it attempts to
match the primary group a user belongs to. This commit extends the
match to secondary groups a user belongs to as well, just as the Linux
pam_access(5) does.

Approved by: des (implicit, blanket)

4 years agoMFC r358065:
Cy Schubert [Thu, 19 Mar 2020 03:29:46 +0000 (03:29 +0000)]
MFC r358065:

The words ALL, LOCAL, and EXCEPT have special meaning and are documented
as in the login.access(5) man page. However strcasecmp() is used to compare
for these special strings. Because of this User accounts and groups with
the corresponding lowercase names are misintrepreted to have special
whereas they should not.

This commit fixes this, conforming to the man page and to how the Linux
pam_access(8) handles these special words.

Approved by: des (implicit, blanket)

4 years agoMFC r352775-r352776
Oleksandr Tymoshenko [Thu, 19 Mar 2020 01:50:24 +0000 (01:50 +0000)]
MFC r352775-r352776

r352775:
snd_hda: Add Intel Cannon Lake support

Add PCI ids for Intel Cannon Lake PCH

Tested on: HP Spectre x360 13-p0043dx
PR: 240574
Submitted by: Neel Chauhan <neel@neelc.org>
Reviewed by: imp, mizhka, ray
Differential Revision: https://reviews.freebsd.org/D21789

r352776:
snd_hda: Add Intel Cannon Lake support

Add missing header change ommitted in r352775

X-MFC-with: 352775

4 years agoMFC r349011 (by imp):
Alexander Motin [Wed, 18 Mar 2020 23:53:07 +0000 (23:53 +0000)]
MFC r349011 (by imp):
Don't print the request we may be aborting in ciss_notify_abort as
part of ciss_detach. It's a left-over debug that isn't needed and also
discloses a kernel address. Only root could provoke as part of a
devctl or kldunload.

Submitted by: Fuqian Huang

4 years agoMFC of r358404, r358410, r358412, and r358413:
Hiroki Sato [Wed, 18 Mar 2020 18:21:58 +0000 (18:21 +0000)]
MFC of r358404, r358410, r358412, and r358413:

Fix broken STARTTLS when SharedMemoryKey is enabled.

OpenSSL 1.1 API patch for sendmail had a bug which
prevented sm_RSA_generate_key() function from working.
This function is used to generate a temporary RSA key
for a shared memory region used for TLS processing.
Note that 12.0 and 12.1-RELEASE include this bug.

This affects only if SM_CONF_SHM compile-time
option (enabled by default) and SharedMemoryKey
run-time option (not enabled by default) in a .cf file are
specified.  The latter corresponds to confSHARED_MEMORY_KEY in
a .mc file.

Fix style inconsistencies.

Do not free p and g parameters after calling DH_set0_pqg(3).

PR: 242861
Differential Revision: https://reviews.freebsd.org/D23734

4 years agoMFC of r358402:
Hiroki Sato [Wed, 18 Mar 2020 18:16:00 +0000 (18:16 +0000)]
MFC of r358402:

Add MODULE_PNP_INFO() to autoload the rtwn_pci(4) kernel module.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D23807

4 years agoMFC of r358152 and r328235:
Hiroki Sato [Wed, 18 Mar 2020 18:10:44 +0000 (18:10 +0000)]
MFC of r358152 and r328235:

Improve performance of "read" built-in command when using a seekable fd.

The read built-in command calls read(2) with a 1-byte buffer because
newline characters need to be detected even on a byte stream which
comes from a non-seekable file descriptor.  Because of this, the
following script calls >6,000 read(2) to show a 6-KiB file:

 while read IN; do echo "$IN"; done < /COPYRIGHT

When the input byte stream is seekable, it is possible to read a data
block and then reposition the file pointer to where a newline
character found.  This change adds a small buffer to do this and
reduces the number of read(2) calls.

Theoretically, multiple built-in commands reading the same seekable
byte stream in a single pipe chain can share the buffer.  However,
this change just makes a single invocation of the read built-in
allocate a buffer and deallocate it every time for simplicity.
Although this causes read(2) to read the same regions multiple times,
the performance penalty should be small compared to the reduction of
read(2) calls.

Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D23747

4 years agoMFC of r355574, r358095, and r358395:
Hiroki Sato [Wed, 18 Mar 2020 18:02:33 +0000 (18:02 +0000)]
MFC of r355574, r358095, and r358395:

Add ACPI battery subsystem man page.

Add _BIX (Battery Information Extended) object support.

ACPI Control Method Batteries have a _BIF and/or _BIX object which
provide static properties of the battery.  FreeBSD acpi_cmbat module
supported _BIF object only, which was deprecated as of ACPI 4.0.
_BIX is an extended version of _BIF defined in ACPI 4.0 or later.

As of writing, _BIX has two revisions.  One is in ACPI 4.0 (rev.0) and
another is in ACPI 6.0 (rev.1).  It seems that hardware vendors still
stick to _BIF only or _BIX rev.0 + _BIF for the maximum compatibility.
Microsoft requires _BIX rev.0 for Windows machines, so there are some
laptop machines with _BIX rev.0 only. In this case, FreeBSD does not
recognize the battery information.

After this change, the acpi_cmbat module gets battery information from
_BIX or _BIF object and internally uses _BIX rev.1 data structure as
the primary information store in the kernel.  ACPIIO_BATT_GET_BI[FX]
returns an acpi_bi[fx] structure built by using information obtained
from a _BIF or a _BIX object found on the system.  The revision number
field can be used to check which field is available.  The acpiconf(8)
utility will show additional information if _BIX is available.

Although ABIs of ACPIIO_BATT_* were changed, the existing APIs for
userland utilities are not changed and the backward-compatible ABIs
are provided.  This means that older versions of acpiconf(8) can also
work with the new kernel. The (union acpi_battery_ioctl_arg) was
padded to 256 byte long to avoid another ABI change in the future.
A _BIX object with its revision number >1 will be treated as
compatible with the rev.1 _BIX format.

Add workaround for models which do not follow the ACPI specification strictly.
Extra objects are now simply ignored instead of rejecting everything.

Differential Revision: https://reviews.freebsd.org/D22556
Differential Revision: https://reviews.freebsd.org/D23728

4 years agoMFC of r358061:
Hiroki Sato [Wed, 18 Mar 2020 17:42:18 +0000 (17:42 +0000)]
MFC of r358061:

Use 0x5c for the scan code 0x7d.

Japanese keyboards traditionally use 0x5c for
both Japanese yen sign key and backslash key.
While a Japanese yen sign is depicted on the keytop,
most of Japanese expect that the scan code 0x7d gives
a backslash (0x5c), not a Japanese yen sign (0xa5).

This is because JIS X 0201 encoding (aka ISO/IEC 646-JA,
an extended version of ASCII which is very popular
in Japan) has Japanese yen sign at 0x5c and
no backslash.  On the other hand, ISO/IEC 8859-1
has Japanese yen sign at 0xa5.  This difference has
caused a confusion after Unicode became popular since
ISO/IEC 10646 adopted 8859-1 for the plane 0.

4 years agoMFC from r347887:
Hiroki Sato [Wed, 18 Mar 2020 17:35:35 +0000 (17:35 +0000)]
MFC from r347887:

Fix hostname to be returned in an ICMPv6 NI Reply message defined
in RFC 4620, ICMPv6 Node Information Queries.  A vnet jail with an
IPv6 address sent a hostname of the host environment, not the
jail, even if another hostname was set to the jail.

This change can be tested by the following commands:

 # ifconfig epair0 create
 # jail -c -n j1 vnet host.hostname=vnetjail path=/ persist
 # ifconfig epair0b vnet j1
 # ifconfig epair0a inet6 -ifdisabled auto_linklocal up
 # jexec j1 ifconfig epair0b inet6 -ifdisabled auto_linklocal up
 # ping6 -w ff02::1%epair0a

Differential Revision: https://reviews.freebsd.org/D20207

4 years agoMFC r358993: libssp: don't compile with -fstack-protector*
Kyle Evans [Wed, 18 Mar 2020 01:55:27 +0000 (01:55 +0000)]
MFC r358993: libssp: don't compile with -fstack-protector*

This similarly matches what we do in libc; compiling libssp with
-fstack-protector* is actively harmful.  For instance, if the canary ctor
ends up with a stack protector then it will trivially trigger a false
positive as the canary's being initialized.

This was noted by the reporter as irc/ircd-hybrid started crashing at start
after our libssp was MFC'd to stable/11, as its build will explicitly link
in libssp. On FreeBSD, this isn't necessary as SSP bits are included in
libc, but it should absolutely not trigger runtime breakage -- it does mean
that the canary will get initialized twice, but as this is happening early
on in application startup it should just be redundant work.

4 years agoMFC r358824:
Vladimir Kondratyev [Tue, 17 Mar 2020 23:57:06 +0000 (23:57 +0000)]
MFC r358824:

wmt(4): Fix Synaptics Touch Digitizer V04 attachment

Touch Digitizer V04 report descriptor declares 'Contact Count Maximum' usage
as constant. That was not supported by descriptor parser.

PR: 232040
Reported by: Sergei Akhmatdinov <sakhmatd@darkn.space>

4 years agoMFC r358512: Move ELF feature note tool to usr.bin/elfctl
Ed Maste [Tue, 17 Mar 2020 19:53:03 +0000 (19:53 +0000)]
MFC r358512: Move ELF feature note tool to usr.bin/elfctl

elfctl is a tool for modifying the NT_FREEBSD_FEATURE_CTL ELF note,
which contains a set of flags for enabling or disabling vulnerability
mitigations and other features.

Also merge follow-on commits:

r358518 elfctl: initialize features
r358546 elfctl: tiny style(9) cleanup, use bool where appropriate
r358622 elfctl: style(9): use C99 uintX_t types
r358623 elfctl: check read return value
r358889 elfctl: remove memory leak

Sponsored by: The FreeBSD Foundation

4 years agoMFC r358898: arch.7: remove extraneous markup from header table sizing
Ed Maste [Tue, 17 Mar 2020 14:59:24 +0000 (14:59 +0000)]
MFC r358898: arch.7: remove extraneous markup from header table sizing

4 years agoMFC r358593:
Brooks Davis [Mon, 16 Mar 2020 23:36:32 +0000 (23:36 +0000)]
MFC r358593:

Use ifr_data_get_ptr() consistently.

Obtained from: CheriBSD
Sponsored by: DARPA

4 years agoMFC r358630:
Brooks Davis [Mon, 16 Mar 2020 23:20:56 +0000 (23:20 +0000)]
MFC r358630:

bnxt(4): Fix ioctls when user addresses are inaccessable.

Check copyin's error code (differ adding copyout checks at this time).

Don't directly access user memory in the switch statement.

Since bnxt_ioctl_data isn't all that big, use a stack allocation.

Reviewed by: jhb
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23933

4 years agoMFC r358592:
Brooks Davis [Mon, 16 Mar 2020 23:09:25 +0000 (23:09 +0000)]
MFC r358592:

Expose ifr_buffer_get_(buffer|length) outside if.c.

This is a preparatory commit for D23933.

Reviewed by: jhb
Obtained from: CheriBSD
Sponsored by: DARPA

4 years agoMFC r358992:
Bjoern A. Zeeb [Mon, 16 Mar 2020 21:12:46 +0000 (21:12 +0000)]
MFC r358992:

  kern_jail: missing \0 termination check on osrelease parameter

  If a user spplies a non-\0 terminated osrelease parameter reading it back
  may disclose kernel memory.
  This is a problem in case of nested jails (children.max > 0, which is not
  the default).  Otherwise root outside the jail has access to kernel memory
  by other means and root inside a jail cannot create a child jail.

  Add the proper \0 check at the end of a supplied osrelease parameter and
  make sure any copies of the field will be \0-terminated.

  Submitted by: Hans Christian Woithe (chwoithe yahoo.com)

4 years agoelf_common.h: sync ELF feature control note bits with HEAD
Ed Maste [Mon, 16 Mar 2020 19:33:50 +0000 (19:33 +0000)]
elf_common.h: sync ELF feature control note bits with HEAD

4 years agoMFC r358827:
Konstantin Belousov [Mon, 16 Mar 2020 11:42:03 +0000 (11:42 +0000)]
MFC r358827:
pipe: explain why not deallocating inode number is fine.

4 years agoMFC r358825:
Konstantin Belousov [Mon, 16 Mar 2020 11:40:59 +0000 (11:40 +0000)]
MFC r358825:
Preallocate pipe buffers on pipe creation.

4 years agoMFC r358816:
Konstantin Belousov [Mon, 16 Mar 2020 11:38:26 +0000 (11:38 +0000)]
MFC r358816:
Style.

4 years agoMFC r358895
Vladimir Kondratyev [Sat, 14 Mar 2020 22:03:49 +0000 (22:03 +0000)]
MFC r358895

wmt(4): Reapply r358872 (by hselasky) modified to use
maximal input report size instead of wMaxPacketSize.

If the USB frame length is set to 1024 bytes, WMT_BSIZE, the EETI controller
will pack multiple touch events in the packet and the current code will only
process the first touch event.

As a result some important events are lost like releasing the finger from the
touchscreen.

Use the maximal input report size as buffer size instead.

PR: 244718
Tested by: Oskar Holmlund <oskar.holmlund@ohdata.se>, wulf
Discussed with: hselasky

4 years agoMFC r348677 (by emaste):
Dimitry Andric [Sat, 14 Mar 2020 11:55:27 +0000 (11:55 +0000)]
MFC r348677 (by emaste):

move llvm-ar and llvm-nm to appropriate location in OptionalObsoleteFiles.inc

After r348610 `make delete-old` was still removing llvm-ar and llvm-nm
(and associated man pages).

Reported by: jhb
Sponsored by: The FreeBSD Foundation

MFC r348761 (by jkim):

Move llvm-ranlib to appropriate location in OptionalObsoleteFiles.inc.

Note llvm-ar is linked to llvm-ranlib since r311565.  r348677 fixed
"make delete-old" issue with llvm-ar but missed it somehow.

Discussed with: emaste, jhb

4 years agoMFC r358478: Add -N option to powerd(8) to ignore "nice" time.
Colin Percival [Sat, 14 Mar 2020 06:57:50 +0000 (06:57 +0000)]
MFC r358478: Add -N option to powerd(8) to ignore "nice" time.

4 years agoMFC r358717:
Navdeep Parhar [Sat, 14 Mar 2020 02:24:11 +0000 (02:24 +0000)]
MFC r358717:

cxgbe/t4_tom: Do not uninitialize a toepcb that has not been initialized.

This fixes the following panic:
--- trap 0xc, rip = 0xffffffff80c00411, rsp = 0xfffffe0025192840, rbp = 0xfffffe0025192860 ---
vmem_xfree() at vmem_xfree+0xd1/frame 0xfffffe0025192860
tls_uninit_toep() at tls_uninit_toep+0x78/frame 0xfffffe0025192880
free_toepcb() at free_toepcb+0x32/frame 0xfffffe00251928a0
t4_connect() at t4_connect+0x3be/frame 0xfffffe0025192950
tcp_offload_connect() at tcp_offload_connect+0xa4/frame 0xfffffe0025192990
tcp_usr_connect() at tcp_usr_connect+0xec/frame 0xfffffe00251929f0
soconnect() at soconnect+0xae/frame 0xfffffe0025192a30
kern_connectat() at kern_connectat+0xe2/frame 0xfffffe0025192a90
sys_connect() at sys_connect+0x75/frame 0xfffffe0025192ad0
amd64_syscall() at amd64_syscall+0x137/frame 0xfffffe0025192bf0
fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0025192bf0
--- syscall (98, FreeBSD ELF64, sys_connect), rip = 0x8008e9d8a, rsp = 0x7fffffffc0f8, rbp = 0x7fffffffc130 ---

Reviewed by: jhb@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D23989

4 years agoMFC r358086:
Navdeep Parhar [Sat, 14 Mar 2020 02:20:53 +0000 (02:20 +0000)]
MFC r358086:

cxgbe(4): Congestion drops are maintained per E-channel and not per
buffer group.

This fixes a bug where congestion drops on port 1 of a T6 card would
incorrectly be counted as drops on port 0.

Sponsored by: Chelsio Communications

4 years agoMFC r358082:
Navdeep Parhar [Sat, 14 Mar 2020 02:15:21 +0000 (02:15 +0000)]
MFC r358082:

cxgbe/iw_cxgbe: correctly enforce the max reg_mr depth.

Reported by: Andrew Zhu @ Netapp
Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

4 years agoMFC r357606:
Navdeep Parhar [Sat, 14 Mar 2020 02:11:34 +0000 (02:11 +0000)]
MFC r357606:

cxgbe(4): Add native netmap support to the main interface.

This means that extra virtual interfaces (VIs) created with
hw.cxgbe.num_vis are no longer required to use netmap.  Use this
tunable to enable native netmap support on the main interface:

hw.cxgbe.native_netmap="3"

There is no change in default behavior.

Suggested by: jch@
Sponsored by: Chelsio Communications

4 years agoMFC r357552:
Navdeep Parhar [Sat, 14 Mar 2020 02:05:12 +0000 (02:05 +0000)]
MFC r357552:

cxgbe(4): Allow nm_black_hole and nm_cong_drop to be set at any time.

The cong_drop setting will apply to queues created after the setting is
changed and not to existing queues.

Sponsored by: Chelsio Communications

4 years agoMFC r357551:
Navdeep Parhar [Sat, 14 Mar 2020 01:59:39 +0000 (01:59 +0000)]
MFC r357551:

cxgbe(4): Report accurate rx_buf_maxsize to netmap.

Sponsored by: Chelsio Communications

4 years agoMFC r357476:
Navdeep Parhar [Sat, 14 Mar 2020 01:53:58 +0000 (01:53 +0000)]
MFC r357476:

cxgbe(4): Do not use pack boundary > 512B unless it is explicitly
requested.

This is a tradeoff between PCIe efficiency during large packet rx and
packing efficiency during small packet rx.

Sponsored by: Chelsio Communications

4 years agoMFC r357474:
Navdeep Parhar [Sat, 14 Mar 2020 01:42:21 +0000 (01:42 +0000)]
MFC r357474:

cxgbe(4): Only checksummed TCP should be considered for LRO.

This avoids the per-packet nanouptime in tcp_lro_rx for traffic that's
not even TCP.

Sponsored by: Chelsio Communications

4 years agoMFC r356713:
Navdeep Parhar [Sat, 14 Mar 2020 01:38:03 +0000 (01:38 +0000)]
MFC r356713:

cxgbe/iw_cxgbe: Do not allow memory registrations with page size greater
than 128MB, which is the maximum supported by the hardware in RDMA mode.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

4 years agoMFC r355886:
Navdeep Parhar [Sat, 14 Mar 2020 01:33:11 +0000 (01:33 +0000)]
MFC r355886:

cxgbe(4): check if the firmware supports FW_RI_FR_NSMR_TPTE_WR work
request.

This is used by iw_cxgbe to figure out how best to register memory.

Sponsored by: Chelsio Communications

4 years agoMFC r355730:
Navdeep Parhar [Sat, 14 Mar 2020 01:28:53 +0000 (01:28 +0000)]
MFC r355730:

cxgbe(4): Use the _XT variant of the CPL used to transmit NIC traffic.

CPL_TX_PKT_XT disables the internal parser on the chip and instead
relies on the driver to provide the exact length of the L2 and L3
headers.  This allows hw checksumming and TSO to be used with L2 and
L3 encapsulations that the chip doesn't understand directly.

Note that netmap tx still uses the old CPL as it never uses the hw
to generate the checksum on tx.

Reviewed by: jhb@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D22788

4 years agoMFC r355580, r355673, and r357553.
Navdeep Parhar [Sat, 14 Mar 2020 01:03:48 +0000 (01:03 +0000)]
MFC r355580, r355673, and r357553.

r355580:
cxgbe(4): Use TX_PKTS2 work requests in netmap Tx if it's available.

TX_PKTS2 is more efficient within the firmware and this improves netmap
Tx by a few Mpps in some common scenarios.

r355673:
cxgbe(4): Never use hardware checksumming in netmap tx.

r357553:
cxgbe(4): Add a knob to allow netmap tx traffic to be checksummed by
the hardware.

hw.cxgbe.nm_txcsum=1

Sponsored by: Chelsio Communications

4 years agoMFC r355107 and r355597.
Navdeep Parhar [Sat, 14 Mar 2020 00:57:20 +0000 (00:57 +0000)]
MFC r355107 and r355597.

r355107:
cxgbe(4): Allow the driver to specify multiple FECs that the firmware
should try in order to link up with the peer.

Various FEC variables within the driver can now have multiple bits set
instead of being powers of 2.  0 and -1 in the user knobs still mean no
FEC and auto (driver decides) respectively for backward compatibility,
but no-FEC and auto now have their own bits in the internal
representation.  There is a new bit that can be set to request the FEC
recommended by the cable/transceiver module.

Add sysctls to display link related capabilities of the local side as
well as the link partner.

Note that all this needs a new firmware and the documentation for the
driver FEC knobs will be updated after that firmware is added to the
driver.

r355597:
cxgbe(4): Man page updates to go with r355107.

Sponsored by: Chelsio Communications

4 years agoMFC r355059:
Navdeep Parhar [Sat, 14 Mar 2020 00:49:59 +0000 (00:49 +0000)]
MFC r355059:

cxgbe(4): sysctl to reset the temperature/voltage sensor.

# sysctl dev.<nexus>.<inst>.reset_sensor=1
# sysctl dev.t6nex.0.reset_sensor=1

Sponsored by: Chelsio Communications

4 years agoMFC r355046, r355579, r355595, and r357793.
Navdeep Parhar [Fri, 13 Mar 2020 22:18:40 +0000 (22:18 +0000)]
MFC r355046, r355579, r355595, and r357793.

r355046:
cxgbe(4): Update the firmware interface header.

This allows the driver to be updated for the next firmware without
waiting for it to be released.

r355579:
cxgbe(4): Update T4/5/6 firmwares to 1.24.11.0.

These were obtained from the Chelsio Unified Wire v3.12.0.1 beta
release.

Note that the firmwares are not uuencoded any more.

r355595:
cxgbe(4): Simplify the firmware version checks a bit.

No functional change.

r357793:
cxgbe(4): Update T4/5/6 firmwares to 1.24.12.0.

Sponsored by: Chelsio Communications

4 years agoMFC r354210:
Navdeep Parhar [Fri, 13 Mar 2020 21:45:51 +0000 (21:45 +0000)]
MFC r354210:

cxgbe(4): Use correct size while converting lpacaps32 to native
endianness.

4 years agoComplete MFC r358533
Li-Wen Hsu [Fri, 13 Mar 2020 20:57:02 +0000 (20:57 +0000)]
Complete MFC r358533

Sponsored by: The FreeBSD Foundation

4 years agoMFC r358961:
Li-Wen Hsu [Fri, 13 Mar 2020 17:10:53 +0000 (17:10 +0000)]
MFC r358961:

Skip sys.netpfil.pf.nat.exhaust on all platforms as it not only fails on amd64

PR: 244703
Sponsored by: The FreeBSD Foundation

4 years agoMFC r358718:
Mark Johnston [Fri, 13 Mar 2020 16:56:08 +0000 (16:56 +0000)]
MFC r358718:
Remove dead code from the powerpc uma_small_alloc().

4 years agoMFC r358715:
Mark Johnston [Fri, 13 Mar 2020 16:52:16 +0000 (16:52 +0000)]
MFC r358715:
Add COUNTER_U64_SYSINIT() and COUNTER_U64_DEFINE_EARLY().

4 years agoMFC 357638:
Mateusz Piotrowski [Fri, 13 Mar 2020 13:45:27 +0000 (13:45 +0000)]
MFC 357638:

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24063

Improve documentation of bootconfig and PARTITIONS

- Mention bootconfig target in TARGETS section.
- Document PARTITIONS variable, which is only mentioned in the examples,
  but doesn't have its own point.

Submitted by: arrowd@
Reviewed by: bcr
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D22927

4 years agoMFC 354967:
Mateusz Piotrowski [Fri, 13 Mar 2020 13:23:28 +0000 (13:23 +0000)]
MFC 354967:

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24060

bsdinstall.8: Fix description of DISTRIBUTIONS environment variable

Reviewed by: bcr
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D22478

4 years agoMFC 351484: Fix build (head: r351481, stable/12: r358955)
Mateusz Piotrowski [Fri, 13 Mar 2020 13:06:41 +0000 (13:06 +0000)]
MFC 351484: Fix build (head: r351481, stable/12: r358955)

Approved by:    emaste (src)

4 years agoMFC 351481, 357619:
Mateusz Piotrowski [Fri, 13 Mar 2020 11:27:29 +0000 (11:27 +0000)]
MFC 351481, 357619:

Approved by: bcr (mentor), hselasky (src)
Differential Revision: https://reviews.freebsd.org/D24058

mixer(8): Report an error if the passed value is an empty string

This patch fixes a bug that made the mixer command enter
an infinite loop when instructed to set the value of a device
to an empty string (e.g., `mixer vol ""`).

Additionally, some tests for mixer(8) are being added.

PR: 240039
Reviewed by: hselasky, mav
Approved by: src (hselasky, mav)
Differential Revision: https://reviews.freebsd.org/D21409

mixer: call the cleanup function in a test

The set_empty_value test has a cleanup function, but is not called.
Fix it

Reviewed by: 0mp
Approved by: kp
Differential Revision: https://reviews.freebsd.org/D23498

4 years agoMFC r340031, r340032, r340048: Improve SMB documentation
Mateusz Piotrowski [Fri, 13 Mar 2020 10:29:31 +0000 (10:29 +0000)]
MFC r340031, r340032, r340048: Improve SMB documentation

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24057

smbutil(1): Reference nsmb.conf(5) and mount_smbfs(8)

Reviewed by: bcr
Approved by:    krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17809

mount_smbfs(8): Mention /etc/nsmb.conf, smbutil(1) and nsmb.conf(5)

Reviewed by: bcr
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17808

nsmb.conf(5): Document the order of configuration loading

Based on the comments in /etc/nsmb.conf.

Reviewed by: bcr
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17810

4 years agoMFC 340001:
Mateusz Piotrowski [Fri, 13 Mar 2020 10:04:54 +0000 (10:04 +0000)]
MFC 340001:

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24055

CMSG_DATA(3): Use consistent variable names

The description of CMSG_FIRSTHDR used two variables (mhdr and msg) to
reference the same thing. Use msghdr consistency across the manual page
instead.

Reviewed by: bcr
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17804

4 years agoMFC 339952:
Mateusz Piotrowski [Fri, 13 Mar 2020 09:41:40 +0000 (09:41 +0000)]
MFC 339952:

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24054

tpm(4): Add the STANDARDS and HISTORY sections

Also, link to the homepage of the BSSSD project, which developed the
original driver.

Reviewed by: bcr, kevans
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17608

4 years agoMFC r358841:
Hans Petter Selasky [Fri, 13 Mar 2020 09:17:04 +0000 (09:17 +0000)]
MFC r358841:
Fix for building libusb under Linux.

Sponsored by: Mellanox Technologies

4 years agoMFC r339957:
Mateusz Piotrowski [Fri, 13 Mar 2020 09:07:02 +0000 (09:07 +0000)]
MFC r339957:

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24052

ps(1): Add a standard exit status section

Reviewed by: bcr, eadler
Approved by: krion (mentor)
Differential Revision: https://reviews.freebsd.org/D17146

4 years agoMFC r358838:
Hans Petter Selasky [Fri, 13 Mar 2020 08:56:10 +0000 (08:56 +0000)]
MFC r358838:
Add support for the device statistics IOCTL, needed by the coming
linux_libusb upgrade.

Sponsored by: Mellanox Technologies

4 years agoMFC r358695:
Hans Petter Selasky [Fri, 13 Mar 2020 08:52:50 +0000 (08:52 +0000)]
MFC r358695:
Define more subsystem orders.
Intended for use with module_init_order() in the LinuxKPI.

Sponsored by: Mellanox Technologies

4 years agoMFC r358694:
Hans Petter Selasky [Fri, 13 Mar 2020 08:49:06 +0000 (08:49 +0000)]
MFC r358694:
Fix some whitespace issues in ipoib.

Sponsored by: Mellanox Technologies

4 years agoMFC r339962:
Mateusz Piotrowski [Fri, 13 Mar 2020 08:41:28 +0000 (08:41 +0000)]
MFC r339962:

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24047

ps(1): Pet mandoc and igor

- Use Xr to reference other manual pages.
- Reference execve(2) instead of exec(2) as exec(2) does not exist.
- Remove the deprecated "Tn" macro.
- Improve the formatting of the etime description.

Reviewed by: bcr
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17780

4 years agoMFC r358533:
Martin Matuska [Fri, 13 Mar 2020 01:05:40 +0000 (01:05 +0000)]
MFC r358533:
Sync libarchive with vendor.

Relevant vendor changes:
  Issue #1257: Add testcase for ZIPX files with LZMA_STREAM_END marker
  PR #1331: cpio.5: fix hard link description
  Issue #1335: archive_read.c: fix UBSan warning about undefined behavior
  Issue #1338: XAR reader: fix UBSan warning about undefined behavior
  Issue #1339: bsdcpio_test: fix datatype in from_hex()
  Issue #1341: Safe writes: delete temporary file if rename fails.
  Issue #1341: Safe writes: improve error handling

4 years agoFix sample check in hwpmc
Matt Macy [Thu, 12 Mar 2020 20:59:00 +0000 (20:59 +0000)]
Fix sample check in hwpmc

Don't drop samples with callchain pending

Tested by: mjg@

MFC of r353483

4 years agoMFC 339729:
Mateusz Piotrowski [Thu, 12 Mar 2020 20:51:04 +0000 (20:51 +0000)]
MFC 339729:

efivar(3): Fix some typos and improve style

- Fix some typos.
- Remove redundant semicolons from the synopsis section.
- Stylize variable names and types with Vt and Va respectively.
- Use a list to present non-implemented functions.
- Sort the order of the sections.
- Add a history section.
- Use Nm when "libefivar" is mentioned.

PR: 232626
Reported by: Tiwei Bie <btw@mail.ustc.edu.cn>
Reviewed by: bcr, imp
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17686

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24044

4 years agoMFC r358852:
Li-Wen Hsu [Thu, 12 Mar 2020 19:10:53 +0000 (19:10 +0000)]
MFC r358852:

Skip sys.netpfil.pf.nat.exhaust on amd64 in CI as it sometimes panics kernel

PR: 244703
Sponsored by: The FreeBSD Foundation

4 years agoMFC r339990:
Mateusz Piotrowski [Thu, 12 Mar 2020 19:00:28 +0000 (19:00 +0000)]
MFC r339990:

mount_smbfs(8): Add the STANDARDS and HISTORY sections

- Document that mount_smbfs(8) only supports SMB1 and that SMB2 and SMB3
  are not supported at the moment. Suggest users to browse ports for
  software compatible with newer versions of the protocol.
- Copy supported servers list from README.
- Add a SEE ALSO section and reference the chapter about Samba in the
  FreeBSD Handbook.
- Add a HISTORY section.
- Style changes:
  - Use Dq instead of Em in the EXAMPLES section.
  - Mark command modifiers with Cm.

Reviewed by:    bcr
Approved by:    bcr (mentor)
Approved by:    krion (mentor, implicit), mat (mentor, implicit)
Sponsored by:   Bally Wulff Games & Entertainment GmbH
Differential Revision:  https://reviews.freebsd.org/D17798

4 years agoMFC r358676:
Konstantin Belousov [Thu, 12 Mar 2020 16:09:41 +0000 (16:09 +0000)]
MFC r358676:
buffer pager: deref ucred immediately after read.

4 years agoMFC r358826:
Konstantin Belousov [Thu, 12 Mar 2020 16:07:41 +0000 (16:07 +0000)]
MFC r358826:
posixshmcontrol: add an undocumented alias 'list' for the 'ls' command.

4 years agoMFC r358683: Remove vfs.zfs.top_maxinflight tunable/sysctl.
Alexander Motin [Thu, 12 Mar 2020 03:59:51 +0000 (03:59 +0000)]
MFC r358683: Remove vfs.zfs.top_maxinflight tunable/sysctl.

It is dead since sorted scrub import at r334844.

4 years agoMFC r358463:
Li-Wen Hsu [Wed, 11 Mar 2020 13:45:53 +0000 (13:45 +0000)]
MFC r358463:

Fix test cases after r358448 (r358870 in stable/12)

sbin.pfctl.pfctl_test.pf0087
sbin.pfctl.pfctl_test.selfpf0087

Sponsored by: The FreeBSD Foundation

4 years agoMFC r358624:
Konstantin Belousov [Wed, 11 Mar 2020 08:51:19 +0000 (08:51 +0000)]
MFC r358624:
mlx5en: Support 50GBase-KR4 media type in mlx5en driver.

Sponsored by: Mellanox Technologies

4 years agoMFC r358537:
Hans Petter Selasky [Wed, 11 Mar 2020 08:32:15 +0000 (08:32 +0000)]
MFC r358537:
Expose the ACPI power button, sleep button and LID state as evdev's.

This allows libinput to disable touchpads when the lid is closed and
various desktop environments can show power-off dialogs when the power
button is pressed. While the latter is doable with devd a
cross-platform solution is nicer.

Submitted by: Greg V <greg@unrelenting.technology>
Differential Revision: https://reviews.freebsd.org/D23863
Sponsored by: Mellanox Technologies

4 years agoMFC r358586:
Hans Petter Selasky [Wed, 11 Mar 2020 08:28:12 +0000 (08:28 +0000)]
MFC r358586:
When closing a LinuxKPI file always use the real release function to avoid
resource leakage when destroying a LinuxKPI character device.

Submitted by: Andrew Boyer <aboyer@pensando.io>
Reviewed by: kib@
PR: 244572
Sponsored by: Mellanox Technologies

4 years agoMFC r358629:
Hans Petter Selasky [Wed, 11 Mar 2020 08:24:50 +0000 (08:24 +0000)]
MFC r358629:
Implement a detaching flag for the sound(4) subsystem to take
appropriate actions when we are trying to detach an audio device,
but cannot because someone is using it.

This avoids applications having to wait for the DSP read data
timeout before they receive any error indication.
Tested with virtual_oss(8).

Remove some unused definitions while at it.

PR: 194727
Sponsored by: Mellanox Technologies

4 years agoMFC r358738:
Hans Petter Selasky [Wed, 11 Mar 2020 08:20:14 +0000 (08:20 +0000)]
MFC r358738:
Remove the power bit from the super speed root hub port status register
because it clobbers the super speed link status when a device is in super
speed mode. Currently the power bit is not needed for anything in the USB
hub driver.

This fixes USB warm reset for super speed devices.

Tested by: Shichun.Ma@dell.com
Sponsored by: Mellanox Technologies

4 years agoMFC r358154 (by delphij)
Pedro F. Giffuni [Wed, 11 Mar 2020 05:45:33 +0000 (05:45 +0000)]
MFC r358154 (by delphij)
Bump PROTOMAX: this matches the value on NetBSD and will be necessary for
future updates.

MFC r r358448;
/etc/services: attempt to bring the database to this century.

This is the result of splitting r358153 in two, in order to avoid a build
system bug and being able to merge the change to previous releases..

Document better this file, updating the URL to the IANA registry and closely
match the official services.

For system ports (0 to 1023) we now try to follow the registry closely, noting
some historical differences where applicable.

As a side effect: drop references to unofficial Kerberos IV which was EOL'ed
on Oct 2006[1]. While it is conceivable some people may still use it in some
very old FreeBSD machines that can't be replaced easily, the use of it is
considered a security risk. Also drop the unofficial netatalk, which we
supported long ago in the kernel but was dropped long ago.

Leave for now smtps, even though it conflicts with IANA's submissions.
The change should have very little visibility, if any, but should be a
step closer to the current IANA database.

[1] https://web.mit.edu/kerberos/krb4-end-of-life.html

4 years agoMFC r358580: Increase number of write completion threads, matching ZoL.
Alexander Motin [Tue, 10 Mar 2020 15:18:53 +0000 (15:18 +0000)]
MFC r358580: Increase number of write completion threads, matching ZoL.

Our iSCSI benchmarks on a large 80-core system show that previous limit
of 8 threads can be a bottleneck.  At some points this change increases
write IOPS by as much as 50%.  I am still not sure that so many threads
is really required, but we tested lower amounts and got no significant
benefits, while latencies were a bit worse, so decided to not diverge.

4 years agoMFC r358352:
Sergio Carlavilla Delgado [Mon, 9 Mar 2020 19:55:13 +0000 (19:55 +0000)]
MFC r358352:
Add HISTORY sections to tree(3), stdarg(3) and sigevent(3)

Submitted by: gbergling@gmail.com
Approved by: bcr@(mentor)

4 years agoMFC r346299: iflibtxrx.9: update function descriptions to match implementation
Ed Maste [Mon, 9 Mar 2020 15:28:52 +0000 (15:28 +0000)]
MFC r346299: iflibtxrx.9: update function descriptions to match implementation

isc_rxd_refill, isc_rxd_flush return nothing, not void *.

isc_txd_credits_update, isc_rxd_available return int, not int *.

isc_txd_credits_update has a bool as final argument, not a uint32_t.
Prior to r315217 it took four arguments; the final two were
uint32_t, bool.

Reported by: Gerald Aryeetey <aryeeteygerald_rogers.com>
Sponsored by: The FreeBSD Foundation

4 years agoMFC r358299: muge: fix rxcsum enable test
Ed Maste [Mon, 9 Mar 2020 14:13:40 +0000 (14:13 +0000)]
MFC r358299: muge: fix rxcsum enable test

if_capabilities indicates capabilities supported by the hardware;
if_capenable which are enabled.  Note that rx checksum is still disabled
in the driver at compile time.

Submitted by: Johannes <iz-rpi04@hs-karlsruhe.de>

4 years agomake sysent after r358805, readlinkat return type MFC
Ed Maste [Mon, 9 Mar 2020 13:35:07 +0000 (13:35 +0000)]
make sysent after r358805, readlinkat return type MFC

4 years agoMFC r346273: correct readlinkat(2) return type
Ed Maste [Mon, 9 Mar 2020 13:33:58 +0000 (13:33 +0000)]
MFC r346273: correct readlinkat(2) return type

r176215 corrected readlink(2)'s return type and the type of the last
argument.  readlink(2) was introduced in r177788 after being developed
as part of Google Summer of Code 2007; it appears to have inherited the
wrong return type.

Man pages and header files were already ssize_t; update syscalls.master
to match.

PR: 197915
Submitted by: Henning Petersen <henning.petersen@t-online.de>

4 years agoMFC r358554: Add deprecation notices to ctau and cx drivers
Ed Maste [Mon, 9 Mar 2020 13:04:47 +0000 (13:04 +0000)]
MFC r358554: Add deprecation notices to ctau and cx drivers

These support outdated or obsolete ISA WAN (T1/E1) sync serial cards,
and these drivers haven't really been touched (other than in tree-wide
sweeps to keep them building) for 15+ years.

Related PCI devices ce and cp are still in the tree.

Relnotes: Yes
Sponsored by: The FreeBSD Foundation

4 years agoMFC r358711:
Dimitry Andric [Mon, 9 Mar 2020 07:12:02 +0000 (07:12 +0000)]
MFC r358711:

Merge commit f75939599 from llvm git (by Erich Keane):

  Reland r374450 with Richard Smith's comments and test fixed.

  The behavior from the original patch has changed, since we're no
  longer allowing LLVM to just ignore the alignment.  Instead, we're
  just assuming the maximum possible alignment.

  Differential Revision: https://reviews.llvm.org/D68824

  llvm-svn: 374562

This fixes 'Assertion failed: (Alignment != 0 && "Invalid Alignment"),
function CreateAlignmentAssumption', when building recent versions of
v8, which invoke __builtin_assume_aligned() with its alignment argument
set to 4GiB or more.

Clang will now report a warning, and show the maximum possible alignment
instead, e.g.:

huge-align.cpp:1:27: warning: requested alignment must be 536870912 bytes or smaller; maximum alignment assumed [-Wbuiltin-assume-aligned-alignment]
void *f(void *g) { return __builtin_assume_aligned(g, 4294967296); }
                          ^                           ~~~~~~~~~~

Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=43839
Reported by: cem

4 years agoMFC r355594: remove again nonexistent from-* entries from vt INDEX.keymaps
Ed Maste [Sun, 8 Mar 2020 23:31:03 +0000 (23:31 +0000)]
MFC r355594: remove again nonexistent from-* entries from vt INDEX.keymaps

PR: 235564, 235853

4 years agoMFC r355592: Add Danish translation for vt font and keymap INDEX files
Ed Maste [Sun, 8 Mar 2020 23:26:21 +0000 (23:26 +0000)]
MFC r355592: Add Danish translation for vt font and keymap INDEX files

Also sort some entries into the correct location, correct MacBook
capitalization, etc.

PR: 235853
Submitted by: scootergrisen gmail com

4 years agoMFC r350468: pf: zero (another) output buffer in pfioctl
Ed Maste [Sun, 8 Mar 2020 23:22:18 +0000 (23:22 +0000)]
MFC r350468: pf: zero (another) output buffer in pfioctl

Avoid potential structure padding leak.  r350294 identified a leak via
static analysis; although there's no report of a leak with the
DIOCGETSRCNODES ioctl it's a good practice to zero the memory.

Suggested by: kp
Sponsored by: The FreeBSD Foundation

4 years agoMFC r350294: pf: zero output buffer in pfioctl
Ed Maste [Sun, 8 Mar 2020 23:20:24 +0000 (23:20 +0000)]
MFC r350294: pf: zero output buffer in pfioctl

Avoid potential structure padding leak.

Reported by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
Security: Potential kernel memory disclosure
Sponsored by: The FreeBSD Foundation