Displaying 1 50 of 301,755 commits (0.024s)

FreeBSD — stable/10/lib/libc/stdio fgetln.c fgetln.3

MFC r295632

getln: We cannot expand the buffer beyond INT_MAX (_size overflows).

In such cases return ENOMEM. This is a limitation of our
implementation, alternatively you may consider getline(3).

Differential Revision:  https://reviews.freebsd.org/D442 (Partial)
Obtained from:  Apple Inc. (Libc 997.90.3)

FreeBSD — head/lib Makefile libifc, head/lib/libifc libifc.c libifc.h

Add libifc, a library implementing core functionality that exists in ifconfig(8) today.

libifc (pronounced lib-ifconfig) aims to be a light abstraction layer between
programs and the kernel APIs for managing the network configuration.
This should hopefully make programs easier to maintain, and reduce code
duplication.

Work will begin on making ifconfig(8) use this library in the near future.

This code is still evolving. The interface should not be considered stable until
it is announced as such.

Submitted By: Marie Helene Kvello-Aune <marieheleneka at gmail.com>
Reviewed By: kp
Differential Revision: https://reviews.freebsd.org/D7529

FreeBSD — head/bin/dd dd.1, head/sbin/ggate/ggatec ggatec.8

Remove last remnants of acd(4), mcd(4), and scd(4) drivers.

Approved by:        jhb

FreeBSD — projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/stdlib t_posix_memalign.c

Don't test `size[i] % align[i] == 0` case on FreeBSD

Per jemalloc(3)/aligned_alloc(3), the behavior is undefined if the size
isn't an integral multiple of the alignment. Thus, this is a NetBSD-specific
test.

Sponsored by: EMC / Isilon Storage Division

FreeBSD — head/sys/kern kern_umtx.c

In both do_rw_wrlock() and do_rw_rdlock() after r304808, do not
obliterate possible error from sleep with errors from
umtxq_check_susp(), when looping to clear URWLOCK_{READ,WRITE}_WAITERS.

Noted and reviewed by:        vangyzen
Sponsored by:        The FreeBSD Foundation
MFC after:        1 week
Delta File
+12 -6 head/sys/kern/kern_umtx.c
+12 -6 1 file

FreeBSD — head/lib/libc/stdio fputwc.c

Remove "Fast path", it bypass __wcrtomb() and all its error checking.
One of affected encoding example: US-ASCII

MFC after:      7 days
Delta File
+3 -13 head/lib/libc/stdio/fputwc.c
+3 -13 1 file

FreeBSD — head/lib/libc/stdio vfprintf.c vfwprintf.c

Don't check for __SERR which may stick from one of any previous stdio
functions.
__SERR is for user and the rest of stdio code do not check it
for error sensing internally, only set it.
In vf(w)printf.c here it is more easy to save __SERR, clear and restore it.

FreeBSD — head/usr.bin/getconf pathconf.gperf

Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs

It's not necessarily intuitive that the variables to query contain TRUSTEDBSD
in the prefix. Add non-TRUSTEDBSD prefixed knobs for querying things like
"_PC_ACL_NFS4".

MFC after:        1 week
Relnotes:        yes
Reviewed by:        wollman
Sponsored by:        EMC / Isilon Storage Division
Differential Revision:        https://reviews.freebsd.org/D7618

FreeBSD — head/sys/kern kern_umtx.c

Prevent leak of URWLOCK_READ_WAITERS flag for urwlocks.

If there was some error, e.g. the sleep was interrupted, as in the
referenced PR, do_rw_rdlock() did not cleared URWLOCK_READ_WAITERS.
Since unlock only wakes up write waiters when there is no read
waiters, for URWLOCK_PREFER_READER kind of locks, the result was
missed wakeups for writers.

In particular, the most visible victims are ld-elf.so locks in
processes which loaded libthr, because rtld locks are urwlocks in
prefer-reader mode.  Normal rwlocks fall into prefer-reader mode only
if thread already owns rw lock in read mode, which is not typical and
correspondingly less visible.  In the PR, unowned rtld bind lock was
waited for in the process where only one thread was left alive.

Note that do_rw_wrlock() correctly clears URWLOCK_WRITE_WAITERS in
case of errors.

Reported and tested by:        longwitz at incore.de
PR:        211947
Sponsored by:        The FreeBSD Foundation
MFC after:        1 week
Delta File
+7 -2 head/sys/kern/kern_umtx.c
+7 -2 1 file

FreeBSD — head/usr.bin/bsdiff/bspatch bspatch.c

Capsicumize bspatch

Move all of the fopen() and open() calls to the top of main()

Restrict each FD to least privilege (read/seek only, write only, etc)

cap_enter(), and make all except the output FD read/seek only.

Reviewed by:        emaste, ed, oshogbo, delphij
Approved by:        so
MFC after:        3 days
Relnotes:        yes
Sponsored by:        ScaleEngine Inc.
Differential Revision:        https://reviews.freebsd.org/D7358
Delta File
+52 -12 head/usr.bin/bsdiff/bspatch/bspatch.c
+52 -12 1 file

FreeBSD — head/sys/arm64/arm64 pmap.c

Fix an assert, it should check if, when moving from 1 l1 to 512 l2 blocks,
the l2 entry is a block type and not an l3 page.

While here fix the string to correct the level name and add a missing ')'.

Obtained from:        ABT Systems Ltd
MFC after:        1 month
Sponsored by:        The FreeBSD Foundation
Delta File
+4 -4 head/sys/arm64/arm64/pmap.c
+4 -4 1 file

FreeBSD — head/sys/arm64/conf GENERIC, head/sys/conf files.arm64

Add support for Allwinner A64.

Reviewed by:        andrew, manu
Relnotes:        yes

FreeBSD — head/sys/dev/syscons syscons.c syscons.h, head/sys/kern subr_witness.c

Less-quick fix for locking fixes in r172250.  r172250 added a second
syscons spinlock for the output routine alone.  It is better to extend
the coverage of the first syscons spinlock added in r162285.  2 locks
might work with complicated juggling, but no juggling was done.  What
the 2 locks actually did was to cover some of the missing locking in
each other and deadlock less often against each other than a single
lock with larger coverage would against itself.  Races are preferable
to deadlocks here, but 2 locks are still worse since they are harder
to understand and fix.

Prefer deadlocks to races and merge the second lock into the first one.

Extend the scope of the spinlocking to all of sc_cnputc() instead of
just the sc_puts() part.  This further prefers deadlocks to races.

Extend the kdb_active hack from sc_puts() internals for the second lock
to all spinlocking.  This reduces deadlocks much more than the other
changes increases them.  The s/p,10* test in ddb gets much further now.
Hide this detail in the SC_VIDEO_LOCK() macro.  Add namespace pollution
in 1 nested #include and reduce namespace pollution in other nested
#includes to pay for this.

Move the first lock higher in the witness order.  The second lock was
unnaturally low and the first lock was unnaturally high.  The second
lock had to be above "sleepq chain" and/or "callout" to avoid spurious

    [9 lines not shown]

FreeBSD — head/sys/netinet tcp_input.c tcp_var.h, head/sys/netinet/cc cc_newreno.c cc.h

Pass the number of segments coalesced by LRO up the stack by repurposing the
tso_segsz pkthdr field during RX processing, and use the information in TCP for
more correct accounting and as a congestion control input. This is only a start,
and an audit of other uses for the data is left as future work.

Reviewed by:        gallatin, rrs
Sponsored by:        Netflix, Inc.
Differential Revision:        https://reviews.freebsd.org/D7564

FreeBSD — head/etc/rc.d ntpd

Remove the gratuitous check for $FreeBSD$ and rename the function
to ntpd_init_leapfile, to ensure a copy exists in /var/db if a copy
isn't already there.

Reported by:        ache@
MFC after:        1 day
Delta File
+3 -6 head/etc/rc.d/ntpd
+3 -6 1 file

FreeBSD — head/sys/boot/efi/loader devicename.c

Don't set *dev in the zfs root case, it may be NULL and will correctly be
set later in the function. This fixes a potential NULL pointer dereference
found on arm64.

Obtained from:        ABT Systems Ltd
MFC after:        1 week
Sponsored by:        The FreeBSD Foundation

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

Fix logic errors in bounds checks in previous commit.  The 2-entry stack
was overrun for grab levels larger than 2.

Reported by:        pluknet
Delta File
+2 -2 head/sys/dev/syscons/syscons.c
+2 -2 1 file

FreeBSD — head/sys/arm64/arm64 busdma_bounce.c

Map coherent memory in a non-coherent dma tag as uncached. This is similar
to what the 32-bit arm code does, with the exception that it always assumes
the tag is non-coherent.

Tested by:        jmcneill
Obtained from:        ABT Systems Ltd
MFC after:        1 week
Sponsored by:        The FreeBSD Foundation

FreeBSD — head/sys/arm/allwinner/clk aw_pll.c

Add support for Allwinner A64 PLL_PERIPH0/PLL_PERIPH1 and PLL_HSIC clocks.

Reviewed by:        andrew, manu
Delta File
+47 -3 head/sys/arm/allwinner/clk/aw_pll.c
+47 -3 1 file

FreeBSD — head/tests/sys/kqueue vnode.c kqueue_test.sh

Make use of Kyua's work directories.

Change the vnode tests to use the current directory when creating temporary
files, which we can assume is a volatile work directory, and then make the
kqueue_test.sh driver _not_ abandon the directory created by Kyua.

This makes the various kqueue tests independent of each other, and ensures
the temporary file is cleaned up on failure.

Problem spotted by asomers@ when reviewing D4254.

FreeBSD — head/sys/arm/allwinner/clk aw_modclk.c

Switch parent clock when setting frequency if a new parent is a better
candidate for the target rate.

Reviewed by:        andrew, manu
Delta File
+29 -10 head/sys/arm/allwinner/clk/aw_modclk.c
+29 -10 1 file

FreeBSD — head/sys/arm/allwinner/clk aw_gate.c

Add support for Allwinner multi-parent bus gates.

Reviewed by:        andrew, manu
Delta File
+49 -36 head/sys/arm/allwinner/clk/aw_gate.c
+49 -36 1 file

FreeBSD — head/sys/arm/allwinner axp81x.c

Expose DC1SW as a regulator switch. On Pine64 this is used to control EMAC
PHY power.

Reviewed by:        andrew, manu
Delta File
+176 -5 head/sys/arm/allwinner/axp81x.c
+176 -5 1 file

FreeBSD — head/sys/arm/allwinner aw_rtc.c

Remove dependency on allwinner_soc_family() as it is not available on arm64.

Reviewed by:        andrew, manu
Delta File
+5 -3 head/sys/arm/allwinner/aw_rtc.c
+5 -3 1 file

FreeBSD — stable/11/sys/netinet sctp_output.c sctputil.c

MFC r304543:
Unbreak sctp_connectx().

MFC r304573:
Remove duplicate code, which is not protected by the appropriate locks.

MFC r304579:
Improve the locking when sending user messages.

First, keep a ref count on the stcb after looking it up, as
done in the other lookup cases.
Second, before looking again at sp, ensure that it is not
freed, because the assoc is about to be freed.

FreeBSD — head/sys/dev/hyperv/storvsc hv_storvsc_drv_freebsd.c hv_vstorage.h

hyperv/storvsc: Increase queue depth and rework channel selection.

- Increasing queue depth gives ~100% performance improvement for
  randwrite fio test in Azure.
- New channel selection, which takes LUN id and the current cpuid
  into consideration, gives additional ~20% performance improvement
  for ranwrite fio test in Azure.

Submitted by:   Hongzhang Jiang <honzhan microsoft com>
Modified by:    sephe
MFC after:        1 week
Sponsored by:        Microsoft
Differential Revision:        https://reviews.freebsd.org/D7622

FreeBSD — head/sys/dev/hyperv/include vmbus.h, head/sys/dev/hyperv/vmbus vmbus_chan.c vmbus_brvar.h

hyperv/vmbus: Add function to calculate max # of elements in a bufring.

MFC after:        1 week
Sponsored by:        Microsoft

FreeBSD — head UPDATING, head/sys/sys param.h

Bump __FreeBSD_version for r304787 and add a note about it to UPDATING.
Delta File
+6 -0 head/UPDATING
+1 -1 head/sys/sys/param.h
+7 -1 2 files

FreeBSD — head/sys/dev/hyperv/utilities hv_util.c hv_heartbeat.c

hyperv/ic: Update total message size if negotiate message size grows.

MFC after:        1 week
Sponsored by:        Microsoft
Differential Revision:        https://reviews.freebsd.org/D7627

FreeBSD — head/sys/cam/ctl ctl_frontend_iscsi.c ctl_ioctl.h, head/sys/dev/cxgbe/cxgbei icl_cxgbei.c

Make the iSCSI parameter negotiation more flexible.

Decouple the send and receive limits on the amount of data in a single
iSCSI PDU.  MaxRecvDataSegmentLength is declarative, not negotiated, and
is direction-specific so there is no reason for both ends to limit
themselves to the same min(initiator, target) value in both directions.

Allow iSCSI drivers to report their send, receive, first burst, and max
burst limits explicitly instead of using hardcoded values or trying to
derive all of them from the receive limit (which was the only limit
reported by the drivers prior to this change).

Display the send and receive limits separately in the userspace iSCSI
utilities.

Reviewed by:        jpaetzel@ (earlier version), trasz@
Sponsored by:        Chelsio Communications
Differential Revision:        https://reviews.freebsd.org/D7279

FreeBSD — head/sys/dev/hyperv/utilities hv_heartbeat.c vmbus_icreg.h

hyperv/ic: Cleanup heartbeat channel callback.

MFC after:        1 week
Sponsored by:        Microsoft
Differential Revision:        https://reviews.freebsd.org/D7626

FreeBSD — head/sys/dev/hyperv/netvsc hv_rndis_filter.c hv_net_vsc.h, head/sys/net rndis.h

hyperv/hn: Use vmbus xact for RNDIS initialize.

MFC after:        1 week
Sponsored by:        Microsoft
Differential Revision:        https://reviews.freebsd.org/D7624

FreeBSD — head/sys/dev/hyperv/netvsc hv_rndis_filter.c

hyperv/hn: Add compat code for RNDIS reorganization phase.

MFC after:        1 week
Sponsored by:        Microsoft
Differential Revision:        https://reviews.freebsd.org/D7621

FreeBSD — head/sys/dev/hyperv/netvsc hv_rndis.h hv_rndis_filter.c

hyperv/hn: Use definition in net/rndis.h for message type and status code.

MFC after:        1 week
Sponsored by:        Microsoft
Differential Revision:        https://reviews.freebsd.org/D7620

FreeBSD — head/etc/rc.d ntpd

Make validation of the leap-seconds file unconditional.

MFC after:        1 day
Delta File
+15 -7 head/etc/rc.d/ntpd
+15 -7 1 file

FreeBSD — head/etc/rc.d ntpd

Add logic to replace the working ntp leap-seconds file in /var/db
if it contains a $FreeBSD$ header. The header will cause the file
to fail checksum of the hash causing ntpd to ignore the file.

MFC after:        1 day
Delta File
+7 -0 head/etc/rc.d/ntpd
+7 -0 1 file

FreeBSD — head/etc/rc.d ntpd

Change the algorithm by which /var/db/leap-seconds is updated.

1. Use the leap-seconds version number (update time) to determine
   whether to update the file or not.

2. If the version numbers of the files is the same, use the later
   expiry date to determine which file to use.

Suggested by:        ian@
MFC after:        1 day
Delta File
+12 -3 head/etc/rc.d/ntpd
+12 -3 1 file

FreeBSD — head/etc/ntp leap-seconds

Revert r298887 (spelling fix) and remove $FreeBSD$ because text changes
to leap-seconds invaldidates validation hash at the end of the file.

Remove svn:keywords and replace with fbsd:nokeywords=yes to
support this change.

MFC after:        1 day
Delta File
+1 -3 head/etc/ntp/leap-seconds
+1 -3 1 file

FreeBSD — head/etc newsyslog.conf

Increase the default rotation threshold of log files from 100kb to 1000kb

Submitted by:        Sean Kelly <smkelly at freebsd.org>
Differential Revision:        https://reviews.freebsd.org/D6792
Delta File
+14 -14 head/etc/newsyslog.conf
+14 -14 1 file

FreeBSD — projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root zpool_import.kshlib

Delete an extraneous file accidentally committed in r292361

cddl/zfs/tests/cli_root/zpool_import/zpool_import.kshlib
cddl/zfs/tests/cli_root/zpool_import.kshlib
        This file accidentally got duped.

Sponsored by:        Spectra Logic Corp

FreeBSD — projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_destroy zpool_destroy_004_pos.ksh

Fix intermittent failures in zpool_destroy_004_pos

The test case has multiple zfs send/recv scenarios.
The scenario that was commonly failing was as follows;
1.) zfs send poolA | zfs recv poolB
2.) wait
3.) destroy -f poolA
4.) declare an error if the exit status of the send/recv pipeline
was success.

Step 4 was attempting to assert that the destruction of poolA interrupted
the zfs send. The problem is that the zfs send could complete before the zfs
destroy -f poolA was issued. If this occured then the receive half of the
pipeline would succeed and the exit code of the pipeline would be zero.

It is not possible to manage this race from a shell script.

Changed test to allow the scenario described above to not declare an error
if the zfs receive succeeds.

Submitted by:        Dave Baukus
Reviewed by:        asomers
Sponsored by:        Spectra Logic Corp

FreeBSD — user/cperciva/freebsd-update-build/scripts 11.0-RC2, user/cperciva/freebsd-update-build/scripts/11.0-RC2/amd64 build.conf

Add 11.0-RC2 config.

FreeBSD — projects/zfsd/head Makefile.inc1 ObsoleteFiles.inc, projects/zfsd/head/bin/csh Makefile

IFC @304773

FreeBSD — head/sys/dev/syscons syscons.c syscons.h

Flesh out the state and flags args to sccnopen().  Set state flags to
indicate (potentially partial) success of the open.  Use these to
decide what to close in sccnclose().  Only grab/ungrab use open/close
so far.

Add a per-sc variable to count successful keyboard opens and use
this instead of the grab count to decide if the keyboad state has
been switched.

Start fixing the locking by using atomic ops for the most important
counter -- the grab level one.  Other racy counting will eventually
be fixed by normal mutex or kdb locking in most cases.

Use a 2-entry per-sc stack of states for grabbing.  2 is just enough
to debug grabbing, e.g., for gets().  gets() grabs once and might not
be able to do a full (or any) state switch.  ddb grabs again and has
a better chance of doing a full state switch and needs a place to
stack the previous state.  For more than 3 levels, grabbing just
changes the count.  Console drivers should try to switch on every i/o
in case lower levels of nesting failed to switch but the current level
succeeds, but then the switch (back) must be completed on every i/o
and this flaps the state unless the switch is null.  The main point
of grabbing is to make it null quite often.  Syscons grabbing also
does a carefully chosen screen focus that is not done on every i/o.


    [3 lines not shown]

FreeBSD — projects/clang390-import/lib/clang/include/clang/Basic Version.inc

Update clang version information for r279477.

FreeBSD — projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen CGExprScalar.cpp, projects/clang390-import/contrib/llvm/tools/clang/lib/Driver ToolChains.cpp

Update clang to release_39 branch r279477.

FreeBSD — vendor/lldb lldb-release_39-r279477

Tag lldb release_39 branch r279477.
Delta File
+0 -0 vendor/lldb/lldb-release_39-r279477/
+0 -0 1 file

FreeBSD — vendor/lld lldb-release_39-r279477

Tag lld release_39 branch r279477.
Delta File
+0 -0 vendor/lld/lldb-release_39-r279477/
+0 -0 1 file

FreeBSD — vendor/compiler-rt/dist/lib/msan/tests msan_test.cc