Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (1h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (177d) 

2024-05-10 00:01:36 UTC Now

2019-12-04 08:12:03 UTC MAIN commitmail json YAML

Rename ifm to ife for struct ifmedia_entry *. No functional change.

(msaitoh)

2019-12-04 07:49:39 UTC MAIN commitmail json YAML

2019-12-04 07:03:46 UTC MAIN commitmail json YAML

Fix macppc/dev/if_mc.c::mc_mediachange(). Not tested.

ifmedia_change() is used to change the device's media setting from
user-selected media. The user-selected media is not sc->sc_media.ifm_media but
sc->sc_media.ifm_cur->ifm_media. Note that mc_mediachange() is not called from
anywhere because it's disabled with #ifdef NOTYET.

(msaitoh)

2019-12-04 06:28:35 UTC MAIN commitmail json YAML

2019-12-04 05:36:35 UTC MAIN commitmail json YAML

Disable rngtest on output of cprng_strong.

We already do a self-test for correctenss of Hash_DRBG output;
applying rngtest to it does nothing but give everyone warning fatigue
about spurious rngtest failures.

(riastradh)

2019-12-04 05:19:11 UTC MAIN commitmail json YAML

Fix admsw_mediachange(). Not tested.

ifmedia_change() is used to change the device's media setting from
user-selected media. The user-selected media is not
sc->sc_ifmedia[port]->ifm_media but sc->sc_ifmedia[port].ifm_cur->ifm_media.

(msaitoh)

2019-12-04 04:45:42 UTC MAIN commitmail json YAML

PR/54730: Izumi Tsutsui: Use /var/db/obsolete/<set> to remove obsolete rc.d
files when not in $SOURCEMODE.

(christos)

2019-12-04 03:04:52 UTC MAIN commitmail json YAML

Fix rump definition of cpu_number().

(riastradh)

2019-12-04 03:04:43 UTC MAIN commitmail json YAML

Update rnd(9) man page to reflect reality since netbsd-7.

- Note rndsource_setcb, RND_FLAG_HASCB, and rnd_add_data_sync.
- Note user's obligation to serialize access to each rndsource.

(riastradh)

2019-12-04 01:06:28 UTC MAIN commitmail json YAML

Fix macro error if QAT_DUMP is defined for debugging.

(hikaru)

2019-12-03 22:42:29 UTC MAIN commitmail json YAML

Introspection. From "Surely You're Joking, Mr. Feynman!"

(sevan)

2019-12-03 22:28:41 UTC MAIN commitmail json YAML

- Add some more failsafes to the CPU topology stuff, and build a 3rd
  circular list of peer CPUs in other packages, so we might scroll through
  them in the scheduler when looking to distribute or steal jobs.

- Fold the run queue data structure into spc_schedstate.  Makes kern_runq.c
  a far more pleasant place to work.

- Remove the code in sched_nextlwp() that tries to steal jobs from other
  CPUs.  It's not needed, because we do the very same thing in the idle LWP
  anyway.  Outside the VM system this was one of the the main causes of L3
  cache misses I saw during builds.  On my machine, this change yields a
  60%-70% drop in time on the "hackbench" benchmark (there's clearly a bit
  more going on here, but basically being less aggressive helps).

(ad)

2019-12-03 22:22:36 UTC MAIN commitmail json YAML

2019-12-03 22:10:57 UTC MAIN commitmail json YAML

2019-12-03 22:03:14 UTC MAIN commitmail json YAML

Define lwp_trapframe() macro

(jmcneill)

2019-12-03 22:02:43 UTC MAIN commitmail json YAML

Add KDTRACE_HOOKS support.

(jmcneill)

2019-12-03 16:45:21 UTC MAIN commitmail json YAML

Drop entries for "Scott Bartram and Frank van der Linden" and "the
University of Illinois at Urbana and their contributors".  They are
not referenced anywhere in the tree.

(uwe)

2019-12-03 16:43:16 UTC MAIN commitmail json YAML

Add a comment to the entry for Computer Systems Laboratory at the
University of Utah.  It's missed by the extraction script b/c of the
non-standard formatting of the ad clause.

(uwe)

2019-12-03 16:31:40 UTC MAIN commitmail json YAML

Move the entry for Caldera to its proper place in the sorting order.

(uwe)

2019-12-03 16:27:24 UTC MAIN commitmail json YAML

Use troff \(xx names for the few accented characters we have here.

Extraction script outputs them literally, but some of them are in
utf-8 and some in latin1.  While here also use \(:o for Bodo Moeller
name as instructed.  Lule\(oa is now emited by the extraction script
directly.

This gives us the right characters in PostScript and HTML output.  In
text output they are transliterated with -mtty-char.

(uwe)

2019-12-03 16:22:01 UTC MAIN commitmail json YAML

dm: Make global dm locks static

These are all per-file locks which protect dev/pdev/target structure.
taken-from: DragonFlyBSD

(tkusumi)

2019-12-03 16:21:34 UTC MAIN commitmail json YAML

Translate Lule} to troff's Lule\(oa.

(uwe)

2019-12-03 16:09:13 UTC MAIN commitmail json YAML

dm: Remove unused macro MAX_TARGET_STRING_LEN

that was added but never used in both NetBSD and DragonFlyBSD.
taken-from: DragonFlyBSD

(tkusumi)

2019-12-03 15:47:38 UTC MAIN commitmail json YAML

dm: Include <sys/vnode.h> in dm.h

dm.h already depends on vnode, so have dm.h include <sys/vnode.h>
instead of other .c files.

taken-from: DragonFlyBSD

(tkusumi)

2019-12-03 15:36:00 UTC MAIN commitmail json YAML

dm: Doesn't need to expose struct cmd_function in a header

(tkusumi)

2019-12-03 15:21:00 UTC MAIN commitmail json YAML

2019-12-03 15:03:15 UTC MAIN commitmail json YAML

dm: Remove unused macro DM_CMD_LEN

that was added but never used in both NetBSD and DragonFlyBSD.
taken-from: DragonFlyBSD

(tkusumi)

2019-12-03 14:41:00 UTC MAIN commitmail json YAML

Use groff -Tencoding argument to emit <meta charset="..."/>

(uwe)

2019-12-03 14:38:49 UTC MAIN commitmail json YAML

Calulate the right lenght for isoc transfer and the usb_syncmem

PR/54696: Kernel panic in bus_dma.c on Raspberry Pi 3B/3B+

(skrll)

2019-12-03 14:35:50 UTC MAIN commitmail json YAML

Use size_t for loop count variable

(skrll)

2019-12-03 13:48:25 UTC MAIN commitmail json YAML

Adapt to use the new atomic_* operations.  As discussed with
riastradh@ in private Email.

(pgoyette)

2019-12-03 13:42:55 UTC MAIN commitmail json YAML

Add xsrc to the invocation example.

(uwe)

2019-12-03 13:41:56 UTC MAIN commitmail json YAML

Drop the final quote if followed by dot.

(uwe)

2019-12-03 13:37:50 UTC MAIN commitmail json YAML

Need <sys/sysctl.h> for previous

(skrll)

2019-12-03 13:30:52 UTC MAIN commitmail json YAML

Stopgap hack to unbreak the build: #ifdef __HAVE_ATOMIC64_LOADSTORE
the event counter update. From rmind@

(martin)

2019-12-03 12:42:21 UTC MAIN commitmail json YAML

2019-12-03 12:39:00 UTC MAIN commitmail json YAML

tlb_exception: in slow path, check for usermode before calling userret().

(ad)

2019-12-03 11:50:45 UTC MAIN commitmail json YAML

Make sure the assignment to "idepth" is done inside the loop to prevent
preemption between loop end and dereference of "l_cpu->ci_depth".

(hannken)

2019-12-03 11:50:16 UTC MAIN commitmail json YAML

Make cpu_intr_p() work with "curlwp->l_cpu == NULL" and
assert "curlwp == &lwp0" in this case.

Prevents crash during early boot with "options LOCKDEBUG".

(hannken)

2019-12-03 11:26:13 UTC MAIN commitmail json YAML

streamline receive filter logic, work-in-progress.

(nisimura)

2019-12-03 11:25:44 UTC MAIN commitmail json YAML

Make dwc2debug sysctl'able

(skrll)

2019-12-03 11:25:20 UTC MAIN commitmail json YAML

Apply a fix from upstream:
  https://github.com/NLnetLabs/unbound/pull/122
This should enable proper functioning of tcp-idle-timeout.

(he)

2019-12-03 11:22:06 UTC MAIN commitmail json YAML

2019-12-03 10:54:39 UTC MAIN commitmail json YAML

src/contrib.txt deleted

Remove accidentally committed output from extract-contrib-string.pl
I will have a stern talk with my emacs about this incident.

(uwe)

2019-12-03 10:51:46 UTC MAIN commitmail json YAML

Fix the enry for Computer Systems Laboratory at the University of Utah
and move it to its proper place in the sorting order.

(uwe)

2019-12-03 10:46:41 UTC MAIN commitmail json YAML

Move the entry for CMU Computing Services to its proper place in the
sorting order.  Add more ad clauses from CMU ppp code.

(uwe)

2019-12-03 10:40:51 UTC MAIN commitmail json YAML

Move the entry for CMU Computing Services to its proper place in the
sorting order.

(uwe)

2019-12-03 10:32:53 UTC MAIN commitmail json YAML

Remove FDT_INTR_MPSAFE flag.

(hkenken)

2019-12-03 09:56:21 UTC MAIN commitmail json YAML

Recognize ad clause in CMU PPP and some OpenSSL code.

Use "n" (grouping doesn't capture) when matching $ack* regexps to
alleviate performance hit a bit.

(uwe)

2019-12-03 05:07:49 UTC MAIN commitmail json YAML

Rip out pserialize(9) logic now that the RCU patent has expired.

pserialize_perform() is now basically just xc_barrier(XC_HIGHPRI).
No more tentacles throughout the scheduler.  Simplify the psz read
count for diagnostic assertions by putting it unconditionally into
cpu_info.

From rmind@, tidied up by me.

(riastradh)

2019-12-03 05:01:58 UTC MAIN commitmail json YAML

Fix inequality for refcnt drain: -1 here means all refs gone.

(riastradh)

2019-12-03 05:01:45 UTC MAIN commitmail json YAML

Fix order of nulling un->un_pri->unp_ec.ec_mii.

Can't null it until after if_detach prevents further use.

While here, fix conditionals in usbnet_tick_task to use the unp_dying
flag, not the nullness of mii (or of ifp, which never null because
it's an embedded member).

(riastradh)

2019-12-03 04:59:05 UTC MAIN commitmail json YAML

Omit obsolete comment and needless __diagused marker.

(riastradh)

2019-12-03 04:57:38 UTC MAIN commitmail json YAML

Fix brain fart in alignment criterion.

(riastradh)

2019-12-03 04:57:25 UTC MAIN commitmail json YAML

Skip fences in bus_space_barrier on I/O space.

I/O operations are issued in program order.  Not that I/O operations
are usually a performance bottleneck anyway, but maybe it is slightly
cheaper to avoid stalling on store buffers or pending loads, and
there's very little cost to the skipping criterion here.

(riastradh)

2019-12-03 04:20:45 UTC MAIN commitmail json YAML

2019-12-03 03:25:29 UTC MAIN commitmail json YAML

2019-12-03 02:10:26 UTC MAIN commitmail json YAML

Special-case badly worded ad clause in src/sys/lib/libkern/rngtest.c

(uwe)

2019-12-03 01:56:10 UTC MAIN commitmail json YAML

This product includes software developed by Ravikanth.

(uwe)

2019-12-03 01:52:04 UTC MAIN commitmail json YAML

Fix typo in regexp to detect m4 comments.

(uwe)

2019-12-03 01:45:34 UTC MAIN commitmail json YAML

2019-12-03 01:43:12 UTC MAIN commitmail json YAML

Swap Per Fogelstrom entries.  Missed in previous.

(uwe)

2019-12-03 01:24:45 UTC MAIN commitmail json YAML

Detect more ad clauses, pick more duplicates.

If there are notices that differ in the final dot, prefer the version
with the dot.  Sort "by the" enries after all other "by Name" entries.
With the corresponding re-ordering of the legal.common the output of
this script is getting useful again.

(uwe)

2019-12-03 01:19:33 UTC MAIN commitmail json YAML

Sort entries "by Foo." before "by Foo and" etc.  Sort the section with
"for the NetBSD" notices that had a lot of entries out of order.  Drop
final dots that are not in any of the required notices to reduce diff
with the script output.

(uwe)

2019-12-03 00:23:25 UTC MAIN commitmail json YAML

Move entries with short first line that ends with "by" to their proper
places in the sorting order.

(uwe)

2019-12-02 23:30:32 UTC MAIN commitmail json YAML

Restore entries for "K. Kobayashi" and "K. Kobayashi and H. Shimokawa".
The script missed them as it was confused by the slighly non-standard
license wording.  My apologies.

(uwe)

2019-12-02 23:27:53 UTC MAIN commitmail json YAML

Restore the entry for Yasushi Yamasaki - it comes from xsrc,
my apologies.

(uwe)

2019-12-02 23:22:44 UTC MAIN commitmail json YAML

Take the basic CPU topology information we already collect, and use it
to make circular lists of CPU siblings in the same core, and in the
same package.  Nothing fancy, just enough to have a bit of fun in the
scheduler trying out different tactics.

(ad)

2019-12-02 22:14:21 UTC MAIN commitmail json YAML

Drop the entry for "University of California, Berkeley and its
contributors, as well as the Trustees of Columbia University" that was
required by the ad clause in external/bsd/am-utils/dist/COPYING.
The ad clause was dropped in the versions we have since netbsd-8.

(uwe)

2019-12-02 21:54:33 UTC MAIN commitmail json YAML

Don't use an undefined variable.

(uwe)

2019-12-02 21:24:50 UTC MAIN commitmail json YAML

Fix s/product/model/ search-and-destroy accident that affected license.

Back in 1998 thorpej@ adapted this from one of the several versions we
have in the tree but needed s/product/model/ in the text of the
script.  Unfortunately that also affected the license text: "This
model includes software..." and "...or promote models".

(uwe)

2019-12-02 20:59:56 UTC MAIN commitmail json YAML

2019-12-02 20:57:17 UTC MAIN commitmail json YAML

Drop the entry for Yasushi Yamasaki.  Nothing in the tree requires it.

(uwe)

2019-12-02 20:49:25 UTC MAIN commitmail json YAML

Move the entry for Kyma Systems to its proper place in the sorting order.

(uwe)

2019-12-02 20:18:45 UTC MAIN commitmail json YAML

Drop the entry for David Muir Sharnoff.  It was for expn(1) script in
am-utils that was never installed and is no longer there since netbsd-8.

(uwe)

2019-12-02 20:03:33 UTC MAIN commitmail json YAML

Drop the entry for Thomas Gerner.

thomas@ dropped clauses 3 and 4 from his license back in 2009 and the
entry was dropped from here, but a copy was forgotten in the atari
port-specific legal file and merged back here in 2015.

(uwe)

2019-12-02 20:02:02 UTC MAIN commitmail json YAML

fix the build for when UVMHIST is enabled.

(chs)

2019-12-02 19:49:12 UTC MAIN commitmail json YAML

Fix a hard hang with Xen MP.

(ad)

2019-12-02 19:48:48 UTC MAIN commitmail json YAML

Drop the entry for Texas A&M University.
Nothing in the tree has its ad clause.

(uwe)

2019-12-02 19:40:19 UTC MAIN commitmail json YAML

2019-12-02 19:35:00 UTC MAIN commitmail json YAML

Move the entry for Matthew Fredette to its proper place in the sorting order.

(uwe)

2019-12-02 19:24:32 UTC MAIN commitmail json YAML

drop my name from the advertising clause.

(christos)

2019-12-02 19:23:53 UTC MAIN commitmail json YAML

drop my name from the advertising clause.

(christos)

2019-12-02 19:17:27 UTC MAIN commitmail json YAML

Define PT_GETXMMREGS and PT_SETXMMREGS in PT_MACHDEP_STRINGS/amd64

(kamil)

2019-12-02 18:35:07 UTC MAIN commitmail json YAML

2019-12-02 17:28:36 UTC MAIN commitmail json YAML

Drop entries for "K. Kobayashi" and "K. Kobayashi and H. Shimokawa"
that are no longer referenced in tree.

(uwe)

2019-12-02 17:23:24 UTC MAIN commitmail json YAML

Add entry for Cisco for the SCTP code.

(uwe)

2019-12-02 17:17:09 UTC MAIN commitmail json YAML

2019-12-02 17:13:13 UTC MAIN commitmail json YAML

Leave it entirely up to the driver whether to map prefetchable.

We have only a few drivers that pass BUS_SPACE_MAP_PREFETCHABLE to
pci_mapreg_map -- dev/pci/if_hme_pci.c, dev/pci/igma.c,
dev/pci/radeonfb.c, dev/pci/wcfb.c -- and they all do it for ROM or
framebuffers.

Based on a subthread from macallan@ in the earlier discussion:

https://mail-index.NetBSD.org/tech-kern/2017/03/23/msg021685.html

The thrust is that:
- a driver not asking for prefetchable mappings shouldn't get it
- some devices are correctly used with prefetchable mappings, but for
  some reason fail to set the prefetchable bit in the BAR
- nobody could identify any classes of device for which
  (a) the driver asks for prefetchable mappings, but
  (b) certain matching devices can't actually be used with
      prefetchable mappings

This brings pci_mapreg_map in line with what the documentation says;
the documentation never advertised that the prefetchable bit in the
BAR could cause the bus_space mapping to be prefetchable.

(riastradh)

2019-12-02 16:59:28 UTC MAIN commitmail json YAML

Fix ISO-646-SE spelling of Lule\[oa].

(uwe)

2019-12-02 16:43:06 UTC MAIN commitmail json YAML

Collapse multiple spaces in an entry (doesn't affect sorting).

(uwe)

2019-12-02 16:41:35 UTC MAIN commitmail json YAML

Move the entry for Mika Kortelainen to its proper place in the sorting
order after fixing multiple spaces.

(uwe)

2019-12-02 16:38:37 UTC MAIN commitmail json YAML

Collapse multiple spaces between words.
There are a few entries with "by__Name" that affects sorting.

(uwe)

2019-12-02 16:35:18 UTC MAIN commitmail json YAML

Move Intel's entry to its proper place in the sorting order.

(uwe)

2019-12-02 16:10:34 UTC MAIN commitmail json YAML

dm: Remove misleading comment on linear target arg

The offset arg is mandatory.
Remove code and comment that makes it sounds like it's optional.

taken-from: DragonFlyBSD

(tkusumi)

2019-12-02 15:17:43 UTC MAIN commitmail json YAML

dm: Add a comment on race window on unload

There is a minor race window on unload vs device creation
that can cause panic.
https://github.com/DragonFlyBSD/DragonFlyBSD/commit/53a07f3ae7313aa58948a60f46428bfc2254dc3c

taken-from: DragonFlyBSD

(tkusumi)

2019-12-02 15:08:52 UTC netbsd-9 commitmail json YAML

2019-12-02 15:03:51 UTC netbsd-9 commitmail json YAML

2019-12-02 15:02:53 UTC netbsd-9 commitmail json YAML

Add dedication to Eric Schnoebelen.

(martin)

2019-12-02 14:15:22 UTC MAIN commitmail json YAML

postfix-3.4.8 out.

(wiz)

2019-12-02 08:33:52 UTC MAIN commitmail json YAML

Use LFENCE/SFENCE/MFENCE in x86 bus_space_barrier.

These are needed for BUS_SPACE_MAP_PREFETCHABLE mappings.  On x86,
these are WC-type memory regions, which means -- unlike normal
WB-type memory regions -- loads can be reordered with loads,
requiring LFENCE, and stores can be reordered with stores, requiring
SFENCE.

Reference: AMD64 Architecture Programmer's Manual, Volume 2: System
Programming, Sec. 7.4.1 `Memory Barrier Interaction with Memory
Types', Table 7-3 `Memory Access Ordering Rules'.

(riastradh)

2019-12-02 08:33:42 UTC MAIN commitmail json YAML

Use BUS_SPACE_MAP_PREFETCHABLE only if BAR and driver agree on it.

- A driver that expects prefetchable memory and knows to issue the
  needed bus_space_barrier calls can pass BUS_SPACE_MAP_PREFETCHABLE
  to indicate a desire to map the memory prefetchable if the BAR
  allows it.

  (A driver that _really wants_ BUS_SPACE_MAP_PREFETCHABLE even if
  the BAR claims _not_ to be prefetchable can use pci_mapreg_info and
  bus_space_map explicitly -- this is not different from what we have
  today.)

- For a driver that _does not_ expect prefetchable memory, the
  appearance of the prefetchable bit in the BAR shouldn't cause it to
  use BUS_SPACE_MAP_PREFETCHABLE, because the driver will not issue
  the needed bus_space_barrier calls to get sensible results.

Note: `Prefetchable' here, sometimes called `write-combining', means
reads have no side effects, and writes are idempotent, so it is safe
to issue reads out of order and safe to combine writes.

Mappings with BUS_SPACE_MAP_PREFETCHABLE are often more weakly
ordered than normal memory -- e.g., on x86, in WC-type memory
regions, loads can be reordered with loads, stores can be reordered
with stores, which is not possible with any other type of memory
regions.

Discussed on tech-kern a while ago:

https://mail-index.NetBSD.org/tech-kern/2017/03/22/msg021678.html

This is option A, which received the most support.  This should help
unconfuse drivers that do not expect prefetchable mappings, like
Yamaguchi-san tripped over recently:

https://mail-index.NetBSD.org/tech-kern/2019/12/02/msg025785.html

(riastradh)

2019-12-02 03:06:52 UTC MAIN commitmail json YAML

Use PCI_MSIX_"TBL"BIR_MASK instead of PCI_MSIX_"PBA"BIR_MASK for MSI-X table.
This is not a real bug because both macros have the same value.

(msaitoh)

2019-12-02 01:38:54 UTC MAIN commitmail json YAML

Add cfi annotations so that gdb can unwind the stack through signal handlers.

(christos)

2019-12-02 01:01:08 UTC MAIN commitmail json YAML

2019-12-01 23:53:49 UTC MAIN commitmail json YAML

2019-12-01 23:14:47 UTC MAIN commitmail json YAML

2019-12-01 23:08:09 UTC MAIN commitmail json YAML

2019-12-01 21:02:09 UTC MAIN commitmail json YAML

Don't deregister twice with pmf.

(mlelstv)

2019-12-01 21:01:19 UTC MAIN commitmail json YAML

Reset MCU ready status before resetting the MCU.
Fixes PR kern/54728

(mlelstv)

2019-12-01 21:00:43 UTC MAIN commitmail json YAML

Attempt to load the zfs module even if /etc/zfs/zpool.cache is absent. The
module needs to be loaded to create a pool in the first place, and
autoloading won't work after the fact won't work at securelevel=1.

(jmcneill)

2019-12-01 20:56:40 UTC MAIN commitmail json YAML

Restore xcall(9) fast path using atomic_load/store_*.

While here, fix a bug that was formerly in xcall(9): a missing
acquire operation in the xc_wait fast path so that all memory
operations in the xcall on remote CPUs will happen before any memory
operations on the issuing CPU after xc_wait returns.

All stores of xc->xc_donep are done with atomic_store_release so that
we can safely use atomic_load_acquire to read it outside the lock.
However, this fast path only works on platforms with cheap 64-bit
atomic load/store, so conditionalize it on __HAVE_ATOMIC64_LOADSTORE.
(Under the lock, no need for atomic loads since nobody else will be
issuing stores.)

For review, here's the relevant diff from the old version of the fast
path, from before it was removed and some other things changed in the
file:

diff --git a/sys/kern/subr_xcall.c b/sys/kern/subr_xcall.c
index 45a877aa90e0..b6bfb6455291 100644
--- a/sys/kern/subr_xcall.c
+++ b/sys/kern/subr_xcall.c
@@ -84,6 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.27 2019/10/06 15:11:17 uwe Exp $");
#include <sys/evcnt.h>
#include <sys/kthread.h>
#include <sys/cpu.h>
+#include <sys/atomic.h>

#ifdef _RUMPKERNEL
#include "rump_private.h"
@@ -334,10 +353,12 @@ xc_wait(uint64_t where)
xc = &xc_low_pri;
}

+#ifdef __HAVE_ATOMIC64_LOADSTORE
/* Fast path, if already done. */
- if (xc->xc_donep >= where) {
+ if (atomic_load_acquire(&xc->xc_donep) >= where) {
return;
}
+#endif

/* Slow path: block until awoken. */
mutex_enter(&xc->xc_lock);
@@ -422,7 +443,11 @@ xc_thread(void *cookie)
(*func)(arg1, arg2);

mutex_enter(&xc->xc_lock);
+#ifdef __HAVE_ATOMIC64_LOADSTORE
+ atomic_store_release(&xc->xc_donep, xc->xc_donep + 1);
+#else
xc->xc_donep++;
+#endif
}
/* NOTREACHED */
}
@@ -462,7 +487,6 @@ xc__highpri_intr(void *dummy)
* Lock-less fetch of function and its arguments.
* Safe since it cannot change at this point.
*/
- KASSERT(xc->xc_donep < xc->xc_headp);
func = xc->xc_func;
arg1 = xc->xc_arg1;
arg2 = xc->xc_arg2;
@@ -475,7 +499,13 @@ xc__highpri_intr(void *dummy)
* cross-call has been processed - notify waiters, if any.
*/
mutex_enter(&xc->xc_lock);
- if (++xc->xc_donep == xc->xc_headp) {
+ KASSERT(xc->xc_donep < xc->xc_headp);
+#ifdef __HAVE_ATOMIC64_LOADSTORE
+ atomic_store_release(&xc->xc_donep, xc->xc_donep + 1);
+#else
+ xc->xc_donep++;
+#endif
+ if (xc->xc_donep == xc->xc_headp) {
cv_broadcast(&xc->xc_busy);
}
mutex_exit(&xc->xc_lock);

(riastradh)

2019-12-01 20:31:40 UTC MAIN commitmail json YAML

Avoid calling pmap_page_protect() while under uvm_pageqlock.

(ad)

2019-12-01 20:28:25 UTC MAIN commitmail json YAML

Enable ZFS support on aarch64

(jmcneill)

2019-12-01 20:27:26 UTC MAIN commitmail json YAML

Flush insn / data caches after loading modules

(jmcneill)

2019-12-01 20:26:31 UTC MAIN commitmail json YAML

2019-12-01 20:26:05 UTC MAIN commitmail json YAML

Provide a default ptob() implementation

(jmcneill)

2019-12-01 20:25:31 UTC MAIN commitmail json YAML

Initialize b_dev before passing buf to d_minphys (ldminphys needs this)

(jmcneill)

2019-12-01 20:24:47 UTC MAIN commitmail json YAML

Build aarch64 modules without fp or simd instructions.

(jmcneill)

2019-12-01 20:21:21 UTC MAIN commitmail json YAML

From 02c3dad0f3b4d26e0faa5cc51d06bc50d693dcdc Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Wed, 9 Oct 2019 12:05:16 -0600
Subject: [PATCH] Call shmget() with permission 0600 instead of 0777

A security advisory (TALOS-2019-0857/CVE-2019-5068) found that
creating shared memory regions with permission mode 0777 could allow
any user to access that memory.  Several Mesa drivers use shared-
memory XImages to implement back buffers for improved performance.

This path changes the shmget() calls to use 0600 (user r/w).

Tested with legacy Xlib driver and llvmpipe.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>

(maya)

2019-12-01 19:21:13 UTC MAIN commitmail json YAML

Another instance of cpu_onproc to replace.

(ad)

2019-12-01 18:32:07 UTC MAIN commitmail json YAML

2019-12-01 18:31:19 UTC MAIN commitmail json YAML

Back out previous temporarily - seeing unusual lookup failures.  Will
come back to it.

(ad)

2019-12-01 18:29:26 UTC MAIN commitmail json YAML

2019-12-01 18:12:51 UTC MAIN commitmail json YAML

2019-12-01 17:41:11 UTC MAIN commitmail json YAML

Switch in_interrupt() in KCOV to cpu_intr_p()

This makes KCOV more MI friendly and removes x86-specific in_interrupt()
implementation.

(kamil)

2019-12-01 17:25:47 UTC MAIN commitmail json YAML

Disable KCOV instrumentation in x86_machdep.c

This allows to use cpu_intr_p() directly inside KCOV.

(kamil)

2019-12-01 17:08:31 UTC MAIN commitmail json YAML

Init kern_runq and kern_synch before booting secondary CPUs.

(ad)

2019-12-01 17:06:00 UTC MAIN commitmail json YAML

Back out the fastpath change in xc_wait().  It's going to be done differently.

(ad)

2019-12-01 17:02:50 UTC MAIN commitmail json YAML

Free pages in batch instead of taking uvm_pageqlock for each one.

(ad)

2019-12-01 16:44:11 UTC MAIN commitmail json YAML

__cacheline_aligned on a lock.

(ad)

2019-12-01 16:36:26 UTC MAIN commitmail json YAML

NetBSD 9.99.19 - many kernel data structure changes

(ad)

2019-12-01 16:33:33 UTC MAIN commitmail json YAML

dm: Fix race on pdev create

List lookup and insert need to be atomic.
https://github.com/DragonFlyBSD/DragonFlyBSD/commit/ac816675c8321309b49d6a335f95c5388036803f

take-from: DragonFlyBSD

(tkusumi)

2019-12-01 16:32:02 UTC MAIN commitmail json YAML

Make the fast path in xc_wait() depend on _LP64 for now.  Needs 64-bit
load/store.  To be revisited.

(ad)

2019-12-01 16:22:10 UTC MAIN commitmail json YAML

Mark unreachable branch with __unreachable() to fix i386/ALL build.

(riastradh)

2019-12-01 15:34:47 UTC MAIN commitmail json YAML

Fix false sharing problems with cpu_info.  Identified with tprof(8).
This was a very nice win in my tests on a 48 CPU box.

- Reorganise cpu_data slightly according to usage.
- Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc).
- On x86, put some items in their own cache lines according to usage, like
  the IPI bitmask and ci_want_resched.

(ad)

2019-12-01 15:28:20 UTC MAIN commitmail json YAML

Adapt <sys/pslist.h> to use atomic_load/store_*.

Changes:

- membar_producer();
  *p = v;

    =>

  atomic_store_release(p, v);

  (Effectively like using membar_exit instead of membar_producer,
  which is what we should have been doing all along so that stores by
  the `reader' can't affect earlier loads by the writer, such as
  KASSERT(p->refcnt == 0) in the writer and atomic_inc(&p->refcnt) in
  the reader.)

- p = *pp;
  if (p != NULL) membar_datadep_consumer();

    =>

  p = atomic_load_consume(pp);

  (Only makes a difference on DEC Alpha.  As long as lists generally
  have at least one element, this is not likely to make a big
  difference, and keeps the code simpler and clearer.)

No other functional change intended.  While here, annotate each
synchronizing load and store with its counterpart in a comment.

(riastradh)

2019-12-01 15:28:02 UTC MAIN commitmail json YAML

Rework modified atomic_load/store_* to work on const pointers.

(riastradh)

2019-12-01 15:27:58 UTC MAIN commitmail json YAML

Fix a longstanding problem with LWP limits.  When changing the user's
LWP count, we must use the process credentials because that's what
the accounting entity is tied to.

Reported-by: syzbot+d193266676f635661c62@syzkaller.appspotmail.com

(ad)

2019-12-01 15:07:04 UTC MAIN commitmail json YAML

Remove the pretty much useless 128MB swap partition from the arm images.

(jmcneill)

2019-12-01 14:52:14 UTC MAIN commitmail json YAML

Make cpu_intr_p() safe to use anywhere, i.e. outside assertions:

Don't call kpreempt_disable() / kpreempt_enable() to make sure we're not
preempted while using the value of curcpu().  Instead, observe the value of
l_ncsw before and after the check to see if we have been preempted.  If
we have been preempted, then we need to retry the read.

(ad)

2019-12-01 14:43:26 UTC MAIN commitmail json YAML

Minor correction to previous.

(ad)

2019-12-01 14:40:31 UTC MAIN commitmail json YAML

2019-12-01 14:30:01 UTC MAIN commitmail json YAML

Deactivate pages in batch instead of acquiring uvm_pageqlock repeatedly.

(ad)

2019-12-01 14:28:01 UTC MAIN commitmail json YAML

Give each of the page queue locks their own cache line.

(ad)

2019-12-01 14:24:43 UTC MAIN commitmail json YAML

Activate pages in batch instead of acquring uvm_pageqlock a zillion times.

(ad)

2019-12-01 14:20:00 UTC MAIN commitmail json YAML

If the system is not up and running yet, just run the function locally.

(ad)

2019-12-01 14:18:51 UTC MAIN commitmail json YAML

Map the video RAM cacheable/prefetchable, it's very slow and this helps a bit.

(ad)

2019-12-01 14:04:52 UTC MAIN commitmail json YAML

Update to match change in layout of vnode LRU lists.

(ad)

2019-12-01 13:58:53 UTC MAIN commitmail json YAML

2019-12-01 13:56:29 UTC MAIN commitmail json YAML

Minor vnode locking changes:

- Stop using atomics to maniupulate v_usecount.  It was a mistake to begin
  with.  It doesn't work as intended unless the XLOCK bit is incorporated in
  v_usecount and we don't have that any more.  When I introduced this 10+
  years ago it was to reduce pressure on v_interlock but it doesn't do that,
  it just makes stuff disappear from lockstat output and introduces problems
  elsewhere.  We could do atomic usecounts on vnodes but there has to be a
  well thought out scheme.

- Resurrect LK_UPGRADE/LK_DOWNGRADE which will be needed to work effectively
  when there is increased use of shared locks on vnodes.

- Allocate the vnode lock using rw_obj_alloc() to reduce false sharing of
  struct vnode.

- Put all of the LRU lists into a single cache line, and do not requeue a
  vnode if it's already on the correct list and was requeued recently (less
  than a second ago).

Kernel build before and after:

119.63s real  1453.16s user  2742.57s system
115.29s real  1401.52s user  2690.94s system

(ad)

2019-12-01 13:46:34 UTC MAIN commitmail json YAML

2019-12-01 13:45:42 UTC MAIN commitmail json YAML

Make nc_hittime volatile to defeat compiler cleverness.

(ad)

2019-12-01 13:39:53 UTC MAIN commitmail json YAML

namecache changes:

- Delete the per-entry lock, and borrow the associated vnode's v_interlock
  instead.  We need to acquire it during lookup anyway.  We can revisit this
  in the future but for now it's a stepping stone, and works within the
  quite limited context of what we have (BSD namecache/lookup design).

- Implement an idea that Mateusz Guzik (mjg@FreeBSD.org) gave me.  In
  cache_reclaim(), we don't need to lock out all of the CPUs to garbage
  collect entries.  All we need to do is observe their locks unheld at least
  once: then we know they are not in the critical section, and no longer
  have visibility of the entries about to be garbage collected.

- The above makes it safe for sysctl to take only namecache_lock to get stats,
  and we can remove all the crap dealing with per-CPU locks.

- For lockstat, make namecache_lock a static now we have __cacheline_aligned.

- Avoid false sharing - don't write back to nc_hittime unless it has changed.
  Put a a comment in place explaining this.  Pretty sure this was there in
  2008/2009 but someone removed it (understandably, the code looks weird).

- Use a mutex to protect the garbage collection queue instead of atomics, and
  adjust the low water mark up so that cache_reclaim() isn't doing so much
  work at once.

(ad)

2019-12-01 13:20:42 UTC MAIN commitmail json YAML

PR port-sparc/54718 (sparc install hangs since recent scheduler changes)

- sched_tick: cpu_need_resched is no longer the correct thing to do here.
  All we need to do is OR the request into the local ci_want_resched.

- sched_resched_cpu: we need to set RESCHED_UPREEMPT even on softint LWPs,
  especially in the !__HAVE_FAST_SOFTINTS case, because the LWP with the
  LP_INTR flag could be running via softint_overlay() - i.e. it has been
  temporarily borrowed from a user process, and it needs to notice the
  resched after it has stopped running softints.

(ad)

2019-12-01 12:47:10 UTC MAIN commitmail json YAML

2019-12-01 12:19:28 UTC MAIN commitmail json YAML

sh3: make ASTs work as expected, and fix a few things in the TLB refill path.
With help from uwe@ and martin@.

(ad)

2019-12-01 12:19:16 UTC netbsd-9 commitmail json YAML

Note added dedication

(martin)

2019-12-01 12:17:16 UTC netbsd-9 commitmail json YAML

Add dedication for Matthias Drochner.

(martin)

2019-12-01 10:19:59 UTC MAIN commitmail json YAML

Add missing <sys/atomic.h> include

(martin)

2019-12-01 08:27:54 UTC MAIN commitmail json YAML

2019-12-01 08:23:09 UTC MAIN commitmail json YAML

2019-12-01 08:19:09 UTC MAIN commitmail json YAML

Use atomic_{load,store}_relaxed() on global counters.

(maxv)

2019-12-01 08:16:49 UTC MAIN commitmail json YAML

Use unsigned to avoid undefined behavoir. Found by kUBSan.

(msaitoh)

2019-12-01 08:15:58 UTC MAIN commitmail json YAML

Add KCSAN instrumentation for atomic_{load,store}_*.

(maxv)

2019-12-01 06:53:32 UTC MAIN commitmail json YAML

2019-11-30 23:06:52 UTC MAIN commitmail json YAML

Make owtemp reliable for me:

- Don't do the calculation if there is a CRC error.
- If we get any kind of error during a refresh, retry up to three times.
- Add event counters to report what's going on.

(ad)

2019-11-30 23:04:12 UTC MAIN commitmail json YAML

onewire:

- Re-do the signalling to be a little more forgiving and efficient.
- If bus reset fails during probe, try a second time.
- Spread out kernel threads for many busses to avoid thundering herd effect.

(ad)

2019-11-30 22:50:11 UTC MAIN commitmail json YAML

Fix 'nm /dev/ksyms' (noticed by ryo).

Since binutils 2.15, nm(1) cannot be used for character devices.
We worked around this by a local patch:

http://cvsweb.netbsd.org/bsdweb.cgi/src/gnu/dist/binutils/binutils/Attic/bucomm.c?r1=1.1.1.2&hideattic=0#rev1.2

With recent update of binutils, 'nm /dev/ksyms' got broken again.
This is due to a consistency check involving file size reported by
stat(2), which is always zero for character devices. So, skip this
check if file size is zero.

(rin)

2019-11-30 20:45:49 UTC MAIN commitmail json YAML

VOP_UNLOCK + vrele -> vput

(ad)

2019-11-30 17:49:03 UTC MAIN commitmail json YAML

Avoid false sharing: only update spc_curpriority if value has changed.

(ad)

2019-11-30 17:46:27 UTC MAIN commitmail json YAML

Mark spc_curpriority volatile.

(ad)

2019-11-30 17:45:54 UTC MAIN commitmail json YAML

Mark the context switch counters volatile (because preemption).

(ad)

2019-11-30 16:23:46 UTC MAIN commitmail json YAML

Need <sys/atomic.h> for atomic_inc_64.

Emptying out <machine/rwlock.h> had the side effect of removing an
implied #include <sys/atomic.h>.

(riastradh)

2019-11-30 15:53:36 UTC MAIN commitmail json YAML

Revert previous.  Looks like it requires a more extensive fix.

(ad)

2019-11-30 15:34:07 UTC MAIN commitmail json YAML

Nix vestigial references to MUTEX_GIVE and MUTEX_RECEIVE in comments.

(riastradh)

2019-11-30 14:21:16 UTC MAIN commitmail json YAML

Back out previous.  It works on amd64 under stress test but not
evbarm-aarch64 for some reason.  Will revisit.

(ad)

2019-11-30 13:02:18 UTC MAIN commitmail json YAML

Use SMBIOS system vendor and product strings to create a "model" string
for the root node in the fabricated ACPI device tree, when possible.

(jmcneill)

2019-11-30 12:04:13 UTC MAIN commitmail json YAML

2019-11-30 11:42:55 UTC MAIN commitmail json YAML

Add Grace Hopper and Richard Feynman

(sevan)

2019-11-30 05:35:57 UTC MAIN commitmail json YAML

dm: Always initialize target's status string

Explicitly clear status string to prevent dmsetup(8) from
printing binary junk to stdout. Similar change has been
applied to DragonFlyBSD since 2015.

https://github.com/DragonFlyBSD/DragonFlyBSD/commit/a6cf54187fd7c3e994c573215806ec03572c038e

taken-from: DragonFlyBSD

(tkusumi)

2019-11-30 05:28:28 UTC MAIN commitmail json YAML

Prevent panic when attaching genfb if using a serial console with Hyper-V Gen.2.

(nonaka)

2019-11-30 04:06:23 UTC MAIN commitmail json YAML

Add the new unit-tests for make(1) to the sets list, fixing the build.

(pgoyette)

2019-11-30 03:53:45 UTC MAIN commitmail json YAML

2019-11-30 02:55:47 UTC MAIN commitmail json YAML

Fix unit test for edge case in :M modifier

(rillig)

2019-11-30 02:47:14 UTC MAIN commitmail json YAML

Use .Sy, not .Em, for bold-faced WARNING of impending doom.

Underline and, worse, italic aren't as good at catching the eye.

(riastradh)

2019-11-30 02:38:44 UTC MAIN commitmail json YAML

Document relation to atomic_ops(3) and membar_ops(3).

(riastradh)

2019-11-30 02:35:28 UTC MAIN commitmail json YAML

Ignore temporary files from running the unit tests

(rillig)

2019-11-30 02:31:19 UTC MAIN commitmail json YAML

2019-11-30 02:22:23 UTC MAIN commitmail json YAML

Document xc_barrier.

(riastradh)

2019-11-30 00:38:51 UTC MAIN commitmail json YAML

2019-11-30 00:28:27 UTC MAIN commitmail json YAML

Improve table of contents.

For .txt and .more drop meaningless page numbers, those formats are
not paginated (with all due respect to line printers, 80s are over).

For .ps use actual formatting with proportional font and properly
aligned page numbers.  Thanks to kre@ for his help with some of the
darker corners of troff (with all due respect to my 80s self, he/I
should have paid more attention).

(uwe)

2019-11-30 00:02:15 UTC MAIN commitmail json YAML

Missed another spot.

Marked mb.9 obsolete but forgot to mark mb_memory.9 &c. too.

(riastradh)

2019-11-29 22:55:34 UTC MAIN commitmail json YAML

2019-11-29 22:38:28 UTC MAIN commitmail json YAML

Missed a spot: delete mb.9 from MLINKS too.

(riastradh)

2019-11-29 22:17:24 UTC MAIN commitmail json YAML

New atomic load/store operations for the kernel.

Guarantee no fusing and no tearing, and can optionally impose
ordering relative to other memory operations.

Unordered:
- atomic_load_relaxed
- atomic_store_relaxed

Ordered:
- atomic_load_acquire
- atomic_load_consume
- atomic_store_release

These are intended to match C11 semantics, and can be defined in
terms of the C11 atomic API when ready.

(riastradh)

2019-11-29 20:54:17 UTC MAIN commitmail json YAML

2019-11-29 20:54:00 UTC MAIN commitmail json YAML

2019-11-29 20:50:54 UTC MAIN commitmail json YAML

A couple more tweaks to avoid reading the lock word.

(ad)

2019-11-29 20:31:35 UTC MAIN commitmail json YAML