Commit Graph

139138 Commits

Author SHA1 Message Date
kamil 65d22cea25 Add a dummy implementation of _UC_MACHINE_INTRV() for ia64
This fixes a build problem in src/tests/lib/libc/sys/t_ucontext.c.

This needs to be revisited once the port will get more mature.
2018-02-27 09:51:28 +00:00
maxv 215e1b4181 Optimize: use ipsec_sp_hdrsiz instead of ipsec_hdrsiz, not to re-query
the SP.

ok ozaki-r@
2018-02-27 08:05:19 +00:00
skrll 13822393ce Remove c&p comment that doesn't apply 2018-02-27 07:24:13 +00:00
pgoyette 21a7a775c9 Fix total timeout amount - since we decrement by 10 every 10 usec, we
need 35000 usec to equal 35ms.
2018-02-27 05:56:12 +00:00
pgoyette 84b0deb6b0 Fix another case of 7-bit right-justified addressing, without write-bit 2018-02-27 05:55:08 +00:00
pgoyette d691638539 Use I2C_READ_OP_P() rather than negating I2C_WRITE_OP_P() 2018-02-27 05:52:10 +00:00
pgoyette 88c5eab4ef Change a couple of aprint messages to aprint_debug-only 2018-02-27 05:50:52 +00:00
pgoyette 6c0e84d128 KNF - remove space between cast and variable 2018-02-27 05:49:08 +00:00
pgoyette 1fa1550c57 For byte-writes we only load an 8-bit quantity 2018-02-27 05:47:10 +00:00
pgoyette d460bf3c90 Our i2c addresses are right-justified 7-bit; we don't shift left
for the "write" bit
2018-02-27 05:45:14 +00:00
pgoyette 0a20d723d3 The controller only supports 1-byte "commands" 2018-02-27 05:43:20 +00:00
msaitoh 589ba8986e Add hw.ixvM.q[01].{interrupt_rate,[tr]xd_head,[tr]xd_tail} sysctls as ixg(4). 2018-02-27 04:58:27 +00:00
pgoyette 1baec80807 Add dependency on iic module to get access to iicbus_print() 2018-02-27 00:18:02 +00:00
pgoyette 389b2dabdf The iic module needs to include 2c_subr so that i2cbus modules can
reference iicbus_print()
2018-02-27 00:15:34 +00:00
sevan d3c020679a Remove support for macofcons(4), it's not actually possible to build a kernel
with it enabled - See PR port-macppc/53004 and it may have further problems even
so.
From <macallan>:
"There is some early console code that uses OF output but it causes problems
when we get close to MMU setup - I think it can go, it hasn't been enabled in
any config in at least a decade as far as I know."
2018-02-26 23:09:32 +00:00
tsutsui 70a638886f Add dumb memory probe routines for Milan to use all available memory.
Tested on Milan with 32Mx1, 32Mx4, 128MBx1, and 128MBx3.
(bootloader ROM fails to load TOS with 128MBx4)

No particular comment on port-atari@:
 http://mail-index.netbsd.org/port-atari/2018/02/09/msg000580.html
2018-02-26 15:11:12 +00:00
maxv 0695fe90b1 Dedup: call ipsec_in_reject directly. IPSEC_STAT_IN_POLVIO also gets
increased now.
2018-02-26 10:36:24 +00:00
maxv 768c43840b Reduce the diff between ipsec6_input and ipsec4_input. 2018-02-26 10:19:13 +00:00
maxv 660f4099b0 Remove redundant condition (harmless). PR/53030. 2018-02-26 09:13:00 +00:00
maxv b39a0dd1f8 Dedup: merge ipsec4_in_reject and ipsec6_in_reject into ipsec_in_reject.
While here fix misleading comment.

ok ozaki-r@
2018-02-26 09:04:29 +00:00
maxv c3c5f13028 Dedup: merge ipsec4_hdrsiz and ipsec6_hdrsiz into ipsec_hdrsiz.
ok ozaki-r@
2018-02-26 08:50:25 +00:00
maxv 2953bb2565 Dedup: merge ipsec4_checkpolicy and ipsec6_checkpolicy into
ipsec_checkpolicy.

ok ozaki-r@
2018-02-26 08:42:16 +00:00
pgoyette a9b2760df8 Better device identification during configuration/attach 2018-02-26 08:34:47 +00:00
knakahara e6743f33cb Apply ixgbe.c:r1.127 to ixv.c. Pointed out by msaitoh@n.o. 2018-02-26 08:14:01 +00:00
pgoyette eee1cd778b Descend into subdirectory to create the module for ichsmb(4) driver. 2018-02-26 07:29:24 +00:00
pgoyette 611870bdec Modularize the ichsmb(4) driver. No functional changes. 2018-02-26 07:28:02 +00:00
maxv 0f3ae0526d If 'skip' is lower than sizeof(struct ip), we are in trouble. So remove a
nonsensical branch, and add a panic at the beginning of the function.
2018-02-26 06:58:56 +00:00
maxv 1d337420b7 m is never allowed to be NULL, so turn the KASSERT (and the null check)
to a panic.
2018-02-26 06:53:22 +00:00
maxv 8a440faae1 Fix nonsensical checks, neither in6p nor request is allowed to be NULL,
and the former is already dereferenced in a kassert. This code should be
the same as ipsec4_set_policy.
2018-02-26 06:48:01 +00:00
maxv 3e1c4ac085 Add XXX, it seems to me we need to free the mbuf here. 2018-02-26 06:41:27 +00:00
maxv 20ee129912 Reinforce this area, make sure the length field fits the option. Normally
it always does because the options were already sanitized earlier.
2018-02-26 06:40:08 +00:00
maxv 589f503d3d Fix mbuf mistake: we are using ip6 before it is pulled up properly. 2018-02-26 06:34:39 +00:00
maxv 16a6b57077 Merge some minor (mostly stylistic) changes from last week. 2018-02-26 06:17:01 +00:00
maxv 0d64a27b74 Enable SVS by default. 2018-02-26 05:52:50 +00:00
pgoyette 7989469a7e For non-modular driver, don't set return status for the default case. 2018-02-26 05:47:03 +00:00
pgoyette adb33e0c73 Identify the device that wsa just attached. Avoids getting strange
message sequence similar to

	imcsmb0 at imc0iic at imcsmb0 not configured

Also, while here, revert to the original FreeBSD wait-for-device-to-
settle code by waiting for 4 intervals of 10ms each, rather than 40
intervals of 1ms.
2018-02-26 05:04:51 +00:00
pgoyette 787536243d Change the "Child not added" message from normal to debug 2018-02-26 05:01:21 +00:00
pgoyette d2f1cbea7a Remove unneeded imc_print() routine 2018-02-26 04:31:32 +00:00
pgoyette ddf7c0f9d8 Search for child devices using the i2cbus attribute 2018-02-26 04:25:32 +00:00
knakahara 74808152cc Fix poll mode assumption breaking.
ixgbe_{enable,disable}_intr() forcibly enable/disable all interrupts
regardless of current state. That can break poll mode assumption,
that is, queue interrupts must not occur while polling Tx/Rx rings.

E.g. "ifconfig ixg0 delete && ifconfig ixg0 192.168.0.1" on heavy
load traffic can causes this issue.

This fix may have 1% or 2% performance impact at short packets.

XXX
ixgbe_rearm_queues() which is called only via watchdog can also break
this poll mode assumption because writing EICS casues interrupts
immediately when interrupt auto mask enabled.
We will fix it with other issues about watchdog later.

ok by msaitoh@n.o.
2018-02-26 04:19:00 +00:00
pgoyette 2eab6dfed7 As requested by chuq@, add the new imc devices to the i386 and amd64
ALL kernels.
2018-02-25 22:00:22 +00:00
jdolecek f0e5de0264 fix the DIAGNOSTIC function pmap_tlb_asid_count() to not expect
that TLBINFO_ASID_INUSE_P() returns just 0 or 1; the underlying
__BITMAP_ISSET() actually returns the matching bit nowadays, which
caused miscounting

fixes PR kern/53054 by Sevan Janiyan
2018-02-25 21:43:03 +00:00
chs 64900a4c4b add definitions of FIOSEEKDATA and FIOSEEKHOLE for ZFS.
from FreeBSD.
2018-02-25 18:55:23 +00:00
chs e5440b91e0 add defines to control whether or not mutex operations are skipped
after we have panic'd.  no functional change.
2018-02-25 18:54:29 +00:00
jdolecek 51cdc2d5b6 adjust KASSERT() triggered in PR port-cobalt/53054 to provide more info 2018-02-25 16:44:31 +00:00
maxv 3c99c64a1d Remove the first entry from the todo list, it's handled properly now. 2018-02-25 13:15:35 +00:00
maxv ccc038a88e Remove INTRENTRY_L, it's not used anymore. 2018-02-25 13:14:27 +00:00
maxv f6bdf0e58c Mmh. We shouldn't read %cr2 here. %cr2 is initialized by the CPU only
during page faults (T_PAGEFLT), so here we're reading a value that comes
from a previous page fault.

That's a real problem; if you launch an unprivileged process, set up a
signal handler, make it sleep 10 seconds, and trigger a T_ALIGNFLT fault,
you get in si_addr the address of another LWP's page - and perhaps this
can be used to defeat userland ASLR.

This bug has been there since 2003.
2018-02-25 13:09:33 +00:00
maxv 5871e8d651 Fix handling of segment register faults when running with SVS. The behavior
is changed also in the non-SVS case.

I've put a documentation in amd64_trap.S. Basically, the problem with SVS
is that if iret faults, we already have a full trapframe pushed on the
stack and the CPU will push another frame on this stack (nested), but it
hits the redzone below the stack since it is still running with the user
page table loaded.

To fix that, we pop a good part of the trapframe earlier in intrfastexit.
If iret faults, the current %rsp has enough room for an iret frame, and
the CPU can push that without problem. We then switch back to the outer
iret frame (the frame the CPU was trying to pop by executing iret, but that
it didn't pop for real because iret faulted), call INTRENTRY, and handle
the trap as if it had been received from userland directly.
2018-02-25 12:37:16 +00:00
maxv a26f6f08b3 Ah. Don't use NENTRY() to declare check_swapgs, use LABEL() instead. NENTRY
puts the code in the .text section, so the effect of TEXT_USER_BEGIN was
overwritten, and check_swapgs was not put in the .text.user section.

As a result kernels running SVS would crash when jumping here - because we
execute this place with the user page table loaded, and in this page table
only .text.user is mapped.

While here, rename check_swapgs -> kernuser_reenter, because we do more
things than just SWAPGS.
2018-02-25 11:57:44 +00:00