Displaying 1 50 of 336,570 commits (0.022s)

FreeBSD — head/lib/libc/locale c16rtomb.c c32rtomb.c

Fix WITHOUT_ICONV build after r340276.

Reported by:        olivier
Approved by:        kib (mentor, implicit)

FreeBSD — head UPDATING, head/usr.sbin/ctm/ctm ctm.1 ctm.c

Prepare move of ctm from base to a port (misc/ctm) by:
- Adding a note to UPDATING
- Adding a note to the history section of the manpage ctm.1
- Adding a message printed to STDERR to the ctm program

This version is meant for release in FreeBSD-12.0 and should remain in
FreeBSD-12 over its life-time.

A follow-up commit will remove ctm from -CURRENT after the MFC to 12
has happened.

Approved by:        imp, rgrimes, bcr (man-page)
MFC after:        3 days
Relnotes:        yes
Differential Revision:        https://reviews.freebsd.org/D17969

FreeBSD — projects/clang700-import Makefile.libcompat Makefile.inc1, projects/clang700-import/lib Makefile

Merge ^/head r340368 through r340426.

FreeBSD — head/sys/dev/amdtemp amdtemp.c

amdtemp(4): Fix temperature reporting on AMD 2990WX

Update the AMD family 17h temperature reporting based on AMD Tech Doc 56255
OSRR, section 4.2.1.

For CPUS w/CUR_TEMP_RANGE_SEL set, scale the reported temperature into the
range -49..206; i.e., subtract 49°C.

Submitted by:        gallatin@
Reported by:        bcran@
Reviewed by:        me (long ago)
MFC after:        22.57 seconds
Relnotes:        yea
Differential Revision:        https://reviews.freebsd.org/D16855
Delta File
+13 -4 head/sys/dev/amdtemp/amdtemp.c
+13 -4 1 file

FreeBSD — head/sys/dev/amdsmn amdsmn.c, head/sys/dev/amdtemp amdtemp.c

amdsmn(4)/amdtemp(4): Attach to Ryzen 2 hostbridges

As reported, tested, and patch supplied by Johannes.

There may be future work to do to support multiple sensors, but for now, any
sensor at all is a strict improvement for Ryzen 2 systems.

PR:                228480
Submitted by:        Johannes Lundberg <johalun0 AT gmail.com> (earlier version)
Reported by:        deischen@, Johannes, and numerous others
MFC after:        3.72 days

FreeBSD — head/sys/compat/freebsd32 capabilities.conf Makefile, head/sys/kern makesyscalls.sh

Use the main capabilities.conf for freebsd32.

Allow the location of capabilities.conf to be configured.

Also allow a per-abi syscall prefix to be configured with the
abi_func_prefix syscalls.conf variable and check syscalls against
entries in capabilities.conf with and without the prefix amended.

Take advantage of these two features to allow use shared capabilities.conf
between the default syscall vector and the freebsd32 compatability
layer.  We've been inconsistent about keeping the two in sync as
evidenced by the bugs fixed in r340294.  This eliminates that problem
going forward.

Reviewed by:        kib
Obtained from:        CheriBSD
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D17932

FreeBSD — head/sys/kern kern_thread.c

Fix build on some architectures after r340413. On amd64 epoch.h
appeared to be included implicitly.
Delta File
+1 -0 head/sys/kern/kern_thread.c
+1 -0 1 file

FreeBSD — head/sbin/dump traverse.c main.c

Fix build break from dump incompatibility I introduced in -r340411

Pointy-hat to: mckusick

FreeBSD — head/usr.sbin/cpucontrol cpucontrol.c intel.c

cpucontrol(8): De-duplicate common update logic

Every µcode-updater must open the cpucontrol devfs node RDWR, open a
firmware file, validate the FW file has a positive length, mmap it, etc.
De-duplicate that identical logic between every individual platform.

Also, constify references to the readonly-mapped firmware files while here.

Sponsored by:        Dell EMC Isilon

FreeBSD — head/sys/kern subr_epoch.c

epoch(9) revert r340097 - no longer a need for multiple sections per cpu

I spoke with Samy Bahra and recent changes to CK to make ck_epoch_call and
ck_epoch_poll not modify the record have eliminated the need for this.
Delta File
+9 -11 head/sys/kern/subr_epoch.c
+9 -11 1 file

FreeBSD — head/sys/kern subr_epoch.c

style(9), mostly adjusting overly long lines.
Delta File
+30 -24 head/sys/kern/subr_epoch.c
+30 -24 1 file

FreeBSD — head/sys/dev/tws tws_cam.c tws_services.h

Remove support for versions prior to FreeBSD 7.0 from twa(4)

This was for pre-7.0 CAM support. Neither the CAM nor the busdma
changes over the years have not been ifdef'd. The code cannot build
on 6.x anymore. Support for 6.4 ended in 2010, so remove them.

FreeBSD — head/sys/kern subr_epoch.c genoffset.c

With epoch not inlined, there is no point in using _lite KPI. While here,
remove some unnecessary casts.

FreeBSD — head/sbin/dump traverse.c main.c

Plug build break after r340411.

FreeBSD — head/sys/kern subr_epoch.c, head/sys/sys epoch.h

The dualism between epoch_tracker and epoch_thread is fragile and
unnecessary. So, expose CK types to kernel and use a single normal
structure for epoch_tracker.

Reviewed by:        jtl, gallatin
Delta File
+19 -34 head/sys/kern/subr_epoch.c
+16 -16 head/sys/sys/epoch.h
+35 -50 2 files

FreeBSD — head/sys/amd64/conf NOTES

Add ZFS to amd64 NOTES to catch future breakage of static linking
Delta File
+5 -0 head/sys/amd64/conf/NOTES
+5 -0 1 file

FreeBSD — head/sys/kern subr_epoch.c kern_thread.c, head/sys/net if.c if_var.h

For compatibility KPI functions like if_addr_rlock() that used to have
mutexes but now are converted to epoch(9) use thread-private epoch_tracker.
Embedding tracker into ifnet(9) or ifnet derived structures creates a non
reentrable function, that will fail miserably if called simultaneously from
two different contexts.
A thread private tracker will provide a single tracker that would allow to
call these functions safely. It doesn't allow nested call, but this is not
expected from compatibility KPIs.

Reviewed by:        markj

FreeBSD — head/sys/dev/nvme nvme_ns.c

Use atomic_load_acq_int() here too to poll done, ala r328521
Delta File
+3 -3 head/sys/dev/nvme/nvme_ns.c
+3 -3 1 file

FreeBSD — head/lib/libufs getinode.3 inode.c, head/sbin/clri clri.c

In preparation for adding inode check-hashes, clean up and
document the libufs interface for fetching and storing inodes.
The undocumented getino / putino interface has been replaced
with a new getinode / putinode interface.

Convert the utilities that had been using the undocumented
interface to use the new documented interface.

No functional change (as for now the libufs library does not
do inode check-hashes).

Reviewed by:  kib
Tested by:    Peter Holm
Sponsored by: Netflix

FreeBSD — head/sys/kern kern_mutex.c kern_rwlock.c

locks: plug warnings about unitialized variables

They only showed up after I redefined LOCKSTAT_ENABLED to 0.

doing_lockprof in mutex.c is a real (but harmless) bug. Should the
value be non-zero it will do checks for lock profiling which would
otherwise be skipped.

state in rwlock.c is a wart from the compiler, the value can't be
used if lock profiling is not enabled.

Sponsored by:        The FreeBSD Foundation

FreeBSD — head/sys/kern kern_rmlock.c kern_rwlock.c

Make no assertions about lock state when the scheduler is stopped.

Change the assert paths in rm, rw, and sx locks to match the lock
and unlock paths.  I did this for mutexes in r306346.

Reported by:        Travis Lane <tlane at isilon.com>
MFC after:        2 weeks
Sponsored by:        Dell EMC Isilon

FreeBSD — head/lib/libnv common_impl.h msgio.c, head/lib/libnv/tests nvlist_send_recv_test.c

Ensure that libnv can be used when kern.trap_enotcap=1.

libnv used fcntl(fd, F_GETFL) to test whether fd is a valid file
descriptor.  Aside from being racy, this check requires CAP_FCNTL
rights on fd.  Instead, use fcntl(fd, F_GETFD), which does not require
any capability rights.

Also remove some redundant fd_is_valid() checks to avoid extra system
calls; in many cases we were performing this check immediately before
dup()ing the descriptor.

Reviewed by:        cem, oshogbo (previous version)
MFC after:        2 weeks
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D17963

FreeBSD — head Makefile.inc1, head/release/scripts make-manifest.sh

In followup to r340406, remove doc from the EXTRA_DISTRIBUTIONS
list and remaining references from the script used to create the
MANIFEST file used by bsdinstall(8).

No MFC is planned at this time.

Sponsored by:        The FreeBSD Foundation

FreeBSD — head/release/scripts make-manifest.sh

The roff ascii.gz documentation installed to /usr/share/doc
was removed in r318881 when roff was removed from the base
system.

This results in the doc.txz distribution set containing a
single directory (./) which is empty.

Remove the "Additional documentation" option from the menu
selection of bsdinstall(8), as the plain-text documentation
installed in /usr/share/doc is installed as part of the
packageworld target.

The doc entry has not been removed from EXTRA_DISTRIBUTIONS
in Makefile.inc1, in case its removal triggers an issue with
freebsd-update(8), which is currently aware of the world/doc
component, so the empty doc.txz continues to be created as
a precaution.

Noticed by:        rgrimes
MFC after:        2 days
MFC before:        12.0-RC1
Sponsored by:        The FreeBSD Foundation

FreeBSD — head/sys/vm uma_core.c uma_int.h

Add accounting to per-domain UMA full bucket caches.

In particular, track the current size of the cache and maintain an
estimate of its working set size.  This will be used to decide how
much to shrink various caches when the kernel attempts to reclaim
pages.  As a secondary effect, it makes statistics aggregation (done
by, e.g., vmstat -z) cheaper since sysctl_vm_zone_stats() no longer
needs to iterate over lists of cached buckets.

Discussed with:        alc, glebius, jeff
Tested by:        pho (previous version)
MFC after:        1 month
Differential Revision:        https://reviews.freebsd.org/D16666
Delta File
+78 -35 head/sys/vm/uma_core.c
+6 -1 head/sys/vm/uma_int.h
+84 -36 2 files

FreeBSD — head/sys/kern subr_epoch.c, head/sys/sys epoch_private.h epoch.h

Uninline epoch(9) entrance and exit. There is no proof that modern
processors would benefit from avoiding a function call, but bloating
code. In fact, clang created an uninlined real function for many
object files in the network stack.

- Move epoch_private.h into subr_epoch.c. Code copied exactly, avoiding
  any changes, including style(9).
- Remove private copies of critical_enter/exit.

Reviewed by:        kib, jtl
Differential Revision:        https://reviews.freebsd.org/D17879

FreeBSD — stable/11/sys/dev/mpr mpr_pci.c, stable/11/sys/dev/mps mps_pci.c

Fix a regression from prior to 11.2 that caused MSI (not MSI-X) interrupt
allocation to fail.  While here, refactor the code so that it's more clear
and less likely to break in the future.  This is not an MFC due to the code
in 12/head being very different, but it follows the latter's structure
more closely than before.

Reported by:        Harry Schmalzbauer

FreeBSD — head/sys/kern subr_blist.c, head/sys/sys blist.h

Allow allocations across meta boundaries.

Remove restrictions that prevent allocation requests to cross the
boundary between two meta nodes.

Replace the bmu_avail field in meta nodes with a bitmap that identifies
which subtrees have some free memory, and iterate over the nonempty
subtrees only in blst_meta_alloc.  If free memory is scarce, this should
make searching for it faster.

Put the code for handling the next-leaf allocation in a separate
function.  When taking blocks from the next leaf empties the leaf, be
sure to clear the appropriate bit in its parent, and so on, up to the
least-common ancestor of this leaf and the next.

Eliminate special terminator nodes, and rely instead on the fact that
there is a 0-bit at the end of the bitmask at the root of the tree that
will stop a meta_alloc search, or a next-leaf search, before the search
falls off the end of the tree. Make sure that the tree is big enough to
have space for that 0-bit.

Eliminate special all-free indicators.  Lazy initialization of subtrees
stands in the way of having an allocation span a meta-node boundary, so
a subtree of all free blocks is not treated specially.  Subtrees of
all-allocated blocks are still recognized by looking at the bitmask at

    [9 lines not shown]
Delta File
+221 -376 head/sys/kern/subr_blist.c
+3 -5 head/sys/sys/blist.h
+224 -381 2 files

FreeBSD — stable/12 ObsoleteFiles.inc, stable/12/share/man/man9 contigmalloc.9 malloc.9

MFC r339927:
Add malloc_domainset(9) and _domainset variants to other allocator KPIs.

Approved by:        re (gjb)

FreeBSD — head/sys/riscv/include cpu.h

RISC-V: Implement get_cyclecount(9).

Add the missing implementation for get_cyclecount(9) on RISC-V by
reading the cycle CSR.

Submitted by:        Mitchell Horne <mhorne063 at gmail.com>
Reviewed by:        jhb
MFC after:        2 weeks
Differential Revision:        https://reviews.freebsd.org/D17953
Delta File
+2 -2 head/sys/riscv/include/cpu.h
+2 -2 1 file

FreeBSD — head/sys/riscv/include riscvreg.h cpufunc.h

RISC-V: Add macros for reading performance counter CSRs.

The RISC-V spec defines several performance counter CSRs such as: cycle,
time, instret, hpmcounter(3...31).  They are defined to be 64-bits wide
on all RISC-V architectures.  On RV64 and RV128 they can be read from a
single CSR.  On RV32, additional CSRs (given the suffix "h") are present
which contain the upper 32 bits of these counters, and must be read as
well.  (See section 2.8 in the User ISA Spec for full details.)

This change adds macros for reading these values safely on any RISC-V
ISA length.  Obviously we aren't supporting anything other than RV64
at the moment, but this ensures we won't need to change how we read
these values if we ever do.

Submitted by:        Mitchell Horne <mhorne063 at gmail.com>
Reviewed by:        jhb
MFC after:        2 weeks
Differential Revision:        https://reviews.freebsd.org/D17952

FreeBSD — stable/12/sys/vm vm_object.c

MFC r340331:
Re-apply r336984, reverting r339934.

Approved by:        re (gjb)
Delta File
+3 -2 stable/12/sys/vm/vm_object.c
+3 -2 1 file

FreeBSD — stable/12/sys/netinet ip_reass.c

MFC r340313:
Ensure that IP fragments do not extend beyond IP_MAXPACKET.

Approved by:        re (gjb)
Delta File
+10 -0 stable/12/sys/netinet/ip_reass.c
+10 -0 1 file

FreeBSD — stable/12/sys/kern kern_cpuset.c, stable/12/sys/vm vm_pageout.c uma_core.c

MFC r339925:
Fix some problems that manifest when NUMA domain 0 is empty.

Approved by:        re (gjb)

FreeBSD — head/lib/csu/common crtbegin.c

Run __cxa_finalize in shared objects in the destructor path.

When we have .dtors call them before .dtor handling, otherwise call from
a destructor.

PR:                233056
MFC with:        r339738
Sponsored by:        DARPA, AFRL
Delta File
+24 -3 head/lib/csu/common/crtbegin.c
+24 -3 1 file

FreeBSD — head/sbin/ipfw ipfw.8

Fix part of the SYNOPSIS documenting LIST OF RULES AND PREPROCESSING
that is still referred as last section of the SYNOPSIS later
but was erroneously situated in the section IN-KERNEL NAT.

MFC after:        1 month
Delta File
+11 -11 head/sbin/ipfw/ipfw.8
+11 -11 1 file

FreeBSD — head/sys/powerpc/conf GENERIC64

powerpc64: reduce GENERIC64 diff versus amd64 GENERIC

Reviewed by:        jhibbits
Approved by:        timur (mentor)
Differential Revision:        https://reviews.freebsd.org/D17515
Delta File
+12 -2 head/sys/powerpc/conf/GENERIC64
+12 -2 1 file

FreeBSD — head/sys/kern kern_environment.c

Add dynamic_kenv assertion to init_static_kenv

Both to formally document the requirement that this not be called after the
dynamic kenv is setup, and to perhaps help static analyzers figure out
what's going on. While calling init_static_kenv this late isn't fatal, there
are some caveats that the caller should be aware of:

- Late calls are effectively a no-op, as far as default FreeBSD is
concerned, as everything will switch to searching the dynamic kenv once it's
available.

- Each of the kern_getenv calls will leak memory, as it's assumed that
these are searching static environment and allocations will not be made.

As such, this usage is not sensible and should be detected.
Delta File
+1 -0 head/sys/kern/kern_environment.c
+1 -0 1 file

FreeBSD — head/contrib/elftoolchain/strings strings.c

Revert r340385, strings capability mode

This needs to be reworked for bootstrapping.

FreeBSD — head/sys/dts Makefile.inc, head/sys/dts/arm Makefile.inc Makefile

Fix test-dts{,o} targets

There were two main problems here:

1.) sys/dts/Makefile.inc is not included from various */overlays directories
    by default, only ../Makefile.inc
2.) When shelling out for DTS/DTSO, cwd != .CURDIR, so enumeration always
    failed

These changes allow make test-dts and make test-dtso to function in their
respective directories.

Reviewed by:        manu
MFC after:        3 days
Differential Revision:        https://reviews.freebsd.org/D17961

FreeBSD — stable/12/sys/compat/freebsd32 freebsd32_systrace_args.c freebsd32_proto.h, stable/12/sys/sys sysproto.h

Regen after r340388: MFC r340302: Fix freebsd32 mknod(at).

Approved by:        re (gjb, implicit)
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D17928

FreeBSD — stable/12/sys/compat/freebsd32 freebsd32_misc.c syscalls.master, stable/12/sys/kern syscalls.master

MFC r340302:

Fix freebsd32 mknod(at).

As dev_t is now a 64-bit integer, it requires special handling as a
system call argument.  64-bit arguments are split between two 64-bit
integers due to the way arguments are promoted to allow reuse of most
system call implementations.  They must be reassembled before use.
Further, 64-bit arguments at an odd offset (counting from zero) are
padded and slid to the next slot on powerpc and mips.  Fix the
non-COMPAT11 system call by adding a freebsd32_mknodat() and
appropriately padded declerations.

The COMPAT11 system calls are fully compatible with the 64-bit
implementations so remove the freebsd32_ versions.

Use uint32_t consistently as the type of the old dev_t.  This matches
the old definition.

Reviewed by:        kib
Approved by:        re (gjb)
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D17928

FreeBSD — head/sys/amd64/conf GENERIC MINIMAL, head/sys/i386/conf GENERIC MINIMAL

Add evdev support to amd64 and i386 kernels

Include evdev support and drivers in the amd64 and i386 GENERIC and MINIMAL
kernels.  Evdev is used by X and wayland to handle input devices, and this
change, together with upcomming changes in ports will make us handle input
devices better in graphical UIs.

Reviewed by:        wulf, bapt, imp
Approved by:        imp
Differential Revision:        https://reviews.freebsd.org/D17912

FreeBSD — head/lib Makefile, head/share/mk bsd.linker.mk

retire LINKER_FEATURES filter flag

And build libdl unconditionally.  All supported FreeBSD linkers accept
-F / --filter so there is no need to test for support.

Discussed with:        kib
Sponsored by:        The FreeBSD Foundation

FreeBSD — head/contrib/elftoolchain/strings strings.c

strings: enter capability mode when operating on stdin

Reviewed by:        oshogbo
MFC after:        1 month
Sponsored by:        The FreeBSD Foundation

FreeBSD — head/sys/amd64/amd64 machdep.c, head/sys/x86/include x86_var.h

Apply fix to un-cripple max cpu id on BSP earlier.

We need to know actual value for the standard extended features before
ifuncs are resolved.

Reported and tested by:        madpilot
Sponsored by:        The FreeBSD Foundation
MFC after:        1 week

FreeBSD — head/lib/libc Versions.def

Create namespace for the symbols added during 13-CURRENT cycle.

Sponsored by:        The FreeBSD Foundation
MFC after:        1 week
Delta File
+4 -1 head/lib/libc/Versions.def
+4 -1 1 file

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

s/caph_enter_capser/caph_enter_casper/g

Reported by:        npn
Delta File
+1 -1 head/usr.bin/wc/wc.c
+1 -1 1 file

FreeBSD — head/lib/libcasper/services/cap_fileargs cap_fileargs.c

Fix typo in the comparison.
This fix build with gcc.

Reported by:        jenkins

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

s/caph_enter_with_casper/caph_enter_casper/

Reported by:        npn
Delta File
+1 -1 head/usr.bin/wc/wc.c
+1 -1 1 file