Displaying 1 50 of 322,619 commits (0.028s)

FreeBSD — projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core ib_fmr_pool.c

Build fix for kernel LINT target.

Sponsored by:        Mellanox Technologies

FreeBSD — projects/bsd_rdma_4_9 Makefile.inc1, projects/bsd_rdma_4_9/contrib/ofed Makefile usr.lib

Simplify the build dependencies when building the OFED libraries.

Suggested by:        bdrewery@
Sponsored by:        Mellanox Technologies

FreeBSD — head/sys/amd64/amd64 machdep.c, head/sys/amd64/ia32 ia32_signal.c

Don't let cpu_set_syscall_retval() clobber exec_setregs().

Upon successful completion, the execve() system call invokes
exec_setregs() to initialize the registers of the initial thread of the
newly executed process. What is weird is that when execve() returns, it
still goes through the normal system call return path, clobbering the
registers with the system call's return value (td->td_retval).

Though this doesn't seem to be problematic for x86 most of the times (as
the value of eax/rax doesn't matter upon startup), this can be pretty
frustrating for architectures where function argument and return
registers overlap (e.g., ARM). On these systems, exec_setregs() also
needs to initialize td_retval.

Even worse are architectures where cpu_set_syscall_retval() sets
registers to values not derived from td_retval. On these architectures,
there is no way cpu_set_syscall_retval() can set registers to the way it
wants them to be upon the start of execution.

To get rid of this madness, let sys_execve() return EJUSTRETURN. This
will cause cpu_set_syscall_retval() to leave registers intact. This
makes process execution easier to understand. It also eliminates the
difference between execution of the initial process and successive ones.
The initial call to sys_execve() is not performed through a system call

    [3 lines not shown]

FreeBSD — head/stand/userboot/test test.c

Mark the func pointer as __dead2. It looks up loader_main, which
either aborts or exits, but never returns. Tag it as a non-returning
function rather than supply a bogus return(0) at the end of main.

CID: 1382885
Sponsored by: Netflix
Delta File
+1 -1 head/stand/userboot/test/test.c
+1 -1 1 file

FreeBSD — head/stand/common load_elf.c

Fix theoretical integer overflow issues. If the product here is
greater than 2^31-1, then the result will be huge. This is unlikely,
as we don't support that many sections, but out of an abundace of
caution cast to size_t so the multiplication won't overflow
mysteriously when size_t is larger than 32-bits. The resulting code
may be a smidge larger, but this isn't super-space critical code.

CID: 1194216, 1194217, 1194222, 1194223, 1265018, 1265019,1265020,
Sponsored by: Netflix
Delta File
+2 -2 head/stand/common/load_elf.c
+2 -2 1 file

FreeBSD — stable/11/sys/modules/ipfw Makefile, stable/11/sys/netpfil/ipfw ip_fw2.c

MFC r325960:
  Unconditionally enable support for O_IPSEC opcode.

  IPsec support can be loaded as kernel module, thus do not depend from
  kernel option IPSEC and always build O_IPSEC opcode implementation as

MFC r325962:
  Do not invoke IPv4 NAT handler for non IPv4 packets. Libalias expects
  a packet is IPv4. And in case when it is IPv6, it just translates them
  as IPv4. This leads to corruption and in some cases to panics.
  In particular a panic can happen when value of ip6_plen modified to
  something that leads to IP fragmentation, but actual packet length does
  not match the IP length.

  Packets that are not IPv4 will be dropped by NAT rule.

FreeBSD — head/sys/arm/allwinner/clkng aw_ccung.c

Add ccu compat string for Allwinner a83t

A ccu driver was added for the a83t in r326114. Add compat string to
aw_ccung and register the clocks for the a83t upon attach.

Reviewed by:        manu
Approved by:        emaste (mentor, implicit)
Differential Revision:        https://reviews.freebsd.org/D13205

FreeBSD — head/share/examples/bhyve vmrun.sh

vmrun.sh: add -A option for AHCI emulation of disk devices

AHCI emulation is useful for testing scenarios closer to the real
hardware.  For example, it allows to exercise the CAM subsystem.
There could be other uses as well.

MFC after:        2 weeks

FreeBSD — head/usr.bin/vmstat vmstat.c

vmstat: use 64-bit counters from struct vmtotal.

Consistently print counters using unsigned intmax type.

Submitted by:        Pawel Biernacki <pawel.biernacki at gmail.com>
Sponsored by:        Mysterious Code Ltd.
Differential revision:        https://reviews.freebsd.org/D13199
Delta File
+6 -6 head/usr.bin/vmstat/vmstat.c
+6 -6 1 file

FreeBSD — head/usr.bin/vmstat vmstat.c

Use C standard spelling uint64_t for u_int64_t.

Submitted by:        Pawel Biernacki <pawel.biernacki at gmail.com>
Sponsored by:        Mysterious Code Ltd.
X-Differential revision:        https://reviews.freebsd.org/D13199
Delta File
+3 -3 head/usr.bin/vmstat/vmstat.c
+3 -3 1 file

FreeBSD — head/sys/arm/arm machdep.c, head/sys/arm64/arm64 machdep.c

Ensure we check the program state set in the trap frame on arm and arm64.
This value may be set by userspace so we need to check it before using it.
If this is not done correctly on exception return the kernel may continue
in kernel mode with all registers set to a userspace controlled value. Fix
this by moving the check into set_mcontext, and also add the missing
sanitisation from the arm64 set_regs.

Discussed with:        security-officer@
MFC after:        3 days
Sponsored by:        DARPA, AFRL

FreeBSD — head/contrib/binutils/bfd peXXigen.c

bfd: avoid crash on corrupt binaries

From binutils commits 5a4b0ccc20ba30caef53b01bee2c0aaa5b855339 and
7e1e19887abd24aeb15066b141cdff5541e0ec8e, made available under GPLv2
by Nick Clifton.

PR:                198824
MFC after:        1 week
Security:        CVE-2014-8501
Security:        CVE-2014-8502
Delta File
+20 -0 head/contrib/binutils/bfd/peXXigen.c
+20 -0 1 file

FreeBSD — head/contrib/binutils/bfd ihex.c

bfd: fix segfault in the ihex parser on malformed ihex file

From binutils commit 0102ea8cec5fc509bba6c91df61b7ce23a799d32, made
available under GPLv2 by Nick Clifton.

PR:                198824
MFC after:        1 week
Security:        CVE-2014-8503
Delta File
+1 -1 head/contrib/binutils/bfd/ihex.c
+1 -1 1 file

FreeBSD — head/sys/cddl/contrib/opensolaris/uts/common/dtrace fasttrap.c

Duplicate helpers after disabling inherited tracepoints during a fork.

We may create probes in the nascent child process, so we first need to
ensure that any inherited tracepoints are first removed. Otherwise the
probe sites will not be in the state expected by fasttrap, and it won't
be able to enable the probes.

MFC after:        2 weeks

FreeBSD — head/sys/geom/mirror g_mirror.c g_mirror.h

Allow kern.geom.mirror.debug to be negative.

A negative value can be used to suppress all prints from the gmirror
kernel code, which can be useful when attempting to trigger race
conditions using stress tests.

MFC after:        1 week

FreeBSD — stable/11/sys/vm vm_mmap.c

MFC r325528:
Correct the type of foff.
Delta File
+1 -1 stable/11/sys/vm/vm_mmap.c
+1 -1 1 file

FreeBSD — stable/11/sys/vm vm_pageout.c

MFC r325561:
Allow various page daemon parameters to be set from loader.conf.
Delta File
+9 -9 stable/11/sys/vm/vm_pageout.c
+9 -9 1 file

FreeBSD — stable/11/sys/cddl/compat/opensolaris/kern opensolaris_proc.c, stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace fasttrap_isa.c

MFC r325887:
Avoid holding the process in uread() and uwrite().

FreeBSD — stable/11/cddl/contrib/opensolaris/lib/libctf/common ctf.5

MFC r324864, r324865:
Cleanups for ctf.5.

FreeBSD — head/sys/dev/iscsi iscsi.c icl_soft.c, head/sys/dev/iser icl_iser.c

Make sure the iSCSI I/O limits are set properly so that the ISCSIDSEND IOCTL
can be used prior to the ISCSIDHANDOFF IOCTL which set the negotiated values.
Else the login PDU will fail when passing the "-r" option to "iscsictl" which
means iSCSI over RDMA instead of TCP/IP.

Discussed with:        np@ and trasz@
Sponsored by:        Mellanox Technologies
MFC after:        1 week

FreeBSD — user/pho/stress2/misc mmap32.sh

Add a regression test.

PR:                223732
Sponsored by:        Dell EMC Isilon
Delta File
+202 -0 user/pho/stress2/misc/mmap32.sh
+202 -0 1 file

FreeBSD — head/usr.sbin/kgmon kgmon.8

Mark kgmon(8) obsolete, redirecting users to pmcstat(8).

MFC after:        2 weeks
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D12574
Delta File
+8 -1 head/usr.sbin/kgmon/kgmon.8
+8 -1 1 file

FreeBSD — projects/bsd_rdma_4_9/sys/dev/iser iser_verbs.c

The __internal_mr is freed as part of the protection domain, pd.
There is no need to free this mr. This fixes an issue accessing
freed memory in ISER.

Sponsored by:        Mellanox Technologies

FreeBSD — head/include stdlib.h, head/sys/amd64/include pcpu.h profile.h

Remove lint support from system headers and MD x86 headers.

Reviewed by:        dim, jhb
Discussed with:        imp
Sponsored by:        The FreeBSD Foundation
Differential revision:        https://reviews.freebsd.org/D13156

FreeBSD — head/lib/libc/sys procctl.2, head/sys/kern kern_procctl.c

Kill all descendants of the reaper, even if they are descendants of a
subordinate reaper.

Also, mark reapers when listing pids.

Reported by:        Michael Zuo <muh.muhten at gmail.com>
PR:        223745
Reviewed by:        bapt
Sponsored by:        The FreeBSD Foundation
MFC after:        1 week
Differential revision:        https://reviews.freebsd.org/D13183

FreeBSD — head/sys/dev/efidev efirtc.c

Zero struct efi_tm before setting the needed values. We don't use the dst
or timezone fields so ensure these are set.

Reported by:        emaste
Sponsored by:        DARPA, AFRL
Delta File
+1 -0 head/sys/dev/efidev/efirtc.c
+1 -0 1 file

FreeBSD — stable/11/sys/dev/ahci ahci_pci.c

MFC r325571: Add some PCI IDs found on AMD Epyc system.
Delta File
+5 -0 stable/11/sys/dev/ahci/ahci_pci.c
+5 -0 1 file

FreeBSD — stable/11/sys/cam/ata ata_da.c, stable/11/sys/cam/scsi scsi_da.c

MFC r325888:

Add some 4k quirks for Samsung pm863a SSDs

Submitted by:        Nikita Kozlov <nikita.kozlov at blade-group.com>
Sponsored by:        blade
Differential Revision:        https://reviews.freebsd.org/D13093

FreeBSD — head/sys/netpfil/ipfw ip_fw_dynamic.c ip_fw2.c

Modify ipfw's dynamic states KPI.

Hide the locking logic used in the dynamic states implementation from
generic code. Rename ipfw_install_state() and ipfw_lookup_dyn_rule()
function to have similar names: ipfw_dyn_install_state() and
ipfw_dyn_lookup_state(). Move dynamic rule counters updating to the
ipfw_dyn_lookup_state() function. Now this function return NULL when
there is no state and pointer to the parent rule when state is found.
Thus now there is no need to return pointer to dynamic rule, and no need
to hold bucket lock for this state. Remove ipfw_dyn_unlock() function.

Obtained from:        Yandex LLC
MFC after:        1 week
Sponsored by:        Yandex LLC
Differential Revision:        https://reviews.freebsd.org/D11657

FreeBSD — head/sys/netpfil/ipfw ip_fw_dynamic.c

Check that address family of state matches address family of packet.

If it is not matched avoid comparing other state fields.

Obtained from:        Yandex LLC
MFC after:        1 week
Sponsored by:        Yandex LLC

FreeBSD — head/sys/netpfil/ipfw ip_fw2.c ip_fw_dynamic.c

Move ipfw_send_pkt() from ip_fw_dynamic.c into ip_fw2.c.
It is not specific for dynamic states function and called also from
generic code.

Obtained from:        Yandex LLC
MFC after:        1 week
Sponsored by:        Yandex LLC

FreeBSD — head/sys/netpfil/ipfw ip_fw_sockopt.c

Rework rule ranges matching. Use comparison rule id with UINT32_MAX to
match all rules with the same rule number.

Obtained from:        Yandex LLC
MFC after:        1 week
Sponsored by:        Yandex LLC

FreeBSD — head/sys/arm/allwinner/a83t files.a83t, head/sys/arm/allwinner/clkng ccu_a83t.c ccu_a83t.h

Allwinner a83t: add ccung bits

Upstream DTS has switched to using CCU rather than /clocks nodes. Add a CCU
driver for the a83t to bring us closer to upstream, but don't yet attach it
to ccu node.

Reviewed by:        manu
Approved by:        emaste (mentor)
Differential Revision:        https://reviews.freebsd.org/D12843

FreeBSD — head/sys/arm/allwinner/clkng aw_clk.h aw_clk_prediv_mux.c

aw_ccung: changes to accommodate upcoming a83t support

Add a means to specify mask/value for the prediv condition instead of
shift/width/value for clocks that have a more complex mux scenario.

Specifically, ahb1 on the a83t has the prediv applied if mux is either b10
or b11.

Reviewed by:        manu
Approved by:        emaste (mentor)
Differential Revision:        https://reviews.freebsd.org/D12851

FreeBSD — head/sys/kern kern_sx.c

sx: unbreak debug after r326107

An assertion was modified to use the found value, but it was not updated to
handle a race where blocked threads appear after the entrance to the func.

Move the assertion down to the area protected with sleepq lock where the
lock is read anyway. This does not affect coverage of the assertion and
is consistent with what rw locks are doing.

Reported by:        Shawn Webb
Delta File
+1 -1 head/sys/kern/kern_sx.c
+1 -1 1 file

FreeBSD — head/sys/kern kern_rwlock.c

rwlock: unbreak WITNESS builds after r326110

Reported by:        Shawn Webb
Delta File
+1 -1 head/sys/kern/kern_rwlock.c
+1 -1 1 file

FreeBSD — head/sys/kern kern_rwlock.c

rwlock: don't check for curthread's read lock count in the fast path
Delta File
+17 -9 head/sys/kern/kern_rwlock.c
+17 -9 1 file

FreeBSD — head/sys/conf files, head/sys/dev/bhnd bhnd_types.h

bhnd(4): Add a basic ChipCommon GPIO driver sufficient to support bwn(4)

The driver is functional on both BHND Wi-Fi adapters and MIPS SoCs, but
does not currently include support for features not required by bwn(4),
including GPIO interrupt handling.

Approved by:        adrian (mentor, implicit)
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D12708

FreeBSD — head/usr.bin/systat vmstat.c

Order declarations alphabetically.
Match signess of the format and the value.

Noted by:        bde
Sponsored by:        The FreeBSD Foundation
Delta File
+2 -2 head/usr.bin/systat/vmstat.c
+2 -2 1 file

FreeBSD — head/sys/kern kern_sx.c kern_mutex.c, head/sys/sys mutex.h rwlock.h

locks: pass the found lock value to unlock slow path

This avoids an explicit read later.

While here whack the cheaply obtainable 'tid' argument.

FreeBSD — head/sys/kern kern_rwlock.c kern_sx.c, head/sys/sys rwlock.h sx.h

locks: remove the file + line argument from internal primitives when not used

The pair is of use only in debug or LOCKPROF kernels, but was passed (zeroed)
for many locks even in production kernels.

While here whack the tid argument from wlock hard and xlock hard.

There is no kbi change of any sort - "external" primitives still accept the

FreeBSD — stable/10/lib/libnetgraph netgraph.3 Makefile

MFC r325552: s/NgSendMsgReply/NgSendReplyMsg/ in man to match the code.

Submitted by:        Dmitry Luhtionov <dmitryluhtionov at gmail.com>

FreeBSD — stable/11/lib/libnetgraph netgraph.3 Makefile, stable/11/tools/build/mk OptionalObsoleteFiles.inc

MFC r325552: s/NgSendMsgReply/NgSendReplyMsg/ in man to match the code.

Submitted by:        Dmitry Luhtionov <dmitryluhtionov at gmail.com>

FreeBSD — stable/11/usr.sbin/syslogd syslogd.c

MFC r325558:

  When parsing UDP messages skip optional hostname as described by
  RFC 3164.

PR:                200933
Submitted by:        maxim
Reported by:        Konstantin Pavlov <thresh nginx.com>
Delta File
+14 -1 stable/11/usr.sbin/syslogd/syslogd.c
+14 -1 1 file

FreeBSD — head/sys/conf files, head/sys/dev/bhnd bhnd.c bhnd_bus_if.m

bhnd(4): extend the PMU APIs to support bwn(4)

The bwn(4) driver requires a number of extensions to the bhnd(4) PMU
interface to support external configuration of PLLs, LDOs, and other
parameters that require chipset or PHY-specific workarounds.

These changes add support for:

- Writing raw voltage register values to PHY-specific LDO regulator
  registers (required by LP-PHY).
- Enabling/disabling PHY-specific LDOs (required by LP-PHY)
- Writing to arbitrary PMU chipctrl registers (required for common PHY PLL
  reset support).
- Requesting chipset/PLL-specific spurious signal avoidance modes.
- Querying clock frequency and latency.

Additionally, rather than updating legacy PWRCTL support to conform to the
new PMU interface:

- PWRCTL API is now provided by a bhnd_pwrctl_if.m interface.
- Since PWRCTL is only found in older SSB-based chipsets, translation from
  bhnd(4) bus APIs to corresponding PWRCTL operations is now handled
  entirely within the siba(4) driver.
- The PWRCTL-specific host bridge clock gating APIs in bhnd_bus_if.m have
  been lifted out into a standalone bhnd_pwrctl_hostb_if.m interface.

    [4 lines not shown]

FreeBSD — head/lib/libcam/tests libcam_test.c

Add a test case for cam_get_device with sa(4) devices

sa(4) has some unique behavior that is special-cased in cam_get_device. The
existing tests don't provide coverage for this special case.

Reviewed by:        ken
MFC after:        3 weeks
Sponsored by:        Spectra Logic Corp
Differential Revision:        https://reviews.freebsd.org/D13185
Delta File
+28 -0 head/lib/libcam/tests/libcam_test.c
+28 -0 1 file

FreeBSD — head/sys/cam cam_xpt.c

Always null-terminate CAM periph_name and dev_name

Reported by:        Coverity
CID:                1010039, 1010040, 1010041, 1010043
Reviewed by:        ken, imp
MFC after:        3 weeks
Sponsored by:        Spectra Logic Corp
Differential Revision:        https://reviews.freebsd.org/D13194
Delta File
+16 -10 head/sys/cam/cam_xpt.c
+16 -10 1 file

FreeBSD — head/usr.bin/iscsictl iscsictl.c

Fix language in a bunch of error messages.

Reviewed by:                emaste
Approved by:                emaste
MFC after:                1 month
Differential Revision:        D13193
Delta File
+27 -27 head/usr.bin/iscsictl/iscsictl.c
+27 -27 1 file

FreeBSD — head/sys/vm vm_map.c

Return different error code for the guard page layout violation.

On KERN_NO_SPACE error, as it is returned now, vm_map_find() continues
the loop searching for the suitable range for the requested mapping
with specific alignment.  Since the vm_map_findspace() succesfully
finds the same place, the loop never ends.

The errors returned from vm_map_stack() completely repeat the behavior
of vm_map_insert() now, as suggested by Alan.

Reported by:        Arto Pekkanen <aksyom at gmail.com>
PR:        223732
Reviewed by:        alc, markj
Discussed with:        jhb
Sponsored by:        The FreeBSD Foundation
MFC after:        3 days
Differential revision:        https://reviews.freebsd.org/D13186
Delta File
+6 -5 head/sys/vm/vm_map.c
+6 -5 1 file