summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-09-02add a concept of 'verified auth' to sessions. When set via ioctl,Ted Unangst
the user and parent process are recorded. Later, this info may be tested and used to bypass authorization requirements. ie, doas won't ask for your password again. Great idea from henning. ok deraadt guenther henning
2016-09-02Enable SGI for iwn(4).Stefan Sperling
The maximum 11n data rate should go up from 65Mbit/s to 72Mbit/s. ok sthen@
2016-09-02Enable SGI for iwm(4).Stefan Sperling
The maximum 11n data rate should go up from 65Mbit/s to 72Mbit/s. ok sthen@
2016-09-02Add switch(4) cdev entryKazuya Goda
ok deraadt@ yasuoka@ reyk@
2016-09-02Mask out lower bits of randomly selected addressStefan Kempf
Fixes uvm pivots bug that would create non-page aligned addresses. This fix is in code that's not yet enabled.
2016-09-02The policy field in struct iwm_time_event_cmd_v2 is just a 16bit integer,Stefan Sperling
so we should use htole16() when setting it, instead of htole32(). Patch by Imre Vadasz ok natano@
2016-09-02Fix off-by-one error in the IWM_NUM_UCODE_TLV_CAPA range check.Stefan Sperling
Patch by Imre Vadasz
2016-09-02Although this doesn't seem to cause any issue at the moment, using anStefan Sperling
enum type in a __packed struct should be avoided. Patch by Imre Vadasz
2016-09-02The iwm_poll_bit() function in iwm(4) returns 1 on success, and 0 on failure.Stefan Sperling
So instead of "if (ret < 0) {" we should check for "if (!ret) {". Patch by Imre Vadasz
2016-09-02The struct iwm_rbuf definition, and the wantresp field in structStefan Sperling
iwm_rx_data aren't used anywhere and can be removed. Patch by Imre Vadasz
2016-09-02Remove unused argument in aml_showvalue().Paul Irofti
The second argument of aml_showvalue() was probably supposed to set the verbosity level through dnprintf() but in fact it does nothing. OK deraadt@
2016-09-02in6_selectroute should never get a valid struct route * filled with somethingVincent Gross
else than AF_INET6. Ok florian@
2016-09-02After allocating a single 64 KB mbuf cluster in sosend(), the sendingAlexander Bluhm
socket buffer had no space anymore. The default mbuf space limit was only 32 KB. So no more data from user-land was accepted. As tcp_output() keeps the mbuf cluster for retransmits, it will be freed only after all ACKs have been received. That has killed our TCP send performance totally. To allow cycling through the mbufs periodically, we need space for at least 3 of them. Reported by Andreas Bartelt; testing with mikeb@; OK mikeb@ claudio@
2016-09-02move links from http to https://www.openbsd.org/Theo Buehler
ok beck
2016-09-02Consider when a prefix expires when sending solicitations instead ofFlorian Obser
blindly always sending one every 60 seconds. repeated prodding & input naddy input & OK vgross
2016-09-02provide a pool_setipl so tcpdump can compile this fileDavid Gwynne
spotted by deraadt@
2016-09-02provide an implementation of red black trees using functionsDavid Gwynne
the main goal of this change is to reduce the amount of code that is generated as a result of using the macro implementation (RB_FOO) of red black trees. on amd64 we should get a few dozen kilobytes of code space back, and make red black trees more icache friendly at the same time. the new (RBT_FOO) implementation is modelled on the existing one, but has some minor api variations. generally you can replace RB_ with RBT_ and get most of the way to converting code. internally the red black tree functions all take an rb_type struct that describes the layout of the object wired into a tree (ie, the offset of the RBT_ENTRY inside a node), the comparison function, and an optional augment function. because the functions are supposed to be used for all types, they end up taking void * for the node pointers instead of specific types. the tree is operated on as pointers between the RBT_ENTRY structs instead of the nodes, which gave me some type safety when implementing the code (cos casts to/from void * dont ever fail, and continually calculating the offset of the rb entry is annoying). RBT_ENTRYs are turned into node pointers by prepending the offset stored in the rb_type struct before theyre given to the comparison function or returned to the caller. to provide type safety on top of this, RBT_PROTOTYPE generates static inline function wrappers that only take arguments of the right type, and implicitly provide the rb_type struct argument to the actual RBT functions. therefore the actual functions should never be called directly, all calls should go through the RBT_ wrappers. RBT_GENERATE is responsible for creating the rb_type struct used by these wrappers. notably it also generates a wrapper around the compare function so the user provided one must take the right types instead of void *. in terms of speed, this code is comparable to the macro implementation. eg, insertion is very slightly slower in microbenchmarks, but deletion appears to be significantly faster. this is possibly because of the aggressive inlining ive done inside the delete codepaths. the code is not yet wired into the kernel build. it also needs to be said that there have been several attempts before this to provide functions for at least some parts of the kernels red black trees. that work made this a lot easier. ok deraadt@ jung@ tedu@
2016-09-02Pass M_ZERO when allocating memory for "struct usbd_endpoint".Martin Pieuchot
These descriptors are filled with value parsed from untrusted USB descriptors and we don't want to left memory unitialized if an error occurs during the parsing.
2016-09-02Cleanup usbd_fill_iface_data() to make it easier to check for badMartin Pieuchot
descriptors. No functionnal change.
2016-09-02pool_setipl for pf bitsDavid Gwynne
ok phessler@ henning@
2016-09-02Variable 'imp' is set earlier in cd9660_mount() if it's needed (whenTom Cosgrove
MNT_UPDATE is set in mnt_flag), so remove an unnecessary assignment later. ok bluhm
2016-09-02Add switch(4) support to ifconfigKazuya Goda
ok deraadt@ yasuoka@ reyk@ henning@
2016-09-02Don't bother with 'ghpartnum' in gpt_chk_hdr(); it's not usedTom Cosgrove
ok krw@
2016-09-02Drop non-encapulated ESP packets using a UDP-encapsulating TDB, and addVincent Gross
the relevant counters. Ok mikeb@
2016-09-02Go through the set function like normal people; no functional change.Florian Obser
OK benno@
2016-09-02Do not free the configuration descriptor without setting ``dev->cdesc''Martin Pieuchot
to NULL. Prevent a use after free triggerable with invalid interface descriptor. Found with umap2 and a facedancer21.
2016-09-02Prevent a NULL dereference, triggerable with a crafted configurationMartin Pieuchot
descriptor with a bad type. Found with umap2 and a facedancer21.
2016-09-02Avoid calling usbd_set_config_index() in *_attach() and let the stackMartin Pieuchot
do it instead. If anything bad happen due to a malformed descriptor it makes no sense to try to attach a driver, and bail before probing.
2016-09-02Remove variables 'm' and 'uio' that are only ever assigned toTom Cosgrove
(in swcr_authenc()) ok mikeb@, who pointed out that I'd missed uio
2016-09-02No need to set 'error' to 0 at the beginning of acx_encap(), asTom Cosgrove
we're only going to set it again 10 lines later. ok mpi@
2016-09-01No longer needed to special case RTM_GET in these if statements sinceClaudio Jeker
RTM_GET is no longer sharing this case block.
2016-09-01Move RTM_GET into its own case block not intermixing it with RTM_CHANGEClaudio Jeker
and RTM_LOCK. This is start for more changes here. OK mpi@
2016-09-01Make vcpu_reset_regs use new writeregs codeStefan Kempf
Makes reset code a little simpler. ok mlarkin@
2016-09-01Disable the RTF_UP kassert check in rtisvalid() for now as it canAlexander Bluhm
be triggered from userland. A gateway route is simply not valid if its gwroute is not up. OK phessler@
2016-09-01Add ioctls to get/set VCPU registersStefan Kempf
ok mlarkin@
2016-09-01Remove the clock hack, and properly handle interrupts generated from vmd(8)'sMike Larkin
forthcoming emulated interrupt controller. ok stefan
2016-09-01make the version symbol a fixed size (512) to reduce the potential forTed Unangst
bad effects when savecore reads beyond it ok deraadt (and thanks to bluhm for remembering that this happens)
2016-09-01Fix undefined behaviour when comparing pointers by casting them to vaddr_t.akfaew
OK mlarkin@
2016-09-01MPSAFE is never used, so get rid of it.akfaew
OK natano@ mpi@ guenther@
2016-09-01Get rid of 'relebad:'.akfaew
OK natano@ guenther@
2016-09-01Move the RTF_LOCAL check that only makes sense for userland toMartin Pieuchot
route_output(). ok claudio@
2016-09-01remove three more sparc references noticed by jsgTed Unangst
2016-09-01Import switch(4), an in-kernel OpenFlow switch which can work alone.Kazuya Goda
switch(4) currently supports OpenFlow 1.3.5. Currently, it's disabled by the kernel config. With help from yasuoka@ reyk@ jsg@. ok deraadt@ yasuoka@ reyk@ henning@
2016-09-01add iatp(4), a driver for the i2c touchpad and touchscreen found onJoshua Stein
the chromebook pixel
2016-09-01whitespaceJoshua Stein
2016-09-01Always initialize error code returned from iwm_firmware_load_chunk().Stefan Sperling
Patch by Imre Vadasz.
2016-09-01for broadwell HIDs, apply a magic write found in linux that isJoshua Stein
required in order to talk to certain i2c slave devices behind dwiic
2016-09-01- disable controller when we're done using itJoshua Stein
- read CLR_INTR register when disabling interrupts
2016-09-01- separate hid and ihidev attachment for upcoming driversJoshua Stein
- move power control into a dedicated function - sprinkle aml_freevalue
2016-09-01Use rtable_match() rather than rtalloc() when looking for an existingMartin Pieuchot
entry in RTM_ADD. rtable_match() does not modify the 'Use' counter of the route and unbreak regression tests. Breakage reported by bluhm@