Commit Graph

265968 Commits

Author SHA1 Message Date
mrg
08dbfa234a add ssl specific timeout value (30s). if SSL_accept() doesn't
work with in this timeout value, ssl setup now fails.

mostly different from, but inspired from the patch in PR 50655
2019-02-28 08:28:21 +00:00
msaitoh
4eaa0efae0 - Remove extra cast.
- Cosmetic change.
2019-02-28 05:40:58 +00:00
msaitoh
ecdec0692e No functional change:
- Use TAILQ_FOREACH{,_SAFE}() macro.
 - KNF.
2019-02-28 05:25:35 +00:00
msaitoh
dadbc81916 Set RGMII delay for MAC side correctly on RK3399. 2019-02-28 03:05:46 +00:00
isaki
acd53d24e1 Add missing atomic_and_{8,16}_nv_cas.c for __sync_and_and_fetch_{1,2}.
XXX why is not only atomic_and_* symmetric unlike the others?
    (in common/lib/libc/atomic/)
2019-02-28 02:35:37 +00:00
nonaka
2f7c8d4b83 arp(8): one more to close socket. 2019-02-28 01:20:25 +00:00
mrg
32c963babf rework some commented code so it is easier to enable. 2019-02-28 01:11:04 +00:00
jakllsch
c3e7c8a7ec Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.
2019-02-28 00:47:10 +00:00
jakllsch
3689f53f38 Implement support for IO space, and better-handle both variants of MMIO space. 2019-02-28 00:17:13 +00:00
dholland
2cc9171b5c Teach arp that it's okay to close sockets after using them.
(this requires adding a close op to the rump turds)

Fixes PR 53974 reporting too many open files.
2019-02-27 23:29:50 +00:00
mrg
d85c0d7f6a work around a GCC 7 vs sparc (32 bit) issue i haven't figured out
the real cause of yet.

mark npf_init() as non-static.  for a yet-unknown reason, when this
function is inlined by the compiler (or a human!) into the single
caller, some CPUs end up in a hung state that can't be interrupted
eventually leading to system hang.  eg:

[   8.9693040] root on hme0
[   8.9862690] nfs_boot: trying DHCP/BOOTP
xcall(cpu2,0xf0240ac8) from 0xf0241170: couldn't ping cpus: cpu1

is the symptom though sometimes nfs_boot is actually able to
complete mountroot before it hangs.


this may be a compiler bug but the symptom and the trigger are
far removed and my so-far reading of the "broken" npf_init
inlining has shown no issues, however, i haven't completed a
full scan of this asm in the past month so i'm commiting this
workaround for now.
2019-02-27 21:37:24 +00:00
jakllsch
fee2bf6d03 Use symbolic MII_MODEL_xxMARVELL_I210 instead of a literal 0 in makphy_isi210(). 2019-02-27 18:21:04 +00:00
jakllsch
80b4d1d9aa Add fdtbus_intr_establish_byname() helper. 2019-02-27 17:01:57 +00:00
jakllsch
21aceb1091 Consolidate FDT [find "names" index by string] logic. 2019-02-27 16:56:00 +00:00
jakllsch
215056ede3 Adjust residual calculation in "find index by name" idioms to take into
account the trailing NUL on each name.  Some other similar instances of
this idiom already account for this.

(In preparation to factor out this idiom into its own function.)
2019-02-27 16:30:40 +00:00
christos
600c236c7b Make the _and_and_ have-nots compile. 2019-02-27 15:32:11 +00:00
martin
1f77ea3786 Simplify previous even further by using hline() instead of a hand coded
version.
2019-02-27 12:59:35 +00:00
martin
b0876b5075 Simplify previous, suggested by simonb. 2019-02-27 11:35:35 +00:00
mrg
58612d4540 also bump the X in "nbX" with previous 2019-02-27 09:11:01 +00:00
mrg
194a5ab70b bump netbsd gcc version date. 2019-02-27 09:10:38 +00:00
mrg
ee6b12caee partial mknative-gcc for riscv32/64. 2019-02-27 08:22:43 +00:00
mrg
c8240a8d80 avoid hand maintained lists but use values mknative pulls out.
unfortunately, somefiles have hand coded rules.
2019-02-27 08:21:42 +00:00
mrg
2b0e069250 mknative-gcc for most platforms again after recent tools/gcc/Makefile change. 2019-02-27 08:19:49 +00:00
msaitoh
bc6ba7a44a Fix RGMII clock 25MHz setting (for 100Mbps). 2019-02-27 07:16:00 +00:00
kre
256d645df3 Finish the fixes from Feb 4 for handling of random data that
matches the internal CTL* chars.

The earlier fixes handled CTL* char values in var expansions,
but not in various other places they can occur (positional
parameters, $@ $* -- even potentially $0 and ~ expansions,
as well as byte strings generated from a \u in a $'' string).

These should all be correctly handled now.   There is a new
ISCTL() macro to make the test, rather than using the old
BASESYNTAX[c]==CCTL form (which us still a viable alternative)
as the new way allows compiler optimisations, and less mem
references, so it should be smaller and faster.

Also, be sure in all cases to remove any CTLESC (or other)
CTL* chars from all strings before they are made available
for any external use (there was one case missed - which didn't
matter when we weren't bothering to escape the CTL* chars at
all.)

XXX pullup-8 (will need to be via a patch) along with the Feb 4 fixes.
2019-02-27 04:10:56 +00:00
ozaki-r
fa40dfcf97 Protect sysctl_rtable with KERNEL_LOCK and softnet_lock
In the function the routing table could be accessed without any locks, which was
unsafe.  Actually, on netbsd-7, a kernel panic happened(*).  The situation of
locking hasn't changed since netbsd-7 so we still need to hold the big locks on
-current (and netbsd-8) too.

Note that if NET_MPSAFE is enabled, the routing table is protected by its own
lock and we don't need the locks.

Reported and tested on netbsd-7 by sborrill@

(*) http://mail-index.netbsd.org/tech-net/2018/11/08/msg007153.html
2019-02-27 04:03:06 +00:00
msaitoh
5ee05e1f2f Regen. 2019-02-27 03:05:39 +00:00
msaitoh
36002d6291 - Add SMSC LAN83C185 10/100 PHY from OpenBSD
- Add SMSC LAN8740 10/100 media interface
2019-02-27 03:05:18 +00:00
mrg
5c93bf3d7c this file was moved to netbsd32_compat_14_sysv.c. 2019-02-27 03:01:08 +00:00
mrg
f8a0bfe3f3 remove dated comment that was handled with audiomp or later.
sc_dying being set earlier assumes audio_enter() will reject
attempts to use this device.
2019-02-27 02:27:38 +00:00
christos
9b51e85d63 Instead of deleting the rules individually use flush to kill them all at
once for efficiently. Also when restoring, don't nuke the database
(Phil Rulon).
2019-02-27 02:20:18 +00:00
jmcneill
dce61c1f67 Fix GPIOH pin groups and add GPIOY 2019-02-26 21:55:28 +00:00
christos
06535a6e22 regen i386 2019-02-26 21:24:44 +00:00
christos
fd53ae5e9e regen 2019-02-26 21:16:03 +00:00
christos
5a888a1653 Remove "--disable-libstdcxx-dual-abi". This option does not do what
it says: Instead of disabling the dual-abi and letting you choose
which one you want, it disables the cxx11 abi and the
"--with-default-libstdcxx-abi=OPTION" becomes a noop. Removing the
old COW compatibility ABI is not easy. For more info see:

https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
2019-02-26 21:09:18 +00:00
joerg
cc19c8732e Compute storage size for a string correctly. 2019-02-26 15:55:33 +00:00
joerg
222ae4e52b Avoid string + int warning. 2019-02-26 13:09:35 +00:00
maxv
7a4f551dcf Change the layout of the SEG state:
- Reorder it, to match the CPU encoding. This is the universal order,
   also used by Qemu. Drop the seg_to_nvmm[] tables.

 - Compress it. This divides its size by two.

 - Rename some of its fields, to better match the x86 spec. Also, take S
   out of Type, this was a NetBSD-ism that was likely confusing to other
   people.
2019-02-26 12:23:12 +00:00
msaitoh
ba9226f13c Whitespace change. 2019-02-26 10:30:28 +00:00
maxv
8d8eb34b8b Set hardseg to -1 rather than 0, because 0 can be a valid segment. 2019-02-26 10:18:39 +00:00
isaki
8116c33ceb Add ATF tests for __sync_* functions instead of all_sync_ops_linkable.c 2019-02-26 10:01:40 +00:00
msaitoh
51e7f164ac No functional change:
- Cosmetic change.
 - Remove extra space between single quote and comma to make
   "grep \'i kdump-ioctl.c | sort -n -k 5,5 | uniq | column -t" happy.
2019-02-26 09:43:37 +00:00
rin
b991ad92fc Install unpigz(1). 2019-02-26 07:31:49 +00:00
maxv
516d295318 Fix locking: it is fine if the lock is already key_so_mtx, this can happen
in socketpair. In that case don't take it.

Ok ozaki-r@

Reported-by: syzbot+901e2e5edaaaed21c069@syzkaller.appspotmail.com
2019-02-26 06:52:34 +00:00
rin
47c94a5c39 Push AT_STACKBASE. Otherwise, pthread_attr_getstack(3) cannot
find the stack address for initial thread (LID 1).

Now, rust for i386 and armv7 work on amd64 and aarch64,
respectively.
2019-02-26 06:28:43 +00:00
mlelstv
8d22cb8f8c Cast to same type as parameter. NFCI. 2019-02-26 06:15:55 +00:00
msaitoh
53dc05a883 Add MI MII clause 45 MMD MDIO access macros via clause 22 indirect registers:
DESCRIPTION
    static inline int
    MMD_INDIRECT(struct mii_softc *sc, uint16_t daddr, uint16_t regnum):
	Setup MMD device address and register number. It also setup
	address incrementation function.

    static inline int
    MMD_INDIRECT_READ(struct mii_softc *sc, uint16_t daddr, uint16_t regnum,
      uint16_t *valp)):
	Do MMD_INDIRECT() and then read the register.

    static inline int
    MMD_INDIRECT_WRITE(struct mii_softc *sc, uint16_t daddr, uint16_t regnum,
      uint16_t val):
	Do MMD_INDIRECT() and then write the register.

RETURN VALUE
    Retruns 0 on success. Non-zero vaule on failure.

    Note that old PHYs have no indirect access registers. Accessing such
    devices with these functions cause timeout and return non-zero value
    (e.g. ETIMEDOUT).

EXAMPLE
	Read MMD Auto negotiation device's EEE advertisement register,
	drop 100BASE-TX support and write it.

	uint16_t eeadvert;

	/* Post increment is not required */
	MMD_INDIRECT_READ(sc, MDIO_MMD_AN | MMDACR_FN_DATA,
	    MDIO_AN_EEEADVERT, &eeadvert);
	eeadvert &= ~AN_EEEADVERT_100_TX;

	/*
	 * MMD device address and the register number are already set, so it's
	 * enough to read MII_MMDACR.
	 */
	PHY_WRITE(sc. MII_MMDACR, eeadvert);
2019-02-26 05:26:10 +00:00
pgoyette
4561b064b3 Add explicit cross-references to pserialize(9) for the sections about
ensuring that a localcount doesn't disappear while in the process of
being referenced, in the same manner as psref(9).
2019-02-25 21:43:00 +00:00
martin
a7fc6d1692 Add an option to supress the vertical space between menu title and
menu items.
2019-02-25 20:47:37 +00:00
joerg
be7b2c4eb4 Properly extract the emulation path from the linker script template. 2019-02-25 19:55:35 +00:00