Displaying 1 50 of 312,678 commits (0.026s)

FreeBSD — head/contrib/openbsm aclocal.m4 configure, head/contrib/openbsm/bin Makefile.in

Merge OpenBSM 1.2-alpha5 from vendor branch to FreeBSD -CURRENT:

- Add a new "qsize" parameter in audit_control and the getacqsize(3) API to
  query it, allowing to set the kernel's maximum audit queue length.
- Add support to push a mapping between audit event names and event numbers
  into the kernel (where supported) using new A_GETEVENT and A_SETEVENT
  auditon(2) operations.
- Add audit event identifiers for a number of new (and not-so-new) FreeBSD
  system calls including those for asynchronous I/O, thread management, SCTP,
  jails, multi-FIB support, and misc. POSIX interfaces such as
  posix_fallocate(2) and posix_fadvise(2).
- On operating systems supporting Capsicum, auditreduce(1) and praudit(1) now
  run sandboxed.
- Empty "flags" and "naflags" fields are now permitted in audit_control(5).

Many thanks to Christian Brueffer for producing the OpenBSM release and
importing/tagging it in the vendor branch.  This release will allow improved
auditing of a range of new FreeBSD functionality, as well as non-traditional
events (e.g., fine-grained I/O auditing) not required by the Orange Book or
Common Criteria.

Obtained from:        TrustedBSD Project
Sponsored by:        DARPA, AFRL
MFC after:        3 weeks

FreeBSD — head/contrib/compiler-rt/lib/builtins assembly.h, head/contrib/compiler-rt/lib/builtins/arm comparesf2.S udivsi3.S

Revert r314907, and pull in r298713 from upstream compiler-rt trunk (by
Weiming Zhao):

  builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.

  Summary:
  Value of __ARM_ARCH_ISA_THUMB isn't based on the actual compilation
  mode (-mthumb, -marm), it reflect's capability of given CPU.

  Due to this:
   - use  __tbumb__ and __thumb2__ insteand of __ARM_ARCH_ISA_THUMB
   - use '.thumb' directive consistently  in all affected files
   - decorate all thumb functions using
     DEFINE_COMPILERRT_THUMB_FUNCTION()

  ---------
  Note: This patch doesn't fix broken Thumb1 variant of __udivsi3 !

  Reviewers: weimingz, rengolin, compnerd

  Subscribers: aemerson, dim

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

Discussed with:        mmel
X-MFC-With:        r314564

FreeBSD — head/share/man/man9 dpcpu.9

Slightly improve consistency of "fooint" vs "foo_int" in DPCPU(9) examples.

MFC after:        3 days
Delta File
+3 -3 head/share/man/man9/dpcpu.9
+3 -3 1 file

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

Add a man page for the kernel's dynamic per-CPU memory allocator.

MFC after: 3 days

FreeBSD — head/usr.bin/diff diffreg.c, head/usr.bin/diff/tests diff_test.sh header_ns.out

diff: Show nanoseconds in -u/-c header line.

Show nanoseconds in the -u/-c header line.

The present portability conditionals cannot handle the POSIX standard
st_mtim, so remove them and unconditionally use st_mtim.

PR:                218018
Reported by:        jbeich
Reviewed by:        bapt
Differential Revision:        https://reviews.freebsd.org/D10145

FreeBSD — head/sys/amd64/include db_machdep.h, head/sys/arm/include db_machdep.h

Fix printing of negative offsets (typically from frame pointers) again.
I fixed this in 1997, but the fix was over-engineered and fragile and
was broken in 2003 if not before.  i386 parameters were copied to 8
other arches verbatim, mostly after they stopped working on i386, and
mostly without the large comment saying how the values were chosen on
i386.  powerpc has a non-verbatim copy which just changes the uncritical
parameter and seems to add a sign extension bug to it.

Just treat negative offsets as offsets if they are no more negative than
-db_offset_max (default -64K), and remove all the broken parameters.

-64K is not very negative, but it is enough for frame and stack pointer
offsets since kernel stacks are small.

The over-engineering was mainly to go more negative than -64K for the
negative offset format, without affecting printing for more than a
single address.

Addresses in the top 64K of a (full 32-bit or 64-bit) address space
are now printed less well, but there aren't many interesting ones.
For arches that have many interesting ones very near the top (e.g.,
68k has interrupt vectors there), there would be no good limit for
the negative offset format and -64K is a good as anything.

FreeBSD — stable/10/sys/netpfil/pf pf.c

MFC 315529

pf: Fix rule evaluation after inet6 route-to

In pf_route6() we re-run the ruleset with PF_FWD if the packet goes out
of a different interface. pf_test6() needs to know that the packet was
forwarded (in case it needs to refragment so it knows whether to call
ip6_output() or ip6_forward()).

This lead pf_test6() to try to evaluate rules against the PF_FWD
direction, which isn't supported, so it needs to treat PF_FWD as PF_OUT.
Once fwdir is set correctly the correct output/forward function will be
called.

PR:             217883
Submitted by:   Kajetan Staszkiewicz
Sponsored by:   InnoGames GmbH
Delta File
+3 -0 stable/10/sys/netpfil/pf/pf.c
+3 -0 1 file

FreeBSD — stable/11/sys/netpfil/pf pf.c

MFC 315529

pf: Fix rule evaluation after inet6 route-to

In pf_route6() we re-run the ruleset with PF_FWD if the packet goes out
of a different interface. pf_test6() needs to know that the packet was
forwarded (in case it needs to refragment so it knows whether to call
ip6_output() or ip6_forward()).

This lead pf_test6() to try to evaluate rules against the PF_FWD
direction, which isn't supported, so it needs to treat PF_FWD as PF_OUT.
Once fwdir is set correctly the correct output/forward function will be
called.

PR:             217883
Submitted by:   Kajetan Staszkiewicz
Sponsored by:   InnoGames GmbH
Delta File
+3 -0 stable/11/sys/netpfil/pf/pf.c
+3 -0 1 file

FreeBSD — stable/11/usr.bin/awk awk.1

MFC r314942:

Import the awk(1) manpage from OpenBSD

As discussed during AsiaBSDcon devsummit, import the manpage from OpenBSD which
is has been rewritten in mdoc(7) format making it readable by default with
mandoc, it also has been extended by OpenBSD to cover all awk(1) options

Obtained from:        OpenBSD
MFC:                1 week
Delta File
+794 -0 stable/11/usr.bin/awk/awk.1
+794 -0 1 file

FreeBSD — stable/11/share/man/man7 hier.7

MFC r314903:

Remove reference to GNU info hier(7)
we have removed texinfo in FreeBSD 11.0
Delta File
+1 -3 stable/11/share/man/man7/hier.7
+1 -3 1 file

FreeBSD — head/sys/dev/iwn if_iwn.c

iwn: fix debug message
Delta File
+2 -2 head/sys/dev/iwn/if_iwn.c
+2 -2 1 file

FreeBSD — stable/11/contrib/dma dma.c

MFC r314520:

Import dma snapshot from git 2017-02-10

The only change is:
use basename to select executable identity

PR:                216910
Submitted by:        Andrej Ebert <andrej at ebert.su>
Delta File
+2 -1 stable/11/contrib/dma/dma.c
+2 -1 1 file

FreeBSD — stable/11 ObsoleteFiles.inc, stable/11/etc/mtree BSD.usr.dist

MFC r314902:

texinfo is gone in r276551 remove the related directories

Reported by:        jbeich

FreeBSD — stable/11/usr.bin/man man.sh man.1

MFC r315053-r315054, r315056

r315053:
Add share/man if it exists to the MANPATH

localbase is not consistent with base for manpages:
/usr/local/man vs /usr/share/man adding share/man allows to fix that
inconsistency and would permit to remove tons of patches/modifications in the
ports tree

r315054:
Extend functionality MANPATH in man(1) to followup with apropos(1) from
mandoc.

If MANPATH begins with a colon, it is appended to the default list; if it ends
with a colon, it is prepended to the default list; or if it contains two
adjacent colons, the standard search path is inserted between the colons.  If
none of these conditions are met, it overrides the standard search path.

Import the MANPATH description from mandoc into the man(1) man page

Reported by:        kargl
MFC after:        1 week

r315056:

    [9 lines not shown]

FreeBSD — head/sys/dev/iwn if_iwn.c

iwn: fix error handling for one well-known corner case.
Delta File
+12 -2 head/sys/dev/iwn/if_iwn.c
+12 -2 1 file

FreeBSD — stable/11/share/timedef ca_IT.ISO8859-15.src en_CA.UTF-8.src

MFC r315571:

Canada adheres to ISO 8601, let's make the locale reflecting that fact

PR:                200079
MFC after:        1 week
Submitted by:        Dan McGregor <dan.mcgregor at usask.ca>
Reported by:        A.J. Kehoe IV (Nanoman) <freebsd-bugs at nanoman.ca>
Differential Revision:        https://reviews.freebsd.org/D9925

FreeBSD — head/contrib/top top.c machine.h, head/usr.bin/top machine.c

Provide proper contemporary function prototypes for many of the functions
implemented in top(1), rather than relying on K&R prototypes, which can
cause problems on targets where there are multiple incompatible calling
conventions and the compiler requires argument information to select the
correct one.

(There's a bit more to do here, since it looks like top(1) also sometimes
provides prototypes for various curses functions rather than relying on
the header file...)

Sponsored by:        DARPA, AFRL
MFC after:        1 week

FreeBSD — vendor-sys/illumos/dist/uts/common/fs/zfs dmu.c, vendor-sys/illumos/dist/uts/common/fs/zfs/sys dmu.h

7603 xuio_stat_wbuf_* should be declared (void)

illumos/illumos-gate at 99aa8b55058e512798eafbd71f72f916bdc10181
https://github.com/illumos/illumos-gate/commit/99aa8b55058e512798eafbd71f72f916bdc10181

https://www.illumos.org/issues/7603

  The funcs are declared k&r style, where the args are not specified:

  void xuio_stat_wbuf_copied();
  They should be declared to take no arguments:

  void xuio_stat_wbuf_copied(void);
  Need to change both .c and .h.

Author: Prashanth Sreenivasa <pks at delphix.com>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Paul Dagnelie <pcd at delphix.com>
Reviewed by: Robert Mustacchi <rm at joyent.com>
Approved by: Richard Lowe <richlowe at richlowe.net>

FreeBSD — head/sys/dev/iwn if_iwn.c

iwn: drop unneeded bus_dmamap_sync() calls.

1) They are using wrong tag (Tx) + map (Rx) combination.
2) Rx descriptor is already synchronized in iwn_notif_intr()
3) It's not needed for transmitted data since device does not change
mbuf contents.

Tested with Intel 6205 (amd64), STA mode.
Delta File
+2 -12 head/sys/dev/iwn/if_iwn.c
+2 -12 1 file

FreeBSD — head/libexec/bootpd getif.c, head/libexec/bootpd/tools/bootptest bootptest.c print-bootp.c

Emply contemporary function prototypes in bootpd, rather than relying on
locally defined K&R prototypes in .c files; use appropriate casts for
pointer types now that types for arguments are available at compile time.
This ensures that compilers with multiple incompatible calling conventions
can select the correct calling convention for external functions.

Sponsored by:        DARPA, AFRL
MFC after:        1 week

FreeBSD — head/sys/dev/fb vga.c

Fix 3 entries in mode tables related to mono and 90-column text modes.
Newer VGAs don't support any mono modes, but bugs in the tables created
2 virtual mono modes (#45 90x43 and #112 80x43) that behaved more
strangely than crashing.  90-column modes are tweaked 80-column ones
and also fail to work on newer VGAs.  #45 did crash (hang) on some
hardware.
Delta File
+3 -3 head/sys/dev/fb/vga.c
+3 -3 1 file

FreeBSD — head/usr.bin/diff diffreg.c, head/usr.bin/diff/tests diff_test.sh header.out

diff: Fix mtime of file1 in -u/-c header line.

PR:                218018
Reviewed by:        bapt
Differential Revision:        https://reviews.freebsd.org/D10140

FreeBSD — head/sys/dev/syscons syscons.c scterm-teken.c

Restore switching to a separate kernel terminal "input" state and extend
it to a separate state for each CPU.

Terminal "input" is user or kernel output.  Its state includes the current
parser state for escape sequences and multi-byte characters, and some
results of previous parsing (mainly attributes), and in teken the cursor
position, but not completed output.  This state must be switched for kernel
output since the kernel can preempt anything, including itself, and this
must not affect the preempted state more than necessary.  Since vty0 is
shared, it is necessary to affect the frame buffer and cursor position and
history, but escape sequences must not be affected and attributes for
further output must not be affected.

This used to work.  The syscons terminal state contained mainly the parser
state for escape sequences and attributes, but not the cursor position,
and was switched.  This was first broken by SMP and/or preemptive kernels.
Then there should really be a separate state for each thread, and one more
for ddb, or locking to prevent preemption.  Serialization of printf() helps.
But it is arcane that full syscons escape sequences mostly work in kernel
printf(), and I have never seen them used except by me to test this fix.
They worked perfectly except for the races, since "input" from the kernel
was not special in any way.

This was broken to use teken.  The general switch was removed, and the
kernel normal attribute was switched specially.  The kernel reverse

    [17 lines not shown]

FreeBSD — head/sys/conf files.amd64 files.i386, head/sys/libkern/x86 crc32_sse42.c

Use inline asm instead of unportable intrinsics for the SSE4 crc32
optimization.

This fixes building with gcc-4.2.1 (it doesn't support SSE4).
gas-2.17.50 [FreeBSD] supports SSE4 instructions, so this doesn't
need using .byte directives.

This fixes depending on host user headers in the kernel.

Fix user includes (don't depend on namespace pollution in <nmmintrin.h>
that is not included now).

The instrinsics had no advantages except to sometimes avoid compiler
pessimixations.  clang understands them a bit better than inline asm,
and generates better looking code which also runs better for cem, but
for me it just at the same speed or slower by doing excessive
unrollowing in all the wrong places.  gcc-4.2.1 also doesn't understand
what it is doing with unrolling, but with -O3 somehow it does more
unrolling that helps.

Reduce 1 of the the compiler pessimizations (copying a variable which
already satisfies an "rm" constraint in a good way by being in memory
and not used again, to different memory and accessing it there.  Force
copying it to a register instead).


    [16 lines not shown]

FreeBSD — head/sys/dev/iwn if_iwn.c

iwn: deduplicate code in iwn_tx_data() and iwn_tx_data_raw().

Some code was additionally moved for (future) lock splitting.

Tested with Intel 6205, STA mode.

Differential Revision:        https://reviews.freebsd.org/D10106
Delta File
+111 -197 head/sys/dev/iwn/if_iwn.c
+111 -197 1 file

FreeBSD — head/sys/dev/iwn if_iwn.c

iwn: omit unneeded bus_dmamap_sync() calls when compiled without
'options IWN_DEBUG'
Delta File
+4 -4 head/sys/dev/iwn/if_iwn.c
+4 -4 1 file

FreeBSD — stable/10/sys/dev/isp isp_freebsd.c isp.c

MFC r315161: Try to slight untangle I/O and loop status handling.

FreeBSD — stable/11/sys/dev/isp isp_freebsd.c isp.c

MFC r315161: Try to slight untangle I/O and loop status handling.

FreeBSD — stable/10/sys/dev/isp isp_freebsd.c isp.c

MFC r315160: Remove code for unsupported FreeBSD versions.

FreeBSD — stable/11/sys/dev/isp isp_freebsd.c isp.c

MFC r315160: Remove code for unsupported FreeBSD versions.

FreeBSD — stable/10/sys/dev/isp isp_freebsd.c isp_freebsd.h

MFC r315163: Remove strange config_intrhook_establish() magic.

Interrupts are enabled as part of chip reset just during driver attach.
Later "enabling" of already enabled interrupts is useless.

FreeBSD — stable/11/sys/dev/isp isp_freebsd.c isp_freebsd.h

MFC r315163: Remove strange config_intrhook_establish() magic.

Interrupts are enabled as part of chip reset just during driver attach.
Later "enabling" of already enabled interrupts is useless.

FreeBSD — head/lib/libthread_db/arch/arm libpthread_md.c, head/sys/arm/arm machdep.c

Preserve VFP state across signal delivery.

We don't have enouch space to store full VFP context within mcontext
stucture. Due to this:
 - follow i386/amd64 way and store VFP state outside of the mcontext_t
   but point to it. Use the size of VFP state structure as an 'magic'
   indicator of the saved VFP state presence.
 - teach set_mcontext() about this external storage.
 - for signal delivery, store VFP state to expanded 'struct sigframe'.

Submited by:        Andrew Gierth (initial version)
PR:                217611
MFC after:        2 weeks

FreeBSD — head/sys/arm/arm vm_machdep.c

Save VFP state on fork().
Update the copy of VFP state in PCB before it is cloned for new process.

MFC after:        2 weeks
Delta File
+8 -0 head/sys/arm/arm/vm_machdep.c
+8 -0 1 file

FreeBSD — stable/10/sys/dev/cpuctl cpuctl.c

MFC r315588:
Update the list of cpudev ioctls which require write access.
Delta File
+3 -2 stable/10/sys/dev/cpuctl/cpuctl.c
+3 -2 1 file

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

MFC r315552:
Fix off-by-one in the vm_fault_populate() code.
Delta File
+1 -1 stable/11/sys/vm/vm_fault.c
+1 -1 1 file

FreeBSD — stable/11/sys/dev/cpuctl cpuctl.c

MFC r315588:
Update the list of cpudev ioctls which require write access.
Delta File
+3 -2 stable/11/sys/dev/cpuctl/cpuctl.c
+3 -2 1 file

FreeBSD — stable/11/sys/dev/cpuctl cpuctl.c

MFC r315586:
Style.
Delta File
+9 -6 stable/11/sys/dev/cpuctl/cpuctl.c
+9 -6 1 file

FreeBSD — head/sys/x86/iommu busdma_dmar.c

Provide less laborius way to enable busdma DMAR to only short list of devices.

Kernel environment variable hw.busdma.default can take values 'bounce'
and 'dmar' and selects corresponding busdma backend as default.
Per-device environment variable hw.busdma.pci<domain>.<bus>.<slot>.<func>
takes the same values and overrides hw.busdma.default for the given device.

Note that even with hw.busdma.default=bounce, DMA translation engines
are still started if DMARs are enabled, to disable them use
hw.dmar.dma tunable, as before.

Sponsored by:        The FreeBSD Foundation
MFC after: 1 week
Delta File
+23 -3 head/sys/x86/iommu/busdma_dmar.c
+23 -3 1 file

FreeBSD — head/sys/arm/broadcom/bcm2835 bcm2835_bsc.c

[rpi] Use compatibility string from upstream DTB for I2C controller

FreeBSD uses upstream DTB for RPi3 build and compatibility string for
i2c device is different there. Add this new string to compatibility data.

Reported by:        Karl Denninger
MFC after:        3 days

FreeBSD — head/sys/dev/iwn if_iwn.c

iwn: fix return code conflict in iwn_init_locked()

Do not try to use errno(2) codes here; instead, just return unique
value (1) when radio is disabled via hardware switch and another
one (-1) for any other error in initialization path.

Tested with Intel 6205, STA mode.
Delta File
+6 -4 head/sys/dev/iwn/if_iwn.c
+6 -4 1 file

FreeBSD — stable/10/contrib/libcxxrt exception.cc memory.cc, stable/10/lib/libcxxrt Version.map Makefile

Synchronize libcxxrt in stable/10 with stable/11.

MFC r284553 (by emaste):

Update libcxxrt upgrade instructions

The typeinfo file no longer exists upstream.

MFC r297299:

Compile libcxxrt as C++11, since it is only really used in combination
with libc++, which is also C++11.  Also change one _Static_assert (which
is really C11) back into static_assert, like upstream.

This should help when compiling libcxxrt with newer versions of gcc,
which refuse to recognize any form of static assertions, if not
compiling for C++11 or higher.

While here, add -nostdinc++ to CFLAGS, to prevent picking up any C++
headers outside the source tree.

MFC r299144:

Import libcxxrt master 516a65c109eb0a01e5e95fbef455eb3215135cef.


    [26 lines not shown]

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

ftp.microsoft.com is dead and the document was not archived, point to the full
protocol spec document instead.
Fix spelling mistake flagged by igor.
Rephrase bad sentence flagged by igor.

Approved by:        bcr (mentor)
MFC after:        5 days
Differential Revision:         https://reviews.freebsd.org/D10111
Delta File
+4 -4 head/usr.sbin/ppp/ppp.8
+4 -4 1 file

FreeBSD — stable/10/sys/kern kern_sig.c, stable/10/tests/sys/kern ptrace_test.c

MFC r315412, r314852:

r315412:
    Don't clear p_ptevents on normal SIGKILL delivery

    The ptrace() user has the option of discarding the signal. In such a
    case, p_ptevents should not be modified. If the ptrace() user decides to
    send a SIGKILL, ptevents will be cleared in ptracestop(). procfs events
    do not have the capability to discard the signal, so continue to clear
    the mask in that case.

r314852:
    don't stop in issignal() if P_SINGLE_EXIT is set

    Suppose a traced process is stopped in ptracestop() due to receipt of a
    SIGSTOP signal, and is awaiting orders from the tracing process on how
    to handle the signal. Before sending any such orders, the tracing
    process exits. This should kill the traced process. But suppose a second
    thread handles the SIGKILL and proceeds to exit1(), calling
    thread_single(). The first thread will now awaken and will have a chance
    to check once more if it should go to sleep due to the SIGSTOP.  It must
    not sleep after P_SINGLE_EXIT has been set; this would prevent the
    SIGKILL from taking effect, leaving a stopped orphan behind after the
    tracing process dies.


    [3 lines not shown]

FreeBSD — projects powerpcspe

Delete the powerpcspe project branch.

This was merged to head in r307761.
Delta File
+0 -0 projects/powerpcspe/
+0 -0 1 file

FreeBSD — head/sys/dev/sound/pci/hda hdac.h hdacc.c

Add ids for ALC233 found on Intel Skull Mountain NUC.

FreeBSD — head/sys/kern kern_synch.c

dtrace sched:::preempt should fire only when there is preemption

The probe fire on any thread switch before.

Reviewed by:        markj
MFC after:        1 week
Sponsored by:        Panzura
Delta File
+5 -1 head/sys/kern/kern_synch.c
+5 -1 1 file

FreeBSD — head/sys/amd64/amd64 apic_vector.S genassym.c, head/sys/amd64/vmm vmm_host.h vmm.c

specific end of interrupt implementation for AMD Local APIC

The change is more intrusive than I would like because the feature
requires that a vector number is written to a special register.
Thus, now the vector number has to be provided to lapic_eoi().
It was readily available in the IO-APIC and MSI cases, but the IPI
handlers required more work.
Also, we now store the VMM IPI number in a global variable, so that it
is available to the justreturn handler for the same reason.

Reviewed by:        kib
MFC after:        6 weeks
Differential Revision: https://reviews.freebsd.org/D9880

FreeBSD — head/sys/dev/iwn if_iwn.c if_iwnreg.h

iwn: do not try to update node configuration when the node does not exist.

Firmware will just respond with status '0x8' (node does not exist) or
will hang -> cause 'device timeout's (sometimes).

FreeBSD — head/sys/amd64/linux linux_dummy.c, head/sys/amd64/linux32 linux32_dummy.c

Implement Linux mincore() system call.
This is necessary for the upcoming drm-next.

Suggested by:        hselasky@
MFC after:        1 month