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 (178d) 

2024-05-10 05:00:30 UTC Now

2018-06-24 12:05:41 UTC MAIN commitmail json YAML

Prevent signed integer left shift UB in FD_SET(), FD_CLR(), FD_ISSET()

Set the type of shifted integer 1 to unsigned int.

Detected with MKSANITIZER/UBSan in sysinst(8).

(kamil)

2018-06-24 11:51:15 UTC MAIN commitmail json YAML

provide pci_intr_establish_xname() on x86 independantly from MSI,
so it's available on XEN too; change also the stub to use weak
symbol instead #ifdef

(jdolecek)

2018-06-24 09:51:46 UTC netbsd-8 commitmail json YAML

2018-06-24 09:38:49 UTC MAIN commitmail json YAML

2018-06-24 09:36:12 UTC netbsd-8 commitmail json YAML

2018-06-24 09:34:33 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kamil in ticket #899):

lib/libutil/passwd.c: revision 1.53

Prevent underflow buffer read in trim_whitespace() in libutil/passwd.c

If a string is empty or contains only white characters, the algorithm of
removal of white characters at the end of the passed string will read
buffer at index -1 and keep iterating backward.

Detected with MKSANITIZER/ASan when executing passwd(1).

(martin)

2018-06-24 09:32:03 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kamil in ticket #898):

usr.sbin/installboot/arch/i386.c: revision 1.41

Fix integer overflow in installboot(8)
Add a sanity check of the disk_buf first three bytes. The original code on
a disk with nul bytes was causing integer overflow and thus calling the
memcmp(3) functin in is_zero() with enormous length.
Verity that the 0th byte is JMP, 1th a signed byte >= 9 to prevent overflow
and 2th byte NOP.

Add a comment explaining the check.

Detected with MKSANITIZER and ASan.

(martin)

2018-06-24 09:30:26 UTC MAIN commitmail json YAML

Fix stack use after scope in libutil/pty

The pt variable's elements are used after the end of the pt scope.
A move of pt to outer scope fixes this.

Detected with MKSANITIZER/ASan with tmux(1), a forkpty(3) user.

(kamil)

2018-06-24 09:24:34 UTC netbsd-8 commitmail json YAML

Install note changes

(martin)

2018-06-24 09:23:51 UTC netbsd-8 commitmail json YAML

Pull up the following changes with minor adjustement:

distrib/notes/acorn26/contents (same as acorn32 1.3)
distrib/notes/acorn32/contents 1.3
distrib/notes/alpha/contents 1.17
distrib/notes/amd64/contents 1.6
distrib/notes/amiga/contents 1.21
distrib/notes/arc/contents 1.3
distrib/notes/atari/contents 1.21
distrib/notes/bebox/contents 1.3
distrib/notes/cats/contents 1.3
distrib/notes/common/contents 1.173
distrib/notes/common/xfer 1.75
distrib/notes/emips/contents 1.3
distrib/notes/evbarm/contents 1.3
distrib/notes/evbppc/contents 1.4
distrib/notes/ews4800mips/contents 1.3
distrib/notes/hp300/contents 1.18
distrib/notes/hpcarm/contents 1.4
distrib/notes/hpcmips/contents 1.11
distrib/notes/hpcsh/contents 1.4
distrib/notes/hppa/contents 1.3
distrib/notes/i386/contents 1.30
distrib/notes/landisk/contents 1.4
distrib/notes/mac68k/contents 1.21
distrib/notes/macppc/contents 1.13
distrib/notes/mmeye/contents 1.4
distrib/notes/mvme68k/contents 1.14
distrib/notes/news68k/contents 1.7
distrib/notes/newsmips/contents 1.3
distrib/notes/next68k/contents 1.8
distrib/notes/ofppc/contents 1.4
distrib/notes/pmax/contents 1.18
distrib/notes/prep/contents 1.3
distrib/notes/rs6000/contents 1.3
distrib/notes/sandpoint/contents 1.3
distrib/notes/sgimips/contents 1.3
distrib/notes/shark/contents 1.3
distrib/notes/sparc/contents 1.22
distrib/notes/sparc64/contents 1.6
distrib/notes/sun2/contents 1.3
distrib/notes/sun3/contents 1.17
distrib/notes/vax/contents 1.12
distrib/notes/x68k/contents 1.18

Document debug sets and kernel module directory.

(martin)

2018-06-24 09:18:01 UTC MAIN commitmail json YAML

2018-06-24 09:11:28 UTC netbsd-8 commitmail json YAML

Add temporary hint at manual installation instructions for UEFI setups.

(martin)

2018-06-24 01:53:14 UTC MAIN commitmail json YAML

Prevent underflow buffer read in trim_whitespace() in libutil/passwd.c

If a string is empty or contains only white characters, the algorithm of
removal of white characters at the end of the passed string will read
buffer at index -1 and keep iterating backward.

Detected with MKSANITIZER/ASan when executing passwd(1).

(kamil)

2018-06-23 22:35:29 UTC MAIN commitmail json YAML

Enlarge the set_status[] array by a single element

In the get_and_unpack_sets() function there is accessed the
set_status[SET_GROUP_END] element in the array. The array is allocated on
the stack with SET_GROUP_END elements. This means that it is 1 element too
short.

This has been reported with MKSANITIZER=yes with Address Sanitizer.

(kamil)

2018-06-23 20:15:23 UTC MAIN commitmail json YAML

Specify -Wno-format-extra-args for Clang/LLVM in gpl2/gettext

This is needed with Clang v. 7svn (HEAD) 2018-06-23 snapshot.

(kamil)

2018-06-23 19:40:59 UTC MAIN commitmail json YAML

Add MDC, MDI, MDI-X, MDIO

(sevan)

2018-06-23 17:46:00 UTC MAIN commitmail json YAML

remove core list, portmaster list, releng list, and developer list.

...as proposed several times in several places back in 2009/2010.

this info can all be found on the website (where it's more accurate) and
has no place in a document describing the installation of netbsd.

(snj)

2018-06-23 16:09:53 UTC MAIN commitmail json YAML

Disable all contemporary mode 1 quirks.

(jakllsch)

2018-06-23 16:05:05 UTC MAIN commitmail json YAML

If mode 1 enable check fails, give mode 1 a second chance by trying to
use it to locate a PCI Host Bridge or device from vendor that produced
a chipset lacking a Host Bridge class device.

Should allow us to remove most all the mode 1 quirks added in the last
two decades.

(jakllsch)

2018-06-23 15:53:14 UTC MAIN commitmail json YAML

2018-06-23 15:00:22 UTC MAIN commitmail json YAML

The s in AST is system.
Add RC and common use of IPL, previous entry was from the world of s/360

(sevan)

2018-06-23 14:22:30 UTC MAIN commitmail json YAML

add a kobj_error() to a recently added error case

(jakllsch)

2018-06-23 14:15:57 UTC MAIN commitmail json YAML

Fix integer overflow in installboot(8)

Add a sanity check of the disk_buf first three bytes. The original code on
a disk with nul bytes was causing integer overflow and thus calling the
memcmp(3) functin in is_zero() with enormous length.

Verity that the 0th byte is JMP, 1th a signed byte >=9 to prevent overflow
and 2th byte NOP.

Add a comment explaining the check.

Detected with MKSANITIZER and ASan.

(kamil)

2018-06-23 14:14:43 UTC MAIN commitmail json YAML

2018-06-23 12:14:46 UTC netbsd-8 commitmail json YAML

Fix current version of tzcode for ticket #809.

(martin)

2018-06-23 11:54:06 UTC MAIN commitmail json YAML

remove the xen XSAVE entry, needs more work before it can be enabled

(jdolecek)

2018-06-23 11:41:11 UTC netbsd-8 commitmail json YAML

2018-06-23 11:39:02 UTC netbsd-8 commitmail json YAML

Pull up the following, via patch, requested by maxv in ticket #897:

sys/arch/amd64/amd64/locore.S          1.166 (patch)
sys/arch/i386/i386/locore.S            1.157 (patch)
sys/arch/x86/include/cpu.h              1.92 (patch)
sys/arch/x86/include/fpu.h              1.9 (patch)
sys/arch/x86/x86/fpu.c                  1.33-1.39 (patch)
sys/arch/x86/x86/identcpu.c            1.72 (patch)
sys/arch/x86/x86/vm_machdep.c          1.34 (patch)
sys/arch/x86/x86/x86_machdep.c          1.116,1.117 (patch)

Support eager fpu switch, to work around INTEL-SA-00145.
Provide a sysctl machdep.fpu_eager, which gets automatically
initialized to 1 on affected CPUs.

(martin)

2018-06-23 11:14:23 UTC netbsd-8 commitmail json YAML

Note import of dhcpcd-7.0.6.

(martin)

2018-06-23 11:13:33 UTC netbsd-8 commitmail json YAML

Pull up the following, requested by roy in ticket #896:

external/bsd/dhcpcd/dist/src/common.c          up to 1.1.1.5
external/bsd/dhcpcd/dist/src/defs.h            up to 1.1.1.14
external/bsd/dhcpcd/dist/src/dhcpcd.8.in        up to 1.1.1.10
external/bsd/dhcpcd/dist/src/dhcpcd.c          up to 1.13
external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in  up to 1.1.1.10
external/bsd/dhcpcd/dist/src/duid.c            up to 1.1.1.3

Import dhcpcd 7.0.6.

(martin)

2018-06-23 11:11:00 UTC MAIN commitmail json YAML

fix intrctl_io_firstline() to properly return NULL if there are no records
to show

(jdolecek)

2018-06-23 11:09:24 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kamil in ticket #895):

usr.sbin/sysinst/util.c: revision 1.9

Fix invalid free(3) in sysinst(8)

The path variable is assigned with an allocation on the heap with
strdup(3). Later this pointer is changed with strsep(3) and this caused
invalid free(3).

Store the original pointer in a new helper variable opath and pass it to
free(3). With this change, the problem is going away.

Detected with MKSANITIZER=yes with AddressSanitizer.

(martin)

2018-06-23 11:05:21 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by pgoyette in ticket #894):

sys/dev/ata/ata_raid.c: revision 1.40

Call config_cfattach_attach() regardless of whether the module is
being built as part of a kernel or as a external module.

Addresses kern/53389 - thanks for the report!

XXX pullup-8

(martin)

2018-06-23 11:03:27 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #893):

sys/netinet6/icmp6.c: revision 1.228,1.230

Remove the RH0 code from ICMPv6. RH0 is deprecated by RFC5095 (2007) for
security reasons. We already removed it in Route6.

In addition there was an mbuf bug here: calling IP6_EXTHDR_GET twice with
the same offset, but still using the pointer from the first call, which
could have been made invalid. By luck, m_pulldown leaves zero-sized mbufs
in place, instead of freeing them.

And in general, using a 'finaldst' pointer on the mbuf, and then modifying
that mbuf with IP6_EXTHDR_GET with a smaller offset, was really error-
prone.

Fix 'icmp6len', it shouldn't be ip6_plen, because we may not be at the
beginning of the packet (off+ip6_plen is beyond the end of the mbuf). By
luck, the IP6_EXTHDR_GET that follows will fail and prevent buffer
overflows in non-jumbogram packets.

For jumbograms we will probably be in trouble here; but it doesn't seem
possible to craft reliably a jumbogram for a non-jumbogram-enabled device.

So I don't think it's a huge problem.

(martin)

2018-06-23 11:01:14 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #892):

lib/libc/sys/sched.c: revision 1.5

PR/52826: Onno van der Linden: Return PRI_NONE for sched_get_priority_m{in,ax}
and SCHED_OTHER.

(martin)

2018-06-23 10:52:31 UTC netbsd-8 commitmail json YAML

2018-06-23 10:44:47 UTC netbsd-7 commitmail json YAML

2018-06-23 10:43:57 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #1617):

external/gpl3/gcc/dist/libstdc++-v3/include/std/complex: revision 1.2

PR/50646: Use the c99 cabs math builtins directly, because cabs and cabsf
have broken ABI's can cabsl does not exist. The correct(?) probably fix is
to change the cabs builtins to point to the c99 variants directly...

XXX: pullup-7 and the same file from the gcc.old tree.

(martin)

2018-06-23 10:30:22 UTC MAIN commitmail json YAML

re-do the XEN XSAVE support, this time to leave all probe code in
cpu_probe_fpu(), and have XEN cpu_init() just act

the xen probe is now guarded by XEN_USE_XSAVE option and XSAVE
support is thus still disabled by default (same as before), so it
wouldn't interfere with maxv's eager fpu rototil, while still
allowing testing for others

PR kern/50332

(jdolecek)

2018-06-23 10:06:02 UTC MAIN commitmail json YAML

Add XXX in fpuinit_mxcsr_mask.

(maxv)

2018-06-23 10:02:39 UTC MAIN commitmail json YAML

Reorder the code a little. On Xen, return earlier, we don't need to do
the XSAVE-related initialization if we don't support XSAVE.

(maxv)

2018-06-23 09:51:34 UTC MAIN commitmail json YAML

Revert the rest of jdolecek's changes. This puts us back in a clean,
sensical state.

(maxv)

2018-06-23 07:23:06 UTC MAIN commitmail json YAML

No semicolon after macro do ... while (0) wrapper.

(gson)

2018-06-23 07:21:00 UTC MAIN commitmail json YAML

No semicolon after macro do ... while (0) wrapper.

(gson)

2018-06-23 06:57:24 UTC MAIN commitmail json YAML

2018-06-23 06:45:51 UTC MAIN commitmail json YAML

2018-06-23 06:40:43 UTC MAIN commitmail json YAML

2018-06-23 03:32:48 UTC MAIN commitmail json YAML

Add some debugging in case someone else wants to debug gdb...

(christos)

2018-06-23 03:18:49 UTC MAIN commitmail json YAML

Add all encoding supported by the mixer.

Addresses PR kern/52585.

(nat)

2018-06-23 03:15:55 UTC MAIN commitmail json YAML

2018-06-23 01:51:03 UTC MAIN commitmail json YAML

locore.S is a MD_SFILES.

This keeps the dependency handling in the loop, so rebuilds after
changing options, say EARLYCONS, don't fail.

(jakllsch)

2018-06-23 01:23:27 UTC MAIN commitmail json YAML

Remove commented out MATH_EMULATE from kernel configs that got it
by copying an older i386 config.

(maya)

2018-06-22 23:46:04 UTC MAIN commitmail json YAML

Match generic arm,arm-v8 compatible string

(jmcneill)

2018-06-22 23:00:54 UTC MAIN commitmail json YAML

Handle more Vortex CPU's from Andrius V.
While here refactor the code to make it smaller.

(christos)

2018-06-22 22:50:53 UTC MAIN commitmail json YAML

fix free() on unitialized value for list -c when there are no
assigned interrupts

(jdolecek)

2018-06-22 20:48:44 UTC MAIN commitmail json YAML

Explain the -Bstatic -Bdynamic dance.

(christos)

2018-06-22 19:41:40 UTC MAIN commitmail json YAML

2018-06-22 19:41:16 UTC MAIN commitmail json YAML

2018-06-22 19:35:25 UTC MAIN commitmail json YAML

Describe something for npf, npfd, blacklistd.

(maya)

2018-06-22 19:08:28 UTC MAIN commitmail json YAML

Remove documentation references to rtsol.

(maya)

2018-06-22 18:23:59 UTC MAIN commitmail json YAML

rtsol(8) and rtsold(8) have been long removed.

(roy)

2018-06-22 18:19:41 UTC MAIN commitmail json YAML

When processing character classes ([:xxx:] inside []), treat a class name
that is longer than we can handle the same way we treat an unknown
class name (as a valid char class which contains nothing, so never
matches).  Previously a "too long" class name invalidated the
class, so [:very-long-name:] would match any of  '[' ':' 'v'  ...
(note: "very-long-name" is not long enough to trigger this, but you
get the idea!)

However, the name itself has a restricted syntax ([[:***:]] is not a
character class, it is a match for one of a '[' ':' or '*', followed by
a ']') which we did not implement - check the syntax of the name before
treating it as a character class (but we do add '_' to alphanumerics
as legal class name characters).

(kre)

2018-06-22 18:06:22 UTC netbsd-8 commitmail json YAML

2018-06-22 17:54:47 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #889):

sys/netinet6/ip6_output.c: revision 1.205
sys/netipsec/xform_ah.c: revision 1.90,1.93,1.102,1.103

Simplify the IPv4 parser. Get the option length in 'optlen', and sanitize
it earlier. A new check is added (off + optlen > skip).

In the IPv6 parser we reuse 'optlen', and remove 'ad' as a result.

Remove the kernel RH0 code. RH0 is deprecated by RFC5095, for security
reasons. RH0 was already removed in the kernel's input path, but some
parts were still present in the output path: they are now removed.
Sent on tech-net@ a few days ago.

Fix non-INET6 builds

Strengthen and simplify, once more.

(martin)

2018-06-22 17:31:24 UTC MAIN commitmail json YAML

- Fix groff reproducibility:
    - specify mdoc and font paths
    - clear encoding
    - specify pagesize on the command line
XXX: pullup-8

(christos)

2018-06-22 17:28:27 UTC MAIN commitmail json YAML

Don't look in random (legacy) places for fonts. We want reproducible builds
to work.
XXX: pullup-8

(christos)

2018-06-22 17:22:34 UTC MAIN commitmail json YAML

When matching a char class ([[:name:]]) in a pattern (for filename
expansion, case patterrns, etc) do not force '[' to be a member of
every class.

Before this fix, try:
case [ in [[:alpha:]]) echo Huh\?;; esac

XXX pullup-8    (Perhaps -7 as well, though that shell version has
much more relevant bugs than this one.)  This bug is not in -6 as
that has no charclass support.

(kre)

2018-06-22 15:52:00 UTC MAIN commitmail json YAML

iic_use_direct_match(): when iic_compatible_match() does not find a
comptible entry, set match quality to 0. Otherwise callers might use
random stack garbage.

(martin)

2018-06-22 15:48:57 UTC MAIN commitmail json YAML

Add a kernel panic when we matched but can not handle a string - better
die explicitly instead of crashing a few lines later with strange NULL
derefs.

(martin)

2018-06-22 11:25:04 UTC MAIN commitmail json YAML

Add comment describing why we remove -Wsystem-headers, requested by mrg.

(maya)

2018-06-22 11:04:55 UTC MAIN commitmail json YAML

Deal with ref after free found by ASAN when a function redefines
itself, or some other function which is still active.
This was a long known bug (fixed ages ago in the FreeBSD sh) which
hadn't been fixed as in practice, the situation that causes the
problem simply doesn't arise .. ASAN found it in the sh dotcmd
tests which do have this odd "feature" in the way they are written
(but where it never caused a problem, as the tests are so simple
that no mem is ever allocated between when the old version of the
function was deleted, and when it finished executing, so its code
all remained intact, despite having been freed.)

The fix is taken from the FreeBSD sh.

XXX -- pullup-8 (after a while to ensure no other problems arise).

(kre)

2018-06-22 10:17:04 UTC MAIN commitmail json YAML

If max-frequency is not specified, use UINT_MAX instead of the rate programmed by the bootloader.

(jmcneill)

2018-06-22 10:15:18 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by jakllsch in ticket #888):

sys/dev/pci/ld_virtio.c: revision 1.19-1.21,1.23

remove trailing whitespace

add feature/register definitions from virtio-v1.0-cs04

unload payload dma map upon command completion

Make ld_virtio aware of a possible device-side write cache.

The virtio block device capacity config item is expressed always in
request protocol sector units of 512 bytes.

Also, add and use a symbolic constant to refer to request protocol
sector units.

destroy 'sc_sync_wait' condvar and mutex upon detach

(martin)

2018-06-22 10:08:22 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by christos in ticket #887):

bin/ed/main.c: revision 1.30

Prevent shell execution also in the 'r ! dobad' case, pointed out by
Martijn van Duren, thanks!

XXX: pullup-8

(martin)

2018-06-22 09:31:04 UTC MAIN commitmail json YAML

Remove bpf_tap() in iexmit() because ie_start() does bpf_mtap().

(msaitoh)

2018-06-22 09:14:00 UTC MAIN commitmail json YAML

Remove bpf_tap() call in rx. It's done in if_percpuq_softint().

(msaitoh)

2018-06-22 09:06:04 UTC MAIN commitmail json YAML

Call config_cfattach_attach() regardless of whether the module is
being built as part of a kernel or as a external module.

Addresses kern/53389 - thanks for the report!

XXX pullup-8

(pgoyette)

2018-06-22 06:22:37 UTC MAIN commitmail json YAML

Revert jdolecek's changes related to FXSAVE. They just didn't make any
sense and were trying to hide a real bug, which is, that there is for some
reason a wrong stack alignment that causes FXSAVE to fault in
fpuinit_mxcsr_mask. As seen in current-users@ yesterday, rdi % 16 = 8. And
as seen several months ago, as well.

The rest of the changes in XSAVE are wrong too, but I'll let him fix these
ones.

(maxv)

2018-06-22 04:41:57 UTC MAIN commitmail json YAML

Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.

(msaitoh)

2018-06-22 04:17:42 UTC MAIN commitmail json YAML

2018-06-22 02:51:17 UTC MAIN commitmail json YAML

PR port-xen/50446
With approval from bouyer@ and acceptance, sometimes grudgingly, from
others I have removed the AGP lines from the XEN3_DOM0 config.  I have
left a note in the PR suggesting that if it ever gets a proper fix that
those lines can be considered for re-inclusion.

(darcy)

2018-06-21 23:05:44 UTC MAIN commitmail json YAML

Amend MIPS, there are multiple stages in a pipeline.

(maya)

2018-06-21 23:05:28 UTC MAIN commitmail json YAML

Fix invalid free(3) in sysinst(8)

The path variable is assigned with an allocation on the heap with
strdup(3). Later this pointer is changed with strsep(3) and this caused
invalid free(3).

Store the original pointer in a new helper variable opath and pass it to
free(3). With this change, the problem is going away.

Detected with MKSANITIZER=yes with AddressSanitizer.

(kamil)

2018-06-21 22:56:42 UTC MAIN commitmail json YAML

Add AFP, AMD, ASA, BSDP, DEC, IPL, MDMX, MIPS, PIX, PRU (found on the BeagleBone
Black), XHR.

(sevan)

2018-06-21 21:52:15 UTC MAIN commitmail json YAML

split the port status reporting to new function sata_interpret_det()
so it can be called separately from sata_reset_interface()

do not treat PHY offline as an error, it's pretty normal when there
is no device actually connected

debugging aid for PR kern/52372

(jdolecek)

2018-06-21 17:03:45 UTC MAIN commitmail json YAML

remove unused arguments

(maxv)

2018-06-21 16:53:10 UTC MAIN commitmail json YAML

Fix use-after-free, m_cat can free m.

(maxv)

2018-06-21 16:47:07 UTC MAIN commitmail json YAML

destroy 'sc_sync_wait' condvar and mutex upon detach

(jakllsch)

2018-06-21 12:02:15 UTC MAIN commitmail json YAML

Note import of dhcpcd-7.0.6

(roy)

2018-06-21 11:58:23 UTC MAIN commitmail json YAML

2018-06-21 11:57:05 UTC MAIN commitmail json YAML

* make to work printf() and panic() even before consinit().
* tidy up output for VERBOSE_INIT_ARM.

(ryo)

2018-06-21 11:48:05 UTC MAIN commitmail json YAML

Specify NOSANITIZER in distrib/amd64/ramdisks/common

This option cannot be set in distrib/common/Makefile.distrib as it's too
late, after including <bsd.own.mk> that will set MKSANITIZER.

This makes generation of ramdisk for amd64 with MKSANITIZER=yes successful.

(kamil)

2018-06-21 11:24:38 UTC MAIN commitmail json YAML

Refactor MKSANITIZER flags in mk rules

Introduce a new variable SANITIZERFLAGS that contains all the sanitizer
specific flags. These flags are designed to be passed to CFLAGS, CXXFLAGS
and LDFLAGS.

Pass SANITIZERFLAGS in bsd.prog.mk rules to CFLAGS, CXXFLAGS and LDFLAGS.

Pass SANITIZERFLAGS in bsd.lib.mk rules to *_pic.a build flags. The *_pic.a
libraries are designed to construct .so libraries. All .so libraries with
few exceptions are expected to be prebuilt with a sanitizer. Another
purpuse of *_pic.a files can be constructing static PIE programs, however
they are not supported as of now and there is no sanitization of static
programs either.

Once MKSTATICPIE will be supported, it will be initially incompatible with
MKSANITIZER.

This change also makes it easier to build other targets like kernel and
kernel modules without userland sanitizers.

No functional change intended for MKSANITIZER=no users.

(kamil)

2018-06-21 11:02:48 UTC MAIN commitmail json YAML

Make building of dhcp compatible with MKSANITIZER

Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled MKSANITIZER.
These options are incompatible with the current design of sanitizers,
because they cause duplication of symbols into programs and thus symbols
from the interceptors from sanitizers cannot be linked.

This change makes effectively mounting /usr required for dhcp programs like
dhclient(8).

(kamil)

2018-06-21 10:55:54 UTC MAIN commitmail json YAML

Add new option -s to crunchgen(1) -- enable sanitization

As of today typical sanitizers require dynamic executables, while
crunchgen(1) programs are produced with static properties.

Lack of specified -s will:
- generate a Makefile file with NOSANITIZER=
- build programs that are dependencies with NOSANITIZER=

In future there is an option to handle sanitization in statically linked
programs.

An idea with -s LGTM by <christos>

(kamil)

2018-06-21 10:46:39 UTC MAIN commitmail json YAML

2018-06-21 10:45:25 UTC MAIN commitmail json YAML

Add support for RK3328

(jmcneill)

2018-06-21 10:44:01 UTC MAIN commitmail json YAML

Set NOSANITIZER in rescue/Makefile

This is required to stop sanitizing rcmd.o and liboverride.o. These object
files will be linked into statically linked rescue.

(kamil)

2018-06-21 10:41:46 UTC MAIN commitmail json YAML

Disable SANITIZER for ldd(1)

These utilities (elf32, elf32_compat, elf64, liblldb) share code with the
ELF dynamic loader that is not being sanitized and its symbols are
installed into sanitized programs (in particular __tls_get_addr()).

Additionally libldd is used in rescue that is not expected to be sanitized
as of today.

(kamil)

2018-06-21 10:37:50 UTC MAIN commitmail json YAML

sbappendaddr() is required any lock. Currently, softnet_lock is appropriate.

When rip_input() is called as inetsw[].pr_input, rip_iput() is always called
with holding softnet_lock, that is, in case of !defined(NET_MPSAFE) it is
acquired in ipintr(), otherwise(defined(NET_MPSAFE)) it is acquire in
PR_WRAP_INPUT macro.
However, some function calls rip_input() directly without holding softnet_lock.
That causes assertion failure in sbappendaddr().
rip6_input() and icmp6_rip6_input() are also required softnet_lock for the same
reason.

(knakahara)

2018-06-21 09:09:50 UTC MAIN commitmail json YAML

Simplify & white space fix. No functional change.

(msaitoh)

2018-06-20 21:53:15 UTC MAIN commitmail json YAML

An acronym entry needs to be all uppercase.

Thanks to Thorsten Glaser

(sevan)

2018-06-20 20:43:21 UTC MAIN commitmail json YAML

as a stop-gap, make fpuinit_mxcsr_mask() for native independant of
XSAVE as it should be, only xen case checks the flag now; need to
investigate further why exactly the fault happens for the xen
no-xsave case

pointed out by maxv

(jdolecek)

2018-06-20 20:12:51 UTC MAIN commitmail json YAML

Add missing return in error path

(jmcneill)

2018-06-20 19:11:02 UTC MAIN commitmail json YAML

2018-06-20 12:41:45 UTC netbsd-8 commitmail json YAML

Note release note changes

(martin)

2018-06-20 12:39:52 UTC netbsd-8 commitmail json YAML

2018-06-20 11:57:22 UTC MAIN commitmail json YAML

Use PMAP_DIRECT_UNMAP.

(maxv)

2018-06-20 11:49:38 UTC MAIN commitmail json YAML

Add and use bootspace.smodule. Initialize it in locore/prekern to better
hide the specifics from the "upper" layers. This allows for greater
flexibility.

(maxv)

2018-06-20 11:45:25 UTC MAIN commitmail json YAML

Put these arrays in .rodata, they aren't supposed to be executable.

(maxv)

2018-06-20 09:10:53 UTC MAIN commitmail json YAML

2018-06-20 09:10:33 UTC MAIN commitmail json YAML

Add nSYS Technologies.

(msaitoh)

2018-06-20 08:03:55 UTC MAIN commitmail json YAML

2018-06-20 07:08:35 UTC MAIN commitmail json YAML

Move intr_establish() before imxuart_attach_subr().

(hkenken)

2018-06-20 07:05:37 UTC MAIN commitmail json YAML

2018-06-20 05:59:22 UTC MAIN commitmail json YAML

Rename a9tmr to arma9tmr.

(hkenken)

2018-06-20 05:59:18 UTC MAIN commitmail json YAML

In fdtbus_print(), aprint_normal the path to the device (rather than
aprint_debug).  This info is every bit as useful as, say, PCI device
locations.

(thorpej)

2018-06-20 05:53:19 UTC MAIN commitmail json YAML

2018-06-20 05:50:09 UTC MAIN commitmail json YAML

Support Cortex-A9 (addr_d > addr_c).

(hkenken)

2018-06-20 05:19:12 UTC MAIN commitmail json YAML

Style fix. No functional change.

(msaitoh)

2018-06-20 05:01:40 UTC MAIN commitmail json YAML

Use mpcaa_off1 parameter for mapping subregion.

(hkenken)

2018-06-20 04:04:50 UTC MAIN commitmail json YAML

Whitespace fix. No functional change.

(msaitoh)

2018-06-20 03:51:27 UTC MAIN commitmail json YAML

2018-06-20 02:15:13 UTC MAIN commitmail json YAML

Strip -Wsystem-headers from CXXFLAGS.

GCC's C++ headers are not clean (yet). They are trying, but haven't got there
yet.

Necessary for including <atf-c++.hpp> which uses <sstream>.

(maya)

2018-06-19 23:43:11 UTC MAIN commitmail json YAML

Disable threshhold mode for TX/RX DMA and ignore tx_delay/rx_delay props
for now. Fixes GMAC on RK3328.

(jmcneill)

2018-06-19 23:25:59 UTC MAIN commitmail json YAML

Make the error message from pms_alps_probe_init() an error again now
that we don't misidentify almost anything as an ALPS device.  Reset if
E6 check failed as well.

(uwe)

2018-06-19 23:03:28 UTC MAIN commitmail json YAML

Don't pass response buffer to the reset command since we are not
interested in it (pckbport_poll_cmd() is smart enough).

(uwe)

2018-06-19 22:53:17 UTC MAIN commitmail json YAML

If the first byte of E7 signature is not 0x73, it's not an ALPS
device, so don't complain we failed to initialize it.  Still need a
reset, b/c the E7 check will be interpreted as normal commands by a
normal device.

(uwe)

2018-06-19 22:44:33 UTC MAIN commitmail json YAML

dwcmmc: set ciu clock rate rather than assuming fixed input rate

(jmcneill)

2018-06-19 21:47:28 UTC MAIN commitmail json YAML

When E6 signature is checked, ignore pressed buttons.

(uwe)

2018-06-19 21:21:04 UTC MAIN commitmail json YAML

Use PMS_SEND_DEV_STATUS for E9 instead of PMS_GET_SCALE (also defined
as E9).  This is more readable and is congruent with other drivers.
Same object code is generated.

(uwe)

2018-06-19 19:57:45 UTC MAIN commitmail json YAML

actually Xen XSAVE support itself is bigger deal than the AVX alone, so mention
that more prominently

(jdolecek)

2018-06-19 19:53:42 UTC MAIN commitmail json YAML

note the Xen AVX fix

(jdolecek)

2018-06-19 19:50:19 UTC MAIN commitmail json YAML

fix FPU initialization on Xen to allow e.g. AVX when supported by hardware;
only use XSAVE when the the CPUID OSXSAVE bit is set, as this seems to be
reliable indication

tested with Xen 4.2.6 DOM0/DOMU on Intel CPU, without and with no-xsave flag,
so should work also on those AMD CPUs, which have XSAVE disabled by default;
also tested with Xen DOM0 4.8.3

fixes PR kern/50332 by Torbjorn Granlund; sorry it took three years to address

XXX pullup netbsd-8

(jdolecek)

2018-06-19 15:13:51 UTC MAIN commitmail json YAML

Install RK3328 .dtb files to the correct location

(jmcneill)

2018-06-19 15:12:05 UTC MAIN commitmail json YAML

Increase reserved space at start of image from 4MB to 16MB to make room
for Rockchip bootloaders.

(jmcneill)

2018-06-19 10:36:41 UTC MAIN commitmail json YAML

Use symbolic names for chip revision. NFC.

(jmcneill)

2018-06-19 09:25:13 UTC MAIN commitmail json YAML

When using EagerFPU, create the fpu state in execve at IPL_HIGH.

A preemption could occur in the middle, and we don't want that to happen,
because the context switch would use the partially-constructed fpu state.

The procedure becomes:

splhigh
unbusy the current cpu's fpu
create a new fpu state in memory
install the state on the current cpu's fpu
splx

Disabling preemption also ensures that x86_fpu_eager doesn't change in
the middle.

In LazyFPU mode we drop IPL_HIGH right away.

Add more KASSERTs.

(maxv)

2018-06-19 09:20:47 UTC MAIN commitmail json YAML

2018-06-19 07:23:45 UTC MAIN commitmail json YAML

Explicitly clear l2's pcb_fpcpu when forking.

A context switch (preemption) could occur between

fpusave_lwp(l1, true);
and
memcpy(pcb2, pcb1, sizeof(struct pcb));

In this case, l1's FPU state is re-installed on the current CPU, and
pcb1->pcb_fpcpu becomes non NULL. While it's fine to have l1's state
installed, we don't want to indicate l2's state is installed too.

With lazy fpu this was not a problem, because the context-switch would
not re-install the state, so pcb1->pcb_fpcpu was NULL.

Should fix PR/53383.

(maxv)

2018-06-19 05:14:36 UTC MAIN commitmail json YAML

2018-06-19 05:14:16 UTC MAIN commitmail json YAML

All of 88E151[0248]'s model number is 0x001d.

(msaitoh)

2018-06-19 04:10:51 UTC MAIN commitmail json YAML

Sigh, fix another stupid mistake in previous that squeaked by because,
again, I booted the wrong test kernel.

(thorpej)

2018-06-19 02:08:12 UTC MAIN commitmail json YAML

Use the device_compatible_entry mechanism rather than of_compat_data;
all of the OF / FDT data we need is already in the i2c_attach_args.

(thorpej)

2018-06-19 01:24:17 UTC MAIN commitmail json YAML

rk_cru_composite_set_rate: allow selection of parent clocks in different
domains

(jmcneill)

2018-06-18 23:50:35 UTC MAIN commitmail json YAML

Write MAC address high register before low register. Apparently the
hardware updates the filter when the low register is written.

(jmcneill)

2018-06-18 23:40:14 UTC MAIN commitmail json YAML

The whole point of my recent addition of the specificdata(9) man page
was so it could be cross-referenced here.  So, add the xref.

(pgoyette)

2018-06-18 22:57:18 UTC MAIN commitmail json YAML

Clear IFF_RUNNING | IFF_OACTIVE when stopping interface.

(jmcneill)

2018-06-18 20:20:27 UTC MAIN commitmail json YAML

Add more KASSERTs, see if they help PR/53383.

(maxv)

2018-06-18 18:33:31 UTC MAIN commitmail json YAML

Keep things portable (requested by joerg) by not depending on reallocarr
and instead doing the overflow check ourselves.

(christos)

2018-06-18 17:07:07 UTC MAIN commitmail json YAML

- Rename iic_compat_match() to iic_compatible_match() and change it
  to use the new device_compatible_match() routine.  A pointer to
  the matching device_compatible_entry is returned if a match is
  found.
- Adjust iic_use_direct_match() accordingly.
- i2c drivers now provide device_compatible_entry tables when performing
  direct-config matching.
- In the dsrtc driver, take advantage of this new capability to greatly
  simplify model selection.

(I'm coming for you next, of_compat_data...)

(thorpej)

2018-06-18 16:31:42 UTC MAIN commitmail json YAML

Fix a silly mistake in device_compatible_entry_matches() that I made
while re-factoring this from a prior version.

(I booted the wrong kernel when testing, oops.)

(thorpej)

2018-06-18 15:44:05 UTC netbsd-8 commitmail json YAML

2018-06-18 15:42:29 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by christos in ticket #886):

share/mk/bsd.sys.mk: revision 1.282

The compat build plays games with MAKEOBJDIR and unsets MAKEOBJDIRPREFIX.
Keep using our standard NETBSDOBJDIR if it was set.

(martin)

2018-06-18 15:39:49 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by jmcneill in ticket #885):

sys/dev/ic/dwc_gmac.c: revision 1.47

Avoid calling bus_dmamap_sync with len=0

(martin)

2018-06-18 15:37:46 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by uwe in ticket #884):

sys/arch/powerpc/powerpc/trap.c: revision 1.154

In mtmsr emulation ignore PSL_VEC we set in mfmsr emulation just
above, as it freaks out PSL_USEROK_P().  This is also congruent with
how we handle PSL_FP.

PR port-macppc/53360

(martin)

2018-06-18 15:36:54 UTC MAIN commitmail json YAML

Add device_compatible_match(), a generalized routine for weighted
matching of device_compatible_entry data to a device's "compatible"
strings.

(thorpej)

2018-06-18 15:34:34 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by jakllsch in ticket #883):

sys/arch/arm/fdt/psci_fdt.c: revision 1.5
sys/arch/arm/arm/psci.c: revision 1.2

Use correct value for PSCI 0.2+ PSCI_CPU_ON.

Fix PSCI 0.1 detection.

(martin)

2018-06-18 15:31:49 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #882):

usr.sbin/ofctl/ofctl.8: revision 1.6
usr.sbin/ofctl/ofctl.8: revision 1.7

Merge single-letter options. Use more markup.

Document -l, -r, and -w, based on input by jmcneill@

Bump date.

(martin)

2018-06-18 14:56:24 UTC MAIN commitmail json YAML

Prevent shell execution also in the 'r ! dobad' case, pointed out by
Martijn van Duren, thanks!

XXX: pullup-8

(christos)

2018-06-18 13:05:20 UTC MAIN commitmail json YAML

Pull in opt_bootconfig.h for DRAM_BLOCKS

(jmcneill)

2018-06-18 12:42:29 UTC MAIN commitmail json YAML

Bail early if gttwsi_send_start() fails in gttwsi_initiate_xfer() to
avoid unexpected state error message later (on Allwinner H5).

(jakllsch)

2018-06-18 09:53:45 UTC MAIN commitmail json YAML

Fix to aquire pppoe_softc_list_lock before read and write the list

ok by knakahara@n.o

(yamaguchi)

2018-06-18 09:49:05 UTC MAIN commitmail json YAML

Fix not to use PPPOE_UNLOCK before acccess to pppoe_softc
to avoid a race condition

According to the locking order of pppoe(4), the access to
pppoe_softc has to follow 5 steps as below.

1. aquire pppoe_softc_list_lock
2. aquire pppoe_softc lock
3. release pppoe_softc_list_lock
4. access to pppoe_softc
5. release pppoe_softc lock

However, pppoe_dispatch_disc_pkt() releases the lock of pppoe_softc
temporarily, and then re-aquires it before step 4 of the adove. So,
it is possible for other contexts to destroy a pppoe_softc in the
interim.
To fix this condition, avoid PPPOE_UNLOCK with the problem.

ok by knakahara@n.o

(yamaguchi)

2018-06-18 09:12:17 UTC MAIN commitmail json YAML

- All of Marvell PHY's registers from addr 0x0 to 0xf conforms IEEE 802.3
specification, so those register definitions are not required. Use mii.h's
definitions. Note that E1000_ER_PAR_DETECT_FAULT should be 0x0010 instead of
0x0100(typo).
- Restore code for BMCR_ISO which was removed in makphy.c rev. 1.44
- Whitespace fix.

(msaitoh)

2018-06-18 09:11:03 UTC MAIN commitmail json YAML

- Rename ENP (Extended Next Page) to XNP.
- Add ANLPAR_XNP bit.
- Add definitions for RF1 and RF2 (for 1000BASE-X) .
- Rename MII_ANNP (Autonegotiation next page transmit) register to MII_ANNPT.
- Add bit definitions for MII_ANNPT and MII_ANLPRNP.
- Remove GTSR_LP_ASM_DIR bit. This is not described in the 802.3 spec now and
  no any NetBSD drivers use the definition.

(msaitoh)

2018-06-18 06:09:56 UTC MAIN commitmail json YAML

todo list for kaslr, with the issues I can think of right now

(maxv)

2018-06-18 02:57:51 UTC MAIN commitmail json YAML

sysctl.7: fix speeling mistake

(eadler)

2018-06-18 02:48:56 UTC MAIN commitmail json YAML

queue.3: deduplicate deduplicate a a word word

(eadler)

2018-06-17 23:37:22 UTC MAIN commitmail json YAML

The compat build plays games with MAKEOBJDIR and unsets MAKEOBJDIRPREFIX.
Keep using our standard NETBSDOBJDIR if it was set.

(christos)

2018-06-17 22:42:41 UTC MAIN commitmail json YAML

Simplify gtmr_delay and don't mix and match usage of the physical and
virtual timers (always use the virtual timer).

(jmcneill)

2018-06-17 18:10:18 UTC MAIN commitmail json YAML

Current sljit version is r381.

(alnsn)

2018-06-17 17:19:06 UTC MAIN commitmail json YAML

NFC: correct typo in a comment.

(kre)

2018-06-17 15:46:39 UTC MAIN commitmail json YAML

i586 and below don't have this 3-byte nop, so use three 1-byte nops,
reported by Nathanial Sloss

(maxv)

2018-06-17 15:06:27 UTC MAIN commitmail json YAML

Add slightly-more generalized version of the "of_compat_data" structure
called "device_compatible_entry".  It performs a similar function, but
instead of one "compatible" string per entry, it takes an array of
"comaptible" strings per entry.  Also included are macros for initializing
an array of these entries and accessing data embedded in them.

(thorpej)

2018-06-17 14:50:54 UTC MAIN commitmail json YAML

Fix compilation error pointed out by nishimura@.

(thorpej)

2018-06-17 14:48:15 UTC MAIN commitmail json YAML

2018-06-17 13:12:25 UTC MAIN commitmail json YAML

Avoid calling bus_dmamap_sync with len=0

(jmcneill)

2018-06-17 11:52:38 UTC MAIN commitmail json YAML

2018-06-17 07:13:02 UTC MAIN commitmail json YAML

Enable eager fpu automatically at boot time if the cpu is affected. Intel
hasn't published a list of its affected products, but it appears that Xen
was given this information since they have a specific detection code.

We could just unconditionally enable eager; but on x86_32 eager may have
a greater performance cost than lazy, and we don't want to lose
performance on unaffected (and ~old) CPUs running NetBSD/i386.

So use the same code as Xen: take Family 6, and whitelist certain models.

(maxv)

2018-06-17 06:03:41 UTC MAIN commitmail json YAML

No, I meant to put the panic in fpudna not fputrap. Also appease it: panic
only if the fpu already has a state. We're fine with getting a DNA, what
we're not fine with is if the DNA is received while the FPU is busy.

I believe (even though I couldn't trigger it) that the panic would
otherwise fire if PT_SETFPREGS is used. And also ACPI sleep/wakeup,
probably.

(maxv)

2018-06-17 01:08:15 UTC MAIN commitmail json YAML

Oops, another one.

(thorpej)

2018-06-17 01:07:06 UTC MAIN commitmail json YAML

Remove now-unused variable.

(thorpej)

2018-06-17 00:33:06 UTC MAIN commitmail json YAML

2018-06-16 23:44:26 UTC MAIN commitmail json YAML

Match generic snps,dwc2 compat string

(jmcneill)

2018-06-16 23:14:47 UTC MAIN commitmail json YAML

Replace register numbers with defines, fixing a bunch of typos in the process.

(jmcneill)

2018-06-16 23:13:29 UTC MAIN commitmail json YAML

2018-06-16 21:28:07 UTC MAIN commitmail json YAML

More cleanup to i2c autoconfiguration:

- Get all of the drivers onto the new match quality constants.
- Introduce a new helper function, iic_use_direct_match(), that has
  all of the logic for direct-config matching.  If it returns true,
  the driver returns the match result (which may be 0).  If it returns
  false, the driver does indirect-config matching.
- iic_compat_match() now returns a weighted match quality; matches to
  lower-indexed "compatible" device property are more-specific matches,
  and return a better match quality accordingly.

In addition to the above:
- Add support for direct-config matching this driver based on
  "compatible" properties.
- Address-only matching is now done based on the specific addresses
  the requested model supports.
- "compatible" property can specify to the driver which model is to
  be used, so that using config "flags" directives aren't required
  in the direct-config case.

XXX More changes coming that require re-factoring some other code.

(thorpej)

2018-06-16 21:24:36 UTC MAIN commitmail json YAML

More cleanup to i2c autoconfiguration:

- Get all of the drivers onto the new match quality constants.
- Introduce a new helper function, iic_use_direct_match(), that has
  all of the logic for direct-config matching.  If it returns true,
  the driver returns the match result (which may be 0).  If it returns
  false, the driver does indirect-config matching.
- iic_compat_match() now returns a weighted match quality; matches to
  lower-indexed "compatible" device property are more-specific matches,
  and return a better match quality accordingly.

XXX This driver is an odd-ball with respect to the hardware device.
See comments in the match routine.  Unclear how best to handle it.

(thorpej)

2018-06-16 21:22:14 UTC MAIN commitmail json YAML

More cleanup to i2c autoconfiguration:

- Get all of the drivers onto the new match quality constants.
- Introduce a new helper function, iic_use_direct_match(), that has
  all of the logic for direct-config matching.  If it returns true,
  the driver returns the match result (which may be 0).  If it returns
  false, the driver does indirect-config matching.
- iic_compat_match() now returns a weighted match quality; matches to
  lower-indexed "compatible" device property are more-specific matches,
  and return a better match quality accordingly.

(thorpej)

2018-06-16 21:00:12 UTC MAIN commitmail json YAML

Correct previous change to CHAR_T_OFFSET

The intended operation is offsetof(), not alignof().

Noted by <christos>

(kamil)

2018-06-16 19:05:17 UTC MAIN commitmail json YAML

check MK{FOO} defaults for $MACHINE as well as $MACHINE_ARCH.
should restore firmware files for some platforms that were
missing them.

(mrg)

2018-06-16 18:58:00 UTC MAIN commitmail json YAML

Disable MKSANITIZER in lib/csu

These low-level libraries are expected to be not touched by a sanitizer.
Every libc program not using sanitizers cannot work with sanitized csu.

(kamil)

2018-06-16 18:54:52 UTC MAIN commitmail json YAML

Do not cause Undefined Behavior in vi(1)

Replace unportable manual calculation of alignof() that causes UB, with
a GCC extension __alignof__.

This fixes a problem reported by UBSan with the MKSANITIZER distribution.

(kamil)

2018-06-16 18:51:36 UTC MAIN commitmail json YAML

Do not reference buffer after the code scope {}

rk_getpwuid_r() returns a pointer pwd->pw_dir to a buffer pwbuf[].

It's not safe to store another a copy of pwd->pw_dir in outter scope and
use it out of the scope where there exists pwbuf[].

This fixes a problem reported by ASan under MKSANITIZER.

(kamil)

2018-06-16 17:44:53 UTC MAIN commitmail json YAML

switch to using OpenBSD eehpy(4) code to drive maphy(4), synchronizing support
for several special PHY conditions, particularly:
- Properly re-initialise the PHY upon resume
- Store next page in the Link Partner Next Page register for compatibility
  with 802.3ab on 88E3016 PHYs.  Fixes some autonegotiation problems on msk(4)
- Make 88E3016 actually work
- Make sure page 0 is selected when we initialize the PHY.  Fixes problems
  with the eephy(4) that attaches to nfe(4) on machines like the Sun Ultra 40.
  (we had condition for this, now the page 0 is selected for any PHY type)
- Disable fiber/copper auto-selection on the 88E1111 if it is in RGMII mode, to
  work around the fact that the onboard PHYs attached to nfe(4) on the Sun
  X4100 M2 have fiber/copper auto-selection enabled even though the interfaces
  are clearly copper-only

make sure to also add appropriate licenses, since basically nothing
really significant remains out of previous code

use FreeBSD <dev/mii/e1000reg.h> for register definitions as a base instead
of OpenBSD <dev/mii/eephyreg.h>, since it has some extra definitions for some
3016 bits, but add the several extra bits from OpenBSD needed by the code;
removed no longed used <dev/mii/makphyreg.h>

tested with PHY 88E1111, there no particular change observed - the
link status works as it did before, just now it does media nego
even before the interface is up

should however fix 88E3016 support and hence PR kern/49270 and PR kern/53301

(jdolecek)

2018-06-16 17:11:13 UTC MAIN commitmail json YAML

Need IPIs when enabling eager fpu switch, to clear each fpu and get us
started. Otherwise it is possible that the first context switch on one of
the cpus will restore an invalid fpu state in the new lwp, if that lwp
had its fpu state stored on another cpu that didn't have time to do an
fpu save since eager-fpu was enabled.

Use barriers and all the related crap. The point is that we want to
ensure that no context switch occurs between [each fpu is cleared] and
[x86_fpu_eager is set to 'true'].

Also add KASSERTs.

(maxv)

2018-06-16 15:18:33 UTC MAIN commitmail json YAML

2018-06-16 15:04:29 UTC MAIN commitmail json YAML

uncomment ena(4) now that it compiles; even though it's not working yet, this
ensures it's included in eventual subsystem rototils

(jdolecek)

2018-06-16 15:00:35 UTC MAIN commitmail json YAML

make ena(4) compile, with best efford exercised to convert code to NetBSD
equivalents; where possible left the original code intact to make it
easier to compare against FreeBSD original

made non-working stubs for some functions which don't have direct
equivalent yet - this includes all of <sys/buf_ring.h>, m_getjcl(),
m_append, and m_collapse(); these need to be adressed

left XXX/TODO in if_enavar.h, colocated with the non-working stubs

(jdolecek)