summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2019-01-28make a start at supporting ipv6 on mpe.David Gwynne
we still can't assign a v6 address to the interface, or handle icmp error generation, but denis@ is working toward that.
2019-01-27tweak errno in previousanton
2019-01-27Validate the user-supplied device index given to WSMUXIO_ADD_DEVICE. The sameanton
index is used to index an array which could cause a panic if it's negative. ok deraadt@ Reported-by: syzbot+c5997876fea393e6b948@syzkaller.appspotmail.com
2019-01-27stop using capital letters in printf format strings; ok visa@anton
2019-01-27consistency tweaks to panic format strings; ok visa@anton
2019-01-27don't play with IFF_UP in strange places.David Gwynne
2019-01-27use mpls_ip_adjttl and mpls_ip6_adjttl in mpe instead of rolling it again.David Gwynne
mpls_ip_adjttl now patches the checksum rather than check it and calculate it again. both mpls_ip_adjttl and mpls_ip6_adjttl now rely on the caller to check the sysctls for whether they should run or not, which paves the way for making it configurable in mpe via the tunnel ioctls.
2019-01-27rework mpe_input so it patches ipv4 cksum, and handles ipv6 too.David Gwynne
rather than check and recalculate the ipv4 checksum, we can update the cksum incrementally. this is a bit faster, and means we'll see more things on bpf. also, peek at the first nibble so we can tell ipv6 from ipv4. i consider them the same FEC, so either can be received now.
2019-01-27change how packets are pushed into mpe(4).David Gwynne
mpe(4) adds itself ot the mpls rtable with RTF_LOCAL set, which pushes the packet through mpe_output, which sees RTF_LOCAL can calls mpe_input. this follows what mpw(4) does, and removes a special case in mpls_input.
2019-01-27move the mpe_softc definition and mpe macros into the mpe driver.David Gwynne
2019-01-27let ether_ioctl handle the mtu. set hardmtu to ETHER_MAX_HARDMTU_LEN.David Gwynne
as well as allowing for larger frames to be transported, it also gets rid of the dependancy on mpe defines.
2019-01-27use sc as the name of the softc variable.David Gwynne
makes this more like other drivers to read.
2019-01-27put underscores in function names like other driversDavid Gwynne
mpestart, mpeioctl and mpeoutput are now mpe_start, mpe_ioctl, and mpe_output respectively. no functional change
2019-01-27split off "local" input handlingDavid Gwynne
this means the current mpls header will be passed along with the mbuf for mpw to look at. right now this doesn't do anything, but it will allow for implementation of RFC 6391 (flow aware transport) and using the exp header for cos. when mpe gets moved to adding an RTF_LOCAL route, this will be used for cos and ttl handling.
2019-01-27like ip headers, mpls tags need to be aligned to a 4 byte boundaryDavid Gwynne
copy the semantics for guaranteeing this from egre. when sending an encapsulated frame, prepend a whole new mbuf for the tags and transport headers. when rxing a packet, check the alignment of the ethernet payload and duplicate it on the right boundary if it isn't already aligned.
2019-01-27forgot to commit the tweaks to mpls_input when mpw became an ethernet ifaceDavid Gwynne
the input mechanism for mpw is now that it inserts a tag into the mpls table with RTF_LOCAL set. mpls_input falls through to calling the interface output routine (mpw_output in this case) which looks for that RTF_LOCAL and then calls mpw_input against that mbuf. ok claudio@ who is keep to apply this semantic to mpe
2019-01-26Parse altitude and ground speed values from the GGA & RMC NMEA messages,Landry Breuil
and provide them as nmea(4) distance & velocity sensors. With my 'u-blox GNSS receiver' that gives: hw.sensors.nmea0.distance0=335.600 m (Altitude), OK hw.sensors.nmea0.velocity0=18.337 m/s (Ground speed), OK ok deraadt@
2019-01-26Use memset() instead of bzero().Visa Hankala
2019-01-26Wait a bit for the set mode command to complete for Synaptics devices toMarcus Glocker
make sure that the device doesn't get enabled before, which would make it fail. Fixes regular occurring 'not in sync yet, discard input' issue seen on ThinkPad X1 Gen6. ok deraadt@
2019-01-26Tag the start of witness(4) output with prefix "witness:".Visa Hankala
This eases data extraction in syzkaller. Prompted by and OK anton@
2019-01-26check if the incoming ttl is <= 1 before decrementing it.David Gwynne
previously it would decrement the uint8_t ttl and then check if it was less than one, which let ttl 0 off the wire wrap to 255 (which is higher than 1).
2019-01-25build ccp(4) on ramdisksJonathan Gray
ok dlg@
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.Todd C. Miller
2019-01-24Add .fpu directives in inline assembly to silence new compilerMark Kettenis
warnings/errors about using VFP2 instructions. We use vfpv3 here (which corresponds to vfpv3-d32) since that is the minimum requirement for OpenBSD/armv7. ok jsg@, patrick@
2019-01-24Zap unused disable flag from iwn_stop()kn
This function parameter has been unused since introduction in 2007. OK stsp
2019-01-24Correct a wrong comment about PTE skip sizeMike Larkin
This was likely left over from long ago when we loaded the kernel at a lower PA. Noticed by deraadt@ and I as we were crawling through this code recently. This may change again, but correcting it now just in case this code stays around for a while.
2019-01-2432 not 16Theo de Raadt
2019-01-24the KERN*_{HI,LO} variables are not needed, and easier to calculate theTheo de Raadt
parts on the fly.
2019-01-24gdt64 is only used by locore0 during the gut-wrenching 32-bit bring-up, soTheo de Raadt
move it to right place.
2019-01-24mptramp.S does not export gdt64, another historical locore.s splitup errorTheo de Raadt
2019-01-23RELOC() is not performed here (remained from when locore was split up)Theo de Raadt
2019-01-23using _C_LABEL() inside a macro which uses _C_LABEL() is silly and wrongTheo de Raadt
2019-01-23remove special casing for IFT_MPLSTUNNEL now mpw is IFT_ETHER.David Gwynne
2019-01-23rework mpw to be an actual ethernet interface.David Gwynne
this will allow for a lot of special casing in places like vlan and bridge to go away since mpw will do all the same things as any other ethernet tunnel. another benefit is you can run stuff directly on the mpw interface to interact with the pseudowire, rather than requiring a bridge and vether interface. this is like what juniper calls Pseudowire Service Interfaces. the caveat is that the implicit vlan or svlan tagging that mpw did in ethernet-tagged mode now has to be done by hand. however, there is some indication that different vendors pick different types of tags, ie, one uses vlan tags and another uses svlan, so being able to configure the right one has value. it is also possible you would want to bridge the entire tag stack to another site, so being able to bridge mpw without it playing with the tags can be useful. because the if_type on mpw changes from IFT_MPLSTUNNEL to IFT_ETHER, the semantic used to handle incoming packets in mpls_input is changed. instead of mpls_input pushing the packets into mpw based on the if_type being IFT_MPLSTUNNEL, mpw now adds an RTF_LOCAL route to the mpls table. mpls_input falls through to "outputting" the packet to mpw_output, which then uses the RTF_LOCAL flag to decide to input to mpw_input and then ether_input. this semantic will be applied to mpe soon, which removes all the interface special casing in mpls_input. the if_type change also means mpw implements the SIOCGPWE3 ioctl so ldpd can still figure out that the interface is a pseudowire. ok claudio@
2019-01-23eliminate a ?: in witness mtx initializer by pushing the default oneTed Unangst
level up. ok guenther mpi visa
2019-01-23Sprinkle a pinch of timerisvalid/timespecisvalid over the rest of sys/kerncheloha
2019-01-23Remove uneeded header.Martin Pieuchot
2019-01-23Pass an `ifp' pointer to bridge_ourether().Martin Pieuchot
ok kn@, claudio@, visa@
2019-01-23Only copy packets for span ports if the bridge is UP.Martin Pieuchot
ok claudio@, kn@, visa@
2019-01-23Move 802.11n rateset definitions out of MiRA and make them available toStefan Sperling
net80211 and drivers in general. Add ratesets for 'short guard interval' (SGI) rates, and add SGI support to MiRA. SGI is currently only used by iwm(4), and of course internally by bwfm(4) firmware. Ratesets for 11n 40 MHz channels and 11ac will come later. ok mpi@ phessler@
2019-01-23enable the apm(4) subsystem on arm64Peter Hessler
previous version OK deraadt@ patrick@ OK jsg@
2019-01-23Add the apm(4) subsystem to arm64.Peter Hessler
NB: acpi(4) is not hooked up to this yet. previous version OK deraadt@ patrick@ OK jsg@
2019-01-23add a SIOCGPWE3 ioctl for interfaces to advertise pwe3 capabilityDavid Gwynne
im going to turn mpw into an ethernet interface, which includes changing its if_type to IFT_ETHER. currently ldpd looks for if_type IFT_MPLSTUNNEL to decide if an interface is a pseudowire, ie, it's going to break. the ioctl will let ldpd ask the interface if it is pseudowire capable as an alternative. ok claudio@
2019-01-23futimens(2), futimes(2), utimensat(2), utimes(2): Validate input at copyincheloha
Currently we validate time input for all four of these syscalls in the workhorse function dovutimens(). This is bad because both futimes(2) and utimes(2) have input as timevals that need to be converted to timespecs. This multiplication can overflow to create a "valid" input, e.g. if tv_usec is equal to 2^61 (invalid value) on a platform with 64-bit longs, the resulting tv_nsec is equal to zero (valid value). This is also a bit wasteful. We aquire a vnode and do other work under KERNEL_LOCK only to release the vnode when the time input is invalid. So, duplicate a bit of code to validate the time inputs before we do any conversions or real VFS work. probably still ok tedu@ deraadt@
2019-01-22add some definitions used by elftoolchain's libelfJonathan Gray
ok guenther@
2019-01-22The kernel interpreted bogus lengths in RPC calls during NFS boot.Alexander Bluhm
A malicious rpc.bootparamd could corrupt memory, but the kernel has to trust the local network anyway in a diskless environment. Now in case of an RPC error, the kernel will stop booting with a specific panic. OK claudio@ beck@
2019-01-22namei can return a null dvp on success. check this before access.Ted Unangst
ok beck Reported-by: syzbot+cc59412ed8429450a1ae@syzkaller.appspotmail.com
2019-01-22Do not leak received mbufs if the NDIS appended a zero-byte padding.Martin Pieuchot
from aalm@
2019-01-22Remove unused variable.Martin Pieuchot
2019-01-22flense more trailing whitespacePeter Hessler