summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2015-09-02fairly easy size for free()Theo de Raadt
2015-09-02only enter deeper on amd64Theo de Raadt
2015-09-02Initial commit of uefi boot loader of OpenBSD.YASUOKA Masahiko
ok deraadt yuo
2015-09-01Replace sockaddr casts with the proper satosin(), ... calls.Alexander Bluhm
From David Hill; OK mpi@; tested kspillner@; tweaks bluhm@
2015-09-01- route-to, dup-to, reply-to should not override the block actionAlexandr Nedvedicky
Spotted by Dilli Paudel <dilli ! paudel at oracle ! com> ok jung@, ok mikeb@
2015-09-01the special check logic for /usr/share/nls/../libc.cat became failureTheo de Raadt
to return failure. open() of these paths should succeed to satisfy strerror() and friends. ok semarie
2015-09-01Kill unused ``ia_net'' field in the struct in6_ifaddr, bad copyMartin Pieuchot
paste from the IPv4 time. While here update the comment about ``ia6_ndpr'' it's now only used for autoconf.
2015-09-01Always call readdoslabel() before readgptlabel(). Doubly always call themKenneth R Westerback
in the same order. Fix writedisklabel() to follow these simple rules. ok kettenis@
2015-09-01Increase transfer FIFOs for dwc2, to improve USB performance. The newVisa Hankala
values are from dwc2 of NetBSD. ok jmatthew@, jasper@
2015-09-01Convert ip{,6}_output() (cached) route entry checks to rtisvalid(9).Martin Pieuchot
ok bluhm@
2015-09-01Introduce rtisvalid(9) a function to check if a (cached) route entryMartin Pieuchot
can be used or should be released by rtfree(9). It currently checks if the route is UP and is not attached to a stall ifa. ok bluhm@, claudio@
2015-09-01ditch a few prototypes for non-existant functionsMike Belopuhov
2015-09-01Do not try to find a possible ``ifa'' in rt_ifal_del(9) and trust theMartin Pieuchot
checks done in rtrequest1(9). This chunk has been introduced in 1991 when rtrequest1(RTM_DELETE...) was not doing a route lookup and no longer make any sense. ok bluhm@
2015-09-01Reject USB requests that could damage the bus integrity, just like itMartin Pieuchot
is done in ugen(4). Found by Grant Czajkowski during the GSoC 2015.
2015-09-01Use the correct free(9) size for the RX ring.Martin Pieuchot
ok dlg@, phessler@
2015-09-01Corrects a use-after-free in tame_namei().Sebastien Marie
ok doug@
2015-09-01Sync bus_dmamap_load_raw(9) with amd64/i386 in order to respect theMartin Pieuchot
segement size constraint. Make xhci(4) work on my G5. ok dlg@
2015-09-01Push down the KERNEL_LOCK/KERNEL_UNLOCK calls into the back-end allocatorMark Kettenis
functions. Note that these calls are deliberately not added to the special-purpose back-end allocators in the various pmaps. Those allocators either don't need to grab the kernel lock, are always called with the kernel lock already held, or are only used on non-MULTIPROCESSOR platforms. pk tedu@, deraadt@, dlg@
2015-09-01set sival_ptr before calling trapsignal() for user breakpoint/trace trapsJonathan Gray
ok guenther@
2015-09-01trivial size for free()Theo de Raadt
2015-09-01sizes for free(), mostly related to firmwares.Theo de Raadt
ok dlg
2015-09-01Only advertise the color depth we actually support. This makes theMark Kettenis
xf86-video-wsfb driver work. Map the framebuffer in write-combining mode. This significantly speeds things up. ok yuo@, yasuoka@, deraadt@
2015-09-01free() firmware with right len; ok dlgTheo de Raadt
2015-09-01fairly simple sizes for free()Theo de Raadt
2015-09-01size for free(), and make allocation side look similarTheo de Raadt
2015-09-01Delete bogus MATH_EMULATE holdover from i386Philip Guenther
2015-09-01free() sizeTheo de Raadt
2015-09-01size for free()Theo de Raadt
2015-09-01initialise the width var in db_struct_offset_cmd()Jonathan Gray
ok miod@ deraadt@
2015-09-01missing splxJonathan Gray
ok miod@
2015-09-01missing splxJonathan Gray
ok miod@
2015-09-01dont need the kernel lock for mpsafe bpfs (again)David Gwynne
2015-09-01reintroduce bpf.c r1.121.David Gwynne
this differs slightly from 1.121 in that it uses the new srp_follow() to walk the list of descriptors on an interface. this is instead of interleaving srp_enter() and srp_leave(), which can lead to races and corruption if you're touching the same SRPs at different IPLs on the same CPU. ok deraadt@ jmatthew@
2015-09-01mattieu baptiste reported a problem with bpf+srps where the per cpuDavid Gwynne
hazard pointers were becoming corrupt and therefore panics. the problem turned out to be that bridge_input calls if_input on behalf of a hardware interface which then calls bpf_mtap at splsoftnet, while the actual hardware nic calls if_input and bpf_mtap at splnet. the hardware interrupts ran in the middle of the bpf calls bridge runs at softnet. this means the same srps are being entered and left on the same cpu at different ipls, which led to races because of the order of operations on the per cpu hazard pointers. after a lot of experimentation, jmatthew@ figured out how to deal with this problem without introducing per cpu critical sections (ie, splhigh) calls in srp_enter and srp_leave, and without introducing atomic operations. the solution is to iterate forward through the array of hazard pointers in srp_enter, and backward in srp_leave to clear. if you guarantee that you leave srps in the reverse order to entering them, then you can use the same set of SRPs at different IPLs on the same CPU. the ordering requirement is a problem if we want to build linked data structures out of srps because you need to hold a ref to the current element containing the next srp to use it, before giving up the current ref. we're adding srp_follow() to support taking the next ref and giving up the current one while preserving the structure of the hazard pointer list. srp_follow() does this by reusing the hazard pointer for the current reference for the next ref. both mattieu baptiste and jmatthew@ have been hitting this pretty hard with a tweaked version of srp+bpf that uses srp_follow instead of interleaved srp_enter/srp_leave sequences. neither can reproduce the panics anymore. thanks to mattieu for the report and tests ok jmatthew@
2015-09-01uses sizes for free()Theo de Raadt
2015-09-01a white space krw could not seeTheo de Raadt
2015-09-01'bogous' is bogus spelling of 'bogus' in debug message.Kenneth R Westerback
2015-09-01Missing letoh64() when checking value of gh_lba_alt.Kenneth R Westerback
2015-08-31The pmap_pmap_pool pool will never be used in interrupt context, so pass theMark Kettenis
PR_WAITOK flag to pool_init and pass NULL as the pool allocator. ok mlarkin@
2015-08-31Check driver name in match function such that driver only attempts to attachMark Kettenis
when we actually want it to. ok deraadt@
2015-08-31two fairly simple sizes for free()Theo de Raadt
2015-08-31Consider getfsstat() a RPATH, even though it has no path in it. We mayTheo de Raadt
want to do the same for fstatfs(), after we handle statfs(). These system calls leak path information, however I am reluctant to add a seperate catagory.
2015-08-31In tame mode, return EPERM for *chown if uid/gid change is not towardsTheo de Raadt
cr_uid/cr_gid (effective ids). Thus, chown(, -1,-1) should work OK, so should chown(, me, -1), etc. With this commited, more people can test.
2015-08-31Rather than killing when *chmod is asked to do setuid/setgid, clearTheo de Raadt
those bits in the request and continue. This is a better posix-subset to give to programs.
2015-08-31Abstract 5 identical code blocks into a readdisksector() function.Kenneth R Westerback
Cleaner, clearer and less error prone. Tested by bmercer@ as part of a larger diff, of which this is the last part. reads ok to jsing@ kettenis@. ok deraadt@.
2015-08-31Rejig the the expression calculating of the address of the diskKenneth R Westerback
sector containing the disklabel, eliminating an unnecessary " * DL_BLKSPERSEC()". Tested by bmercer@ as part of larger diff. Idea from & reads ok to jsing@. ok kettenis@.
2015-08-31The return value of nd6_cache_lladdr() is never used so make it a void.Martin Pieuchot
Fewer "struct rtentry" left in the wild!
2015-08-31Do not install connected routes on loopback interfaces.Martin Pieuchot
Previously loopback connected routes were managed via the global list of prefixes, which mean that systems with AUTOCONF'd addresses did not see them in the routing table. This also makes inet6 route creation coherent with inet.
2015-08-31Use one xfer per pipe instead of doing an alloc/free dance for everyMartin Pieuchot
usbd_transfer(9). This fixes a use-after-free. Bug found by and diff from John L. Scarfone <john AT scarfone DOT net>
2015-08-31Compute the checksum before looping back the copy of a multicast packet.Martin Pieuchot
Found while comparing IPv4 and IPv6 versions. ok naddy@