Displaying 1 50 of 469,668 commits (0.026s)

PC-BSD — sys/netipsec ipsec.c

Merge remote-tracking branch 'freebsd/stable/11' into freebsd11
∈ ae - b1d40028 - 2017-01-15 15:43:19
MFC r311679:
  Add direction argument to ipsec_setspidx_inpcb() function.

  This function is used only by ipsec_getpolicybysock() to fill security
  policy index selector for locally generated packets (that have INPCB).
  The function incorrectly assumes that spidx is the same for both directions.
  Fix this by using new direction argument to specify correct INPCB security
  policy - sp_in or sp_out. There is no need to fill both policy indeces,
  because they are overwritten for each packet.
  This fixes security policy matching for outbound packets when user has
  specified TCP/UDP ports in the security policy upperspec.

  PR:                213869
Delta File
+10 -7 sys/netipsec/ipsec.c
+10 -7 1 file

PC-BSD — sys/sys cdefs.h

MFC r311896
Remove unused __gnu_inline() attribute.

This was meant to be used by a future FORTIFY_SOURCE implementation.
Probably for good, FORTIFY_SOURCE and this particular GCCism were never
well supported by clang or other compilers. Furthermore, the technology
has long since been replaced by either static checkers, sanitizers, or
even just the strong stack protector that was enabled by default.

Drop __gnu_inline to avoid cluttering the headers.
Delta File
+0 -16 sys/sys/cdefs.h
+0 -16 1 file

PC-BSD — sys/cddl/contrib/opensolaris/uts/common/fs/zfs vdev_geom.c

Merge remote-tracking branch 'freebsd/stable/11' into freebsd11
∈ Alexander Motin - 57671c3a - 2017-01-14 15:21:51
Axe out long broken vfs.zfs.vdev.larger_ashift_minimal sysctl.

It is replaced with vfs.zfs.min_auto_ashift.

Ticket:        #20261
(cherry picked from commit b934baec32e6cc8b3352723de587f22b540ab121)
(cherry picked from commit 2ae78f31485a998365546d6959f33eab0712c674)

PC-BSD — sys/dev/cxgbe t4_main.c

MFC r311848:
cxgbe(4): Attach to the 2x25 debug card.  This is for internal use only.
Delta File
+1 -0 sys/dev/cxgbe/t4_main.c
+1 -0 1 file

PC-BSD — sys/dev/cxgbe t4_sge.c

MFC r311831 and r311832.

r311831:
cxgbe(4): The wraparound logic in start_wrq_wr() should not get involved
in work requests that end at the end of the descriptor ring, even though
the pidx wraps around to 0.

r311832:
cxgbe(4): Enable automatic cidx flush for all control queues.
Delta File
+3 -2 sys/dev/cxgbe/t4_sge.c
+3 -2 1 file

PC-BSD — sys/cddl/contrib/opensolaris/uts/common/fs/zfs vdev_geom.c

Axe out long broken vfs.zfs.vdev.larger_ashift_minimal sysctl.

It is replaced with vfs.zfs.min_auto_ashift.

Ticket:        #20261
(cherry picked from commit b934baec32e6cc8b3352723de587f22b540ab121)

PC-BSD — sys/cddl/contrib/opensolaris/uts/common/fs/zfs vdev_geom.c

Axe out long broken vfs.zfs.vdev.larger_ashift_minimal sysctl.

It is replaced with vfs.zfs.min_auto_ashift.

Ticket:        #20261
(cherry picked from commit b934baec32e6cc8b3352723de587f22b540ab121)
(cherry picked from commit 2ae78f31485a998365546d6959f33eab0712c674)

PC-BSD — sys/cddl/contrib/opensolaris/uts/common/fs/zfs vdev_geom.c

Axe out long broken vfs.zfs.vdev.larger_ashift_minimal sysctl.

It is replaced with vfs.zfs.min_auto_ashift.

Ticket:        #20261

PC-BSD — sys/sys unistd.h

MFC r311646:
Define _POSIX_PRIORITY_SCHEDULING as 0, to account for the kernel option.
Delta File
+1 -1 sys/sys/unistd.h
+1 -1 1 file

PC-BSD — tests/sys/acl 01.sh

MFC r309464:

Expect 01:main to fail

Changes were made to ZFS in the past year with respect to how ACLs
are handled, causing failures in this test. Mark it TODO so (hopefully)
someone more knowledgeable (like mav or trasz) will fix the code or the
test.

PR:        212323
Delta File
+1 -1 tests/sys/acl/01.sh
+1 -1 1 file

PC-BSD — share/man/man4 sfxge.4, sys/dev/sfxge sfxge_port.c

MFC r311983

sfxge(4): add sysctl to change MAC stats update period

The sysctl controls the period per interface.

Sponsored by:   Solarflare Communications, Inc.

PC-BSD — share/man/man4 sfxge.4, sys/dev/sfxge sfxge_port.c sfxge.h

MFC r311977

sfxge(4): add tunable to configure MAC stats update period

Sponsored by:   Solarflare Communications, Inc.

PC-BSD — sys/dev/sfxge sfxge_port.c sfxge.h

MFC r311962

sfxge(4): stats refresh in SW should depend on HW update period

The period should be taken into account by the function which
refreshes driver stats.

Sponsored by:   Solarflare Communications, Inc.

PC-BSD — sys/dev/sfxge/common efx_mcdi.c efx_mcdi.h

MFC r311961

sfxge(4): do not ignore requested MAC stats update period

Firmware version which takes PERIOD_MS parameter into account is
required.

Sponsored by:   Solarflare Communications, Inc.

PC-BSD — sys/dev/sfxge sfxge_tx.c

MFC r311877

sfxge(4): avoid unnecessary mbuf data prefetch

Unnecessary prefetch just loads HW prefetcher and displaces other
cache entries (which could be really useful).

If we parse mbuf for TSO early and use firmware-assisted TSO, we do not
expect mbuf data access when we compose firmware-assisted TSO (v1 or v2)
option descriptors.  If packet header needs to be linearized or finally
FATSO cannot be used because of, for example, too big header, we do not
care about a bit more performance degradation because of prefetch
absence (it is better to optimize more common case).

Sponsored by:   Solarflare Communications, Inc.
Delta File
+14 -0 sys/dev/sfxge/sfxge_tx.c
+14 -0 1 file

PC-BSD — sys/dev/cxgbe/tom t4_tom.c t4_listen.c

MFC r311569, r311657, and r311949.

r311569:
Fix comment in t4_tom.  No functional change.

r311657:
cxgbe/t4_tom: Fix tid accounting.  An offloaded IPv6 connection uses 2
tids, not 1, in the hardware.

r311949:
cxgbe/tom: Add VIMAGE support to the TOE driver.

Active Open:
- Save the socket's vnet at the time of the active open (t4_connect) and
  switch to it when processing the reply (do_act_open_rpl or
  do_act_establish).

Passive Open:
- Save the listening socket's vnet in the driver's listen_ctx and switch
  to it when processing incoming SYNs for the socket.
- Reject SYNs that arrive on an ifnet that's not in the same vnet as the
  listening socket.

CLIP (Compressed Local IPv6) table:
- Add only those IPv6 addresses to the CLIP that are in a vnet

    [10 lines not shown]

PC-BSD — tools/tools/gensnmpdef Makefile

MFC r311748:

Bump WARNS up from 0 to 6
Delta File
+2 -0 tools/tools/gensnmpdef/Makefile
+2 -0 1 file

PC-BSD — contrib/bsnmp/gensnmpdef gensnmpdef.c

MFC r311750,r311754,r311757:

r311750:

Check result from smiGetFirstNode and smiGetNodeByOID

This avoids a segfault with malformed or unanticipated files,
like IPV6-TC.txt (a file containing just TEXTUAL-CONVENTIONS).

Found with:        gensnmpdef /usr/local/share/snmp/mibs/IPV6-TC.txt

r311754:

Use calloc instead of malloc + memset(.., 0, ..)

r311757:

Similar to r311750, check for the result from smiGetModule to avoid a segfault
when dereferencing a NULL pointer later on.

Choose to just check for the NULL pointer in the next for-loop for now to fix
the issue with a minimal amount of code churn

sys/queue.h use here would make more sense than using a static table

PC-BSD — contrib/netbsd-tests/lib/libc/sys t_unlink.c

MFC r311236,r311919:

r311236:

unlink_fifo: don't leak the file descriptors opened with mkfifo and open

MFC fater:        3 days
CID:                978316, 978317

r311919:

Partially revert r311236

There's no sense in trying to close a file descriptor from the negative cases
with unlink_test; it's best to ignore these cases.

The mkfifo case does make sense to keep though.

PC-BSD — contrib/netbsd-tests/lib/libc/gen t_setdomainname.c t_sethostname.c

MFC r311924:

Fix whitespace in comment

PC-BSD — contrib/netbsd-tests/lib/libc/regex debug.c

MFC r311926:

Consolidate __NetBSD__ #ifdef

PC-BSD — contrib/netbsd-tests/lib/libc/gen t_dir.c

MFC r311227,r311917:

r311227:

seekdir_basic: fix various Coverity issues

Address..
- .. resource leaks of file descriptors and memory
- .. unchecked return values from creat(2), mkdir(2), and telldir(3)
- .. potential NULL derefs after calling readdir(3)

CID:                975255, 975256, 976989, 978989, 978990

r311917:

Fix up r311227

Check for creat returning a value != -1, not a non-zero value

Pointyhat to:        ngie
CID:                1368366

PC-BSD — contrib/bsnmp/snmp_mibII mibII.c mibII_interfaces.c

    MFC r310950:
    
    MIB-II: use strlcpy when copying interface names to .ifr_name
    
    .ifra_name is assumed to be NUL terminated; using strlcpy(3)
    ensures that it's indeed NUL terminated whereas strncpy does
    not.
    
    Tested and verified as follows with a combination of ifconfig,
    snmpget, and snmpset:
    
      % ifconfig create lo1 127.0.0.2/8
      % SNMPARGS="-v 3 -n '' -u bsnmp -A bsnmptest -l authPriv -a sha -x des -X bsnmptest 
localhost"
      % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4
      IF-MIB::ifAdminStatus.4 = INTEGER: up(1)
      % snmpset $SNMPARGS IF-MIB::ifAdminStatus.4 i 2
      IF-MIB::ifAdminStatus.4 = INTEGER: down(2)
      % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4
      IF-MIB::ifAdminStatus.4 = INTEGER: down(2)
      % snmpset $SNMPARGS IF-MIB::ifAdminStatus.4 i 1
      IF-MIB::ifAdminStatus.4 = INTEGER: up(1)
      % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4
      IF-MIB::ifAdminStatus.4 = INTEGER: up(1)
    
    CID:                1009652-1009656, 1349850

PC-BSD — sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_acl.c

Revert "MFV r299451: 6764 zfs issues with inheritance flags during chmod(2) with"

This reverts commit 5406e47e289c0760099c1117006f15725c6aa7ba.

PC-BSD — sys/conf NOTES

MFC 304492,310721,310734: Update cxgbe info in NOTES.

304492:
Move cxgb and cxgbe down to the non-mii PCI NIC section.

310721:
Mention T6 and 100GbE in description of cxgbe.

310734:
Note that the Chelsio T6 also supports 25Gbps.

To avoid overflowing 80 columns, condense the cxgbe description a bit.
Delta File
+7 -6 sys/conf/NOTES
+7 -6 1 file

PC-BSD — usr.bin/truss syscalls.c setup.c

MFC 309589: Rework syscall structure lookups.

Avoid always using an O(n^2) loop over known syscall structures with
strcmp() on each system call.  Instead, use a per-ABI cache indexed by
the system call number. The first 1024 system calls (which should cover
all of the normal system calls in currently-supported ABIs) use a flat array
indexed by the system call number to find system call structure.  For other
system calls, a linked list of structures storing an integer to structure
mapping is stored in the ABI.  The linked list isn't very smart, but it
should only be used by buggy applications invoking unknown system calls.

This also fixes handling of unknown system calls which currently trigger
a NULL pointer dereference.

PC-BSD — sys/tools embed_mfs.sh

MFC r311881:

Replace using of objdump with elfdump

In-tree objdump is too old to dump new ELF headers.  But for example if we
use: `make CROSS_TOOLCHAIN=riscv64-gcc TARGET_ARCH=riscv64` and do not specify
CROSS_BINUTILS_PREFIX in env, embed_mfs.sh cannot find the correct objdump.
This patch just replaces using of objdump with elfdump to collect needed
information.

Later we may also put an ELFDUMP in CROSSENV and use it in embed_mfs.sh .

Reviewed by:  emaste, br
Differential Revision:        https://reviews.freebsd.org/D9062
Delta File
+3 -3 sys/tools/embed_mfs.sh
+3 -3 1 file

PC-BSD — sys/dev/drm2/i915 i915_gem.c

MFC r309712:
Use the populate() driver paging method for i915 driver.

MFC r310027:
Fix bug in r309712, do not leak gem object pin count in case of error
or retry.
Delta File
+18 -49 sys/dev/drm2/i915/i915_gem.c
+18 -49 1 file

PC-BSD — sys/vm phys_pager.c

MFC r309711:
Implement the populate() pager method for phys pager.
Delta File
+84 -11 sys/vm/phys_pager.c
+84 -11 1 file

PC-BSD — sys/vm vm_fault.c device_pager.c

MFC r309710:
Add a new populate() pager method and extend device pager ops vector
with cdev_pg_populate() to provide device drivers access to it.

MFC r310849:
Fix two similar bugs in the populate vm_fault() code.

PC-BSD — bin/pax gen_subs.c, contrib/mtree create.c spec.c

MFC r311522:
Use type-independent formats for printing nlink_t and ino_t.

PC-BSD — sys/fs/tmpfs tmpfs_subr.c tmpfs_vnops.c

MFC r311525:
Lock tmpfs node tn_status updates done under the shared vnode lock.

PC-BSD — sys/fs/tmpfs tmpfs_subr.c

MFC r311524:
Use vnode lock assertion expression, assert exclusive ownership.
Delta File
+15 -15 sys/fs/tmpfs/tmpfs_subr.c
+15 -15 1 file

PC-BSD — sys/fs/tmpfs tmpfs_fifoops.c

MFC r311523:
Remove dead code.
Delta File
+0 -22 sys/fs/tmpfs/tmpfs_fifoops.c
+0 -22 1 file

PC-BSD — contrib/bzip2 bzip2.c

MFC r310718:

bzip2 does not exit after showing license as requested with --version
or --license as most apps would do, instead it waits for data to
compress on stdin. Because of that, if `bzip2 --version' is called,
bogus `bzip2: I won't write compressed data to a terminal' error
message will be displayed, and checking for bzip2 version in scripts
as in

    bzip2 --version 2>&1 | grep -o "Version [^,]*"

will hand as bzip2 would wait for data to compress on stdin. Fix
this by exiting right after showing version/license text.

I've tried to push this upstream for more than a year, but author
is unresponsive, so upstream may be considered dead.

Ubuntu applies similar fix, for the note.

PR:                199443
Approved by:        dim, bapt
Differential Revision:        D8924
Delta File
+5 -3 contrib/bzip2/bzip2.c
+5 -3 1 file

PC-BSD — contrib/bsnmp/snmpd trans_lsock.c

MFC r311381:

lsock_init_port: address issues with initializing sockaddr_un object

- Use strlcpy to ensure p->name doesn't overflow sa.sun_path [*].
- Use SUN_LEN(..) instead of spelling out calculation longhand (inspired
  by comment by jmallett).

Tested with:        dgram and stream support with both bsnmpwalk and snmpwalk

CID:                1006825
Delta File
+4 -6 contrib/bsnmp/snmpd/trans_lsock.c
+4 -6 1 file

PC-BSD — contrib/bsnmp/snmpd main.c trans_udp.c

MFC r310586,r310587,r310588:

r310586:

Refactor transport sources a bit to facilitate changes coming down pipeline

Add recv callback to transport layer to better facilitate code reuse and
readability and for symmetry with send callback. Move recv_dgram and
recv_stream to udp_recv and lsock_recv, respectively, and make the
beforementioned functions recv callbacks for the udp and lsock transports,
respectively.

Consolidate the check_priv* functions in their relevant trans*.c source to
limit scope/use.

Note: this code is roughly based content from the submitter, although this
was modified to be more of a direct move from snmpd/main.c to the trans_*.c
sources, and to reduce unnecessary static function declarations.

r310587:

Fix definition for recv_dgram(..); it should be "ssize_t", not "int"

I'm not sure why this wasn't flagged as an issue by the compiler, yet


    [7 lines not shown]

PC-BSD — usr.sbin/bsnmpd/modules/snmp_atm Makefile, usr.sbin/bsnmpd/modules/snmp_hast Makefile

MFC r311739:

Use SRCTOP instead of spelling out the full path with .CURDIR

This helps condense the output for CFLAGS and .PATH

PC-BSD — contrib/bsnmp/snmpd main.c

MFC r311378:

lm_load: fix string copying issues

- Ensure `section` doesn't overrun section by using strlcpy instead of
  strcpy [*].
- Use strdup instead of malloc + strcpy (this wasn't flagged by Coverity,
  but is an opportunistic change).

CID:                1006826 [*]
Delta File
+2 -3 contrib/bsnmp/snmpd/main.c
+2 -3 1 file

PC-BSD — contrib/bsnmp/lib snmpclient.c

MFC r311390:

snmp_table_fetch_async: don't leak `work` if snmp_pdu_send(..) fails

CID:                1017276
Delta File
+4 -1 contrib/bsnmp/lib/snmpclient.c
+4 -1 1 file

PC-BSD — usr.sbin/bsnmpd/tools/bsnmptools bsnmpget.c

MFC r310892,r310894,r310989:

r310892:

Don't call snmp_pdu_free(..) until finished with the pdu and when ready to
allocate a new one via snmp_pdu_create(..)

This fixes bsnmpwalk, so it no longer crashes after r310729

r310894:

snmp_pdu_free the right object at the right time in snmptool_walk

r310892 was on the right track, but unfortunately it was resolving
the problem incorrectly and accidentally leaking memory in the
process.

- Call snmp_pdu_free on req before calling snmp_pdu_create on it
  at the bottom of the outer while loop
- Call snmp_pdu_free on resp after calling snmpwalk_nextpdu_create
  in the inner loop

r310989:

Call snmp_pdu_free on req/resp with a consistent, correct pattern

    [13 lines not shown]

PC-BSD — contrib/bsnmp/lib snmp.c

MFC r310729:

Prevent improper memory accesses after calling snmp_pdu_free and snmp_value_free

snmp_pdu_free: set pdu->nbindings to 0 to limit the damage that
could happen if a pdu was reused after calling the function, and
as both stack and heap allocation types are used in contrib/bsnmp
and usr.sbin/bsnmpd.

snmp_value_free: NULL out value->v.octetstring.octets after calling
free on it to prevent a double-free from occurring.
Delta File
+5 -1 contrib/bsnmp/lib/snmp.c
+5 -1 1 file

PC-BSD — contrib/bsnmp/snmp_mibII mibII.c

MFC r311733:

Use nitems(mib) instead of hardcoding mib's length when calling sysctl(3)
Delta File
+6 -6 contrib/bsnmp/snmp_mibII/mibII.c
+6 -6 1 file

PC-BSD — usr.sbin/bsnmpd/modules/snmp_bridge bridge_sys.c

MFC r311290,r311293,r311294:

r311290:

Use strlcpy instead of strcpy when copying the bridge name to ifr.ifr_name
to avoid buffer overflows

CID:                1006735, 1006737, 1006738

r311293:

bridge_do_pfctl: allocate mib_name dynamically using asprintf

This is being done to reduce wasted space, simplify complexity in
the code, and to quell a Coverity warning about buffer overruns.
warning about buffer overruns.

CID:                1006736

r311294:

style cleanup

- bridge_pf_dump: use nitems instead of spelling it out longhand
- bridge_do_pfctl: sort variables by alignment for type

PC-BSD — contrib/bsnmp/snmp_mibII snmp_mibII.3

MFC r311282:

snmp_mibII(3) requires net/if.h and net/if_mib.h

Document that requirement

PC-BSD — contrib/netbsd-tests/lib/libc/sys t_select.c

MFC r311268:

Clarify lifetime of child(..) function

Ensure child exits when complete as it's always run in a forked
process.

Add a missing break statement in :pselect_sigmask when calling
child(..) for clarity and to avoid weird domino effects if the
child process somehow does something it's not supposed to do
with the logfiles, file descriptors, etc

CID:                1223369, 1223370, 1300301

PC-BSD — contrib/netbsd-tests/lib/libpthread t_fpu.c t_condwait.c

MFC r311265,r311274:

r311265:

fpu: ensure calls to pthread_create succeed and test sched_yield to make
sure it returns 0

sched_yield tests for values returning 0 of type int and sched_yield is
of type long, so the test is a mismatch

CID:                1254953, 1254954, 1254965, 1254966

r311274:

run: ensure pthread_condattr_{init,setclock} is successful

CID:                1268631, 1268633

PC-BSD — lib/libprocstat libprocstat.c

MFC r311715:

Use nitems({mib,name}) instead of hardcoding their value
Delta File
+13 -13 lib/libprocstat/libprocstat.c
+13 -13 1 file

PC-BSD — usr.sbin/rwhod rwhod.c

MFC r311709:

Style(9) fixes

- Sort sys/ #includes
- Use nitems instead of hardcoding the length of `mib`
Delta File
+6 -6 usr.sbin/rwhod/rwhod.c
+6 -6 1 file

PC-BSD — lib/libutil kinfo_getallproc.c kinfo_getfile.c

MFC r311714:

lib/libutil/kinfo_*: style cleanup

- Use nitems(mib) instead of hardcoding mib's length
- Sort sys/ #includes