Displaying 1 50 of 283,666 commits (0.023s)

FreeBSD — head/sys/compat/cloudabi cloudabi_sock.c cloudabi_util.h

Add the remaining pointer size independent CloudABI socket system calls.

CloudABI uses a structure called cloudabi_sockstat_t. Think of it as
'struct stat' for sockets. It is used by functions such as
getsockname(), getpeername(), some of the getsockopt() values, etc.

This change implements the sock_stat_get() system call that returns a
copy of this structure. The accept() system call should also return a
full copy of this structure eventually, but for now we're only
interested in the peer address. Add a TODO() to make sure this is
patched up later on.

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

FreeBSD — stable/10/lib/libc/sys ptrace.2, stable/10/sys/amd64/amd64 ptrace_machdep.c

Implement x86 ptrace(2) requests PT_{GET,SET}{FS,GS}BASE.

MFC r284918:
Add helper fill_based_sd(9).

MFC r284919:
Add x86 PT_GETFSBASE, PT_GETGSBASE machine-depended ptrace requests to
obtain the thread %fs and %gs bases.  Add x86 PT_SETFSBASE and
PT_SETGSBASE requests to set the bases from debuggers.  The set
requests, similarly to the sysarch({I386,AMD64}_SET_FSBASE), override
the corresponding segment registers.

MFC r284965:
Document x86 machine-specific ptrace(2) requests.

MFC r285011:
Disallow a debugger on 64bit system to set fs/gs bases of the 32bit
process beyond the end of the process address space.

MFC r285104:
Grammar and language fixes.

FreeBSD — head/sys/compat/cloudabi cloudabi_fd.c

Allow the creation of polling descriptors (kqueues) on CloudABI.

FreeBSD — head/sys/compat/linux linux_event.c, head/sys/kern kern_event.c

Allow the creation of kqueues with a restricted set of Capsicum rights.

On CloudABI we want to create file descriptors with just the minimal set
of Capsicum rights in place. The reason for this is that it makes it
easier to obtain uniform behaviour across different operating systems.

By explicitly whitelisting the operations, we can return consistent
error codes, but also prevent applications from depending OS-specific
behaviour.

Extend kern_kqueue() to take an additional struct filecaps that is
passed on to falloc_caps(). Update the existing consumers to pass in
NULL.

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

FreeBSD — stable/10/sys/amd64/amd64 genassym.c, stable/10/sys/amd64/include pcb.h

MFC r284921:
pcb_gs32sd is unused for long time, remove it.  Keep the padding in pcb.

FreeBSD — head/lib/libc/sys kqueue.2, head/sys/kern vfs_subr.c

Make it possible to implement poll(2) on top of kqueue(2).

It looks like EVFILT_READ and EVFILT_WRITE trigger under the same
conditions as poll()'s POLLRDNORM and POLLWRNORM as described by POSIX.
The only difference is that POLLRDNORM has to be triggered on regular
files unconditionally, whereas EVFILT_READ only triggers when not EOF.

Introduce a new flag, NOTE_FILE_POLL, that can be used to make
EVFILT_READ and EVFILT_WRITE behave identically to poll(). This flag
will be used by cloudlibc's poll() function.

Reviewed by:        jmg
Differential Revision:        https://reviews.freebsd.org/D3303

FreeBSD — stable/10/sys/vm vm_map.c

MFC r285046:
Account for the main process stack being one page below the highest
user address when ABI uses shared page.
Delta File
+2 -1 stable/10/sys/vm/vm_map.c
+2 -1 1 file

FreeBSD — stable/10/gnu/usr.bin/gdb/kgdb trgt.c, stable/10/sys/amd64/include pmc_mdep.h param.h

MFC r285041:
Use single instance of the identical INKERNEL() and PMC_IN_KERNEL()
macros on amd64 and i386.  On i386, correct the lowest kernel address.

FreeBSD — head/usr.sbin/syslogd syslogd.c

Set f_file to -1/F_UNUSED when after closing when possible

This will help ensure we don't trash file descriptors that get used later on
in the daemon

Found via internal Coverity scan

MFC after: 2 weeks
Discussed with: cem, ed, markj
Differential Revision: https://reviews.freebsd.org/D3081
Submitted by: Miles Ohlrich <miles.ohlrich at isilon.com>
Sponsored by: EMC / Isilon Storage Division
Delta File
+20 -8 head/usr.sbin/syslogd/syslogd.c
+20 -8 1 file

FreeBSD — head/etc rc.subr

Update the comment about handling old-style rc(5) scripts

The old-style (*.sh) scripts in /etc/rc.d are explicitly ignored, whereas
other scripts ending in .sh are permitted
Delta File
+5 -2 head/etc/rc.subr
+5 -2 1 file

FreeBSD — stable/9/sys/dev/bxe bxe.c bxe.h

MFC r285973
      - Avoid lock contention in the if_transmit callback by using trylock and
       enqueueing the frames when it fails. This way there is some latency
       removed from the transmitting path.
      - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
       enqueue the desired frames and return successful transmit. This way we
       avoid to return errors on transmit side and resulting in
       possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
       everytime we get the threshold ring hit, so this can be happening quite
       often.

Submitted by:        Attilio.Rao at isilon.com

FreeBSD — stable/7/sys/dev/bxe bxe.c bxe.h

MFC r285973
      - Avoid lock contention in the if_transmit callback by using trylock and
       enqueueing the frames when it fails. This way there is some latency
       removed from the transmitting path.
      - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
       enqueue the desired frames and return successful transmit. This way we
       avoid to return errors on transmit side and resulting in
       possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
       everytime we get the threshold ring hit, so this can be happening quite
       often.

Submitted by:        Attilio.Rao at isilon.com

FreeBSD — stable/8/sys/dev/bxe bxe.c bxe.h

MFC r285973
    - Avoid lock contention in the if_transmit callback by using trylock and
     enqueueing the frames when it fails. This way there is some latency
     removed from the transmitting path.
    - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
     enqueue the desired frames and return successful transmit. This way we
     avoid to return errors on transmit side and resulting in
     possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
     everytime we get the threshold ring hit, so this can be happening quite
     often.

Submitted by:        Attilio.Rao at isilon.com

FreeBSD — head/sys/dev/nand nfc_rb.c

Remove one more that crept in unnecessarily from previous commit.
Delta File
+0 -1 head/sys/dev/nand/nfc_rb.c
+0 -1 1 file

FreeBSD — head/sys/dev/nand nfc_rb.c

Remove some unnecessary includes.
Delta File
+1 -5 head/sys/dev/nand/nfc_rb.c
+1 -5 1 file

FreeBSD — stable/10/sys/dev/bxe bxe.c bxe.h

MFC r285973
  - Avoid lock contention in the if_transmit callback by using trylock and
   enqueueing the frames when it fails. This way there is some latency
   removed from the transmitting path.
  - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
   enqueue the desired frames and return successful transmit. This way we
   avoid to return errors on transmit side and resulting in
   possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
   everytime we get the threshold ring hit, so this can be happening quite
   often.

Submitted by:        Attilio.Rao at isilon.com

FreeBSD — head/sys/amd64/amd64 pmap.c, head/sys/arm/arm pmap-v6.c pmap-v6-new.c

Add two new pmap functions:
vm_offset_t pmap_quick_enter_page(vm_page_t m)
void pmap_quick_remove_page(vm_offset_t kva)

These will create and destroy a temporary, CPU-local KVA mapping of a specified page.

Guarantees:
--Will not sleep and will not fail.
--Safe to call under a non-sleepable lock or from an ithread

Restrictions:
--Not guaranteed to be safe to call from an interrupt filter or under a spin mutex on all 
platforms
--Current implementation does not guarantee more than one page of mapping space across all 
platforms. MI code should not make nested calls to pmap_quick_enter_page.
--MI code should not perform locking while holding onto a mapping created by 
pmap_quick_enter_page

The idea is to use this in busdma, for bounce buffer copies as well as virtually-indexed 
cache maintenance on mips and arm.

NOTE: the non-i386, non-amd64 implementations of these functions still need review and 
testing.

Reviewed by:        kib

    [2 lines not shown]

FreeBSD — releng/10.2/release/doc/en_US.ISO8859-1/relnotes article.xml

Cleanup pass through the relnotes file:
- Reword a few entries for consistency throughout the document.
- Remove the 'role="arm"' from the arm-specific section, as it
  is redundant.
- s/&man.geom.4;/GEOM/ in a title, because it looks ridiculous.

Approved by:        re (implicit)
Sponsored by:        The FreeBSD Foundation

FreeBSD — head/sys/arm/conf BEAGLEBONE

BEAGLEBONE: remove dtrace from MODULES_EXTRA.

This config is already building all modules, so we don't need the
MODULES_EXTRA definition.  It was also causing problems to users who
rely on MODULES_OVERRIDE to do the right thing.

Discussed with:        ian
Delta File
+0 -1 head/sys/arm/conf/BEAGLEBONE
+0 -1 1 file

FreeBSD — head/sys/x86/include _types.h

Fix style(9) bugs.
Delta File
+5 -6 head/sys/x86/include/_types.h
+5 -6 1 file

FreeBSD — head/sys/netipsec xform_esp.c keydb.h, head/sys/opencrypto xform.c cryptodev.h

Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF...  IPsec
defines the keys differently than NIST does, so we have to muck with
key lengths and nonce/IVs to be standard compliant...

Remove the iv from secasvar as it was unused...

Add a counter protected by a mutex to ensure that the counter for GCM
and ICM will never be repeated..  This is a requirement for security..
I would use atomics, but we don't have a 64bit one on all platforms..

Fix a bug where IPsec was depending upon the OCF to ensure that the
blocksize was always at least 4 bytes to maintain alignment... Move
this logic into IPsec so changes to OCF won't break IPsec...

In one place, espx was always non-NULL, so don't test that it's
non-NULL before doing work..

minor style cleanups...

drop setting key and klen as they were not used...

Enforce that OCF won't pass invalid key lengths to AES that would
panic the machine...

This was has been tested by others too...  I tested this against

    [7 lines not shown]

FreeBSD — stable/10/usr.sbin/vidcontrol vidcontrol.c

MFC r281581: vidcontrol: make size argument optional again for syscons

r273544 (MFC in r273921) changed the -f option allow no arguments in vt
mode (used to reset the font back to the default), but broke the
optionality of the size argument for syscons. Drop the required argument
from syscons' optstring for -f so the optional argument handler works
the same way for both syscons and vt.

Sponsored by:        The FreeBSD Foundation

FreeBSD — head/share/man/man4 ral.4

Add support for Planex GW-NS300N.
Delta File
+2 -1 head/share/man/man4/ral.4
+2 -1 1 file

FreeBSD — head/usr.bin/xargs xargs.c xargs.1

xargs now takes -P0, creating as many concurrent processes as possible

PR:                199976
Submitted by:        Nikolai Lifanov <lifanov at mail.lifanov.com>
Reviewed by:        mjg, bjk
Approved by:        bapt (mentor)
MFC after:        1 month
Relnotes:        yes
Sponsored by:        ScaleEngine Inc.
Differential Revision:        https://reviews.freebsd.org/D2616

FreeBSD — head/sys/i386/i386 locore.s machdep.c, head/sys/i386/include param.h

Give large kernel stack to the initial thread .  Otherwise, ZFS
overflows the stack during root mount in some configurations.

Tested by:        Fabian Keil <freebsd-listen at fabiankeil.de> (previous version)
Sponsored by:        The FreeBSD Foundation
MFC after:        2 weeks

FreeBSD — releng/10.2/usr.sbin/bsdinstall/scripts auto

MFS r286286:
MFC r286285:
 Ensure the local MANIFEST is always used when verifying remote
 distribution sets.

Approved by:        re (glebius)
Sponsored by:        The FreeBSD Foundation

FreeBSD — stable/10/usr.sbin/bsdinstall/scripts auto

MFC r286285:
 Ensure the local MANIFEST is always used when verifying remote
 distribution sets.

Approved by:        re (glebius, insta-MFC)
Sponsored by:        The FreeBSD Foundation

FreeBSD — head/usr.sbin/bsdinstall/scripts auto

Ensure the local MANIFEST is always used when verifying remote
distribution sets.

MFC after:        immediately
Sponsored by:        The FreeBSD Foundation

FreeBSD — head/lib/libc/amd64/sys __vdso_gettc.c, head/lib/libc/i386/sys __vdso_gettc.c

Copy the fencing of the algorithm to do lock-less update and reading
of the timehands, from the kern_tc.c implementation to vdso.  Add
comments giving hints where to look for the algorithm explanation.

To compensate the removal of rmb() in userspace binuptime(), add
explicit lfence instruction before rdtsc.  On i386, add usual
complications to detect SSE2 presence; assume that old CPUs which do
not implement SSE2 also execute rdtsc almost in order.

Reviewed by:        alc, bde (previous version)
Sponsored by:        The FreeBSD Foundation
MFC after:        2 weeks

FreeBSD — head/sys/geom geom_dev.c

Fix panic triggered by code like this:

open("/dev/md0", O_EXEC);

Discussed with:        kib@, mav@
MFC after:        1 month
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D3051
Delta File
+7 -0 head/sys/geom/geom_dev.c
+7 -0 1 file

FreeBSD — head/sys/ofed/drivers/net/mlx4 en_tx.c

Avoid calling into the random subsystem before it is initialized.

Sponsored by:        Mellanox Technologies

FreeBSD — head/sys/kern vfs_subr.c

Mark vgonel() as static.  It was already declared static earlier;
no idea why compilers don't warn about this.

MFC after:        1 month
Sponsored by:        The FreeBSD Foundation
Delta File
+1 -1 head/sys/kern/vfs_subr.c
+1 -1 1 file

FreeBSD — head/share/man/man9 vgone.9 Makefile

Revert r286236; vgonel() is a static function.

Sponsored by:        The FreeBSD Foundation

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

Get it closes to style(9).
Staticization usage() and printit().
Fix the usage of err(3).

Reviewed by:        bde
Delta File
+14 -20 head/usr.bin/ypcat/ypcat.c
+14 -20 1 file

FreeBSD — head/sys/compat/cloudabi cloudabi_futex.c

Let the CloudABI futex code use umtx_keys.

The CloudABI kernel still passes all of the cloudlibc unit tests.

Reviewed by:        vangyzen
Differential Revision:        https://reviews.freebsd.org/D3286

FreeBSD — head/sys/kern kern_umtx.c

Fix bad arithmetic in umtx_key_get() to compute object offset.

It looks like umtx_key_get() has the addition and subtraction the wrong
way around, meaning that it fails to match in certain cases. This causes
the cloudlibc unit tests to deadlock in certain cases.

Reviewed by:        kib
Differential Revision:        https://reviews.freebsd.org/D3287
Delta File
+2 -2 head/sys/kern/kern_umtx.c
+2 -2 1 file

FreeBSD — releng/10.2/sys/vm vm_object.c vm_object.h

MFC r285878 (stable/10 r286145):
Revert r173708's modifications to vm_object_page_remove().
This fixes inconsistencies encountered by vm_object_unwire() or
by the buffer cache when the file is truncated.

Approved by:        re (gjb)

FreeBSD — stable/10/sys/x86/include specialreg.h

MFC r285932:
Add bit names for the IA32_MISC_ENABLE msr.

FreeBSD — stable/10/sys/dev/cxgbe t4_sge.c t4_netmap.c

MFC r284988, r285220, and r285221.

r284988:
cxgbe(4): request an automatic tx update when a netmap tx queue idles.
The NIC tx queues already do this.

r285220:
cxgbe(4): Do not override the the global defaults for congestion drops.
The hw.cxgbe.cong_drop knob is not affected by this change because the
driver sets up congestion drop on a per-queue basis.

r285221:
cxgbe(4): Add a new knob that controls the congestion response of netmap
rx queues.  The default is to drop rather than backpressure.

This decouples the congestion settings of NIC and netmap rx queues.

FreeBSD — stable/10/sys/dev/cxgbe t4_sge.c

MFC r284718:

cxgbe: get_fl_payload returns a header mbuf when successful.
Delta File
+1 -0 stable/10/sys/dev/cxgbe/t4_sge.c
+1 -0 1 file

FreeBSD — stable/10/tools/tools/cxgbetool cxgbetool.c

MFC r284984:

cxgbetool: fix code that decodes T5 SGE contexts.  Some of the fields
that changed between T4 and T5 were not displayed correctly.

FreeBSD — stable/10/sys/dev/cxgbe adapter.h t4_main.c, stable/10/sys/dev/cxgbe/common t4_hw.c

MFC r284445 and r286107.

r284445:
cxgbe(4): Add the ability to dump mailbox commands and replies.  It is
enabled/disabled via bit 0 of adapter->debug_flags (which is available
at dev.t5nex.<n>.debug_flags).

r286107:
cxgbe(4): initialize debug_flags from the kernel environment.

FreeBSD — stable/9/usr.bin/wall ttymsg.c

MFC        r286102:
Buffer overflow in wall(1).

This affected syslogd, wall and talkd.
Detected by FORTIFY_SOURCE GSoC (with clang).

Submitted by:                Oliver Pinter
Differential Revision:        https://reviews.freebsd.org/D3254
Reviewed by:                delphij, jmg
Delta File
+2 -2 stable/9/usr.bin/wall/ttymsg.c
+2 -2 1 file

FreeBSD — stable/10/usr.bin/wall ttymsg.c

MFC        r286102:
Buffer overflow in wall(1).

This affected syslogd, wall and talkd.
Detected by FORTIFY_SOURCE GSoC (with clang).

Submitted by:                Oliver Pinter
Differential Revision:        https://reviews.freebsd.org/D3254
Reviewed by:                delphij, jmg
Delta File
+2 -2 stable/10/usr.bin/wall/ttymsg.c
+2 -2 1 file

FreeBSD — head/usr.bin/wall ttymsg.c

Revert r286144 leaving the original fix to the buffer overflow.

Some developers consider the new code unnecessarily obfuscated.
There was also a benign off-by-one.

Discussed with:        bde, vangyzen, jmallett
Delta File
+2 -3 head/usr.bin/wall/ttymsg.c
+2 -3 1 file

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

Remove the 3rd clause of BSD LICENSE.
Sync the code with the OpenBSD version.
Small style(9) fix up.

Differential Revision:        D3212
Reviewed by:                rodrigc, bapt
Obtained from:                OpenBSD
Sponsored by:                gandi.net
Delta File
+41 -36 head/usr.bin/ypcat/ypcat.c
+41 -36 1 file

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

Remove the 3rd clause of BSD LICENSE.
Sync the code with the OpenBSD version.

Differential Revision:        D3213
Reviewed by:                rodrigc, bapt
Obtained from:                OpenBSD
Sponsored by:                gandi.net
Delta File
+48 -32 head/usr.bin/ypmatch/ypmatch.c
+48 -32 1 file

FreeBSD — head/sys/x86/include _types.h

Always define __va_list for amd64 and restore pre-r232261 behavior for i386.
Note it allows exotic compilers, e.g., TCC, to build with our stdio.h, etc.

PR:                201749
MFC after:        1 week
Delta File
+11 -2 head/sys/x86/include/_types.h
+11 -2 1 file

FreeBSD — releng/10.2/sys/dev/pms/freebsd/driver/common lxutil.c, releng/10.2/sys/dev/pms/freebsd/driver/ini/src agtiapi.c

MF-stable/10 r286263:

Only match devices that belong to this driver.
Approved by:        re@ (gjb@)

FreeBSD — stable/10/sys/dev/pms/freebsd/driver/common lxutil.c, stable/10/sys/dev/pms/freebsd/driver/ini/src agtiapi.c

MFC r286208:

Only match devices that belong to this driver.