summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
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@
2015-08-31`encif' should only be used under #ifdef NPF.Martin Pieuchot
Reported by jsg@, ok deraadt@
2015-08-31Use PR_WAITOK to indicate that pools are not used in interrupt contextMark Kettenis
instead of using pool_allocator_nointr. ok tedu@
2015-08-31Enable efifb(4).YASUOKA Masahiko
ok deraadt kettenis
2015-08-31spaces snuck inTheo de Raadt
2015-08-31KNFTheo de Raadt
2015-08-30Automatically perform traces upon panic. Shrink message aboutTheo de Raadt
reporting bugs to pointing at http://www.openbsd.org/ddb.html, because vertical space becomes more precious. ok beck krw kettenis
2015-08-30Don't try to attach efifb(4) on non-UEFI boots.Mark Kettenis
ok miod@, deraadt@
2015-08-30In readgptlabel() avoid pointless conversions from sector countsKenneth R Westerback
to daddr_t counts and back again. And rename 'part_blkno' to 'sector' to mirror readdoslabel() changes and make code clearer. Reads ok to jsing@ and kettenis@. Tested by bmercer@ as part of larger diff.
2015-08-30The pmap_pmap_pool pool will never be used in interrupt context, so pass theMark Kettenis
PR_WAITOK flag to pmap_init and pass NULL as the pool allocator.
2015-08-30The pmap_pool pool will never be used in interrupt context, so pass theMark Kettenis
PR_WAITOK flag to pmap_init and pass NULL as the pool allocator.
2015-08-30Eliminate a couple of extraneous DL_SECTOBLK() calls.Kenneth R Westerback
The disklabel is either 0 bytes into a 512-byte disk sector, or 512 bytes into a larger disk sector. The address of the disk sector read is irrelevant. Pointed out by jsing@ I think. ok deraadt@
2015-08-30Use a global table for domains instead of building a list at run time.Martin Pieuchot
As a side effect there's no need to run if_attachdomain() after the list of domains has been built. ok claudio@, reyk@
2015-08-30Provide remaining arch with END() macro for setting calculated size onPhilip Guenther
symbols in ASM ok deraadt@ mpi@
2015-08-30Modify kernel to prepare boot from UEFI.YASUOKA Masahiko
- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI - Make bios(4) and acpi(4) be able to probe with the parameters from UEFI - Add efifb(8). It uses the framebuffer from UEFI and it will work as a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by the kernel config for this moment input and ok kettenis
2015-08-30Enable xhci(4) now that it attaches correctly on my G5.Martin Pieuchot
2015-08-30Map the whole config1 space based on the size read from theMartin Pieuchot
device-tree. With this change, supplementary PCIe cards are now properly detected. This should prevents the kernel from faulting when reading unmapped PCI addresses as reported by Donovan Watteau on ppc@. ok kettenis@
2015-08-30Add the number of midi ports to the card description, and use it toAlexandre Ratchov
prevent cards with no midi connectors from attaching midi(4) devices.
2015-08-30For *chmod, allow S_ISTXT in tame mode. I am evaluating what toTheo de Raadt
do about S_ISUID and SISGID... maybe we should mask them and allow the operation to happen?
2015-08-30size for free(); ok krwTheo de Raadt
2015-08-30Keep track of a length for free() in error paths. Be careful,Theo de Raadt
because the nfsm_strsiz() macro sneakily modifies a parameter! ok beck
2015-08-30Track rom size, for free()Theo de Raadt
2015-08-29correct size for free()Theo de Raadt
2015-08-29fix ugly indents; no harmful macros harmedTheo de Raadt
2015-08-29sizes for free(); ok guentherTheo de Raadt
2015-08-29firmware sizes are known; use them for free()Theo de Raadt
2015-08-29video sub-drivers will not return EINVAL in size variable. (Well,Theo de Raadt
a broken USB driver could, then what happens?) 0 is the right error. Also, keep track the size for free()
2015-08-29In readgptlabel() the block offsets of the GPT header and GPT partitionKenneth R Westerback
entries within a disk sector are always 0. i.e. both must start on a sector boundary. So stop calculating the offset value and adding it to b_data when pulling data out of the buf. Part of larger refactoring, eyed by jsing@, tested by bmercer@ as part of that larger diff.
2015-08-29Set the rx mbuf size to MCLBYTES + ETHER_ALIGN for strict alignmentMark Kettenis
architectures to communicate better what size is needed to mclgeti. Makes ix(4) consistent with em(4). ok mikeb@, dlg@
2015-08-29use correct size for free(9), problem reported by Theo Buehler, ok kettenisStuart Henderson