Age | Commit message (Collapse) | Author | |
---|---|---|---|
2018-04-28 | Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is always | Visa Hankala | |
curproc that does the locking or unlocking, so the proc parameter is pointless and can be dropped. OK mpi@, deraadt@ | |||
2018-02-19 | Remove almost unused `flags' argument of suser(). | Martin Pieuchot | |
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@ | |||
2017-12-30 | Don't pull in <sys/file.h> just to get fcntl.h | Philip Guenther | |
ok deraadt@ krw@ | |||
2017-07-19 | Avoid additional div0 in case both ntracks & nsectors passed in | Theo de Raadt | |
via ioctl are 0. Noticed by bluhm ok bluhm millert | |||
2017-07-19 | Avoid division by zero of vnd_secsize | Theo de Raadt | |
Found by Ilja Van Sprundel ok claudio kettenis | |||
2017-01-21 | p_comm is the process's command and isn't per thread, so move it from | Philip Guenther | |
struct proc to struct process. ok deraadt@ kettenis@ | |||
2016-12-14 | Kill compat for old VNDIOCSET; ok deraadt@ | Jeremie Courreges-Anglas | |
2016-11-12 | Revert unrelated bits that snuck in previous. | Jeremie Courreges-Anglas | |
2016-11-12 | Bump VNDNLEN from 90 to 1024 bytes, to avoid "VNDIOCSET: File name too long" | Jeremie Courreges-Anglas | |
Introduce a new ioctl for VNDIOCSET, the old ioctl will stay around for a bit to cope with old vnconfig/mount_vnd. ok deraadt@ | |||
2016-10-08 | Various printf claim to report the PID, so actually report that and not the TID | Philip Guenther | |
ok kettenis@ tedu@ | |||
2016-03-19 | Remove the unused flags argument from VOP_UNLOCK(). | natano | |
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt | |||
2015-08-26 | Simple size for free(). These are a pleasure to convert when the | Theo de Raadt | |
allocation is clearly spelled out as ptr = malloc(sizeof(*ptr), ...) | |||
2015-08-25 | obvious sizes for free() | Theo de Raadt | |
2014-12-13 | yet more mallocarray() changes. | Doug Hogan | |
ok tedu@ deraadt@ | |||
2014-10-17 | convert old b functions to mem functions | Ted Unangst | |
2014-07-12 | add a size argument to free. will be used soon, but for now default to 0. | Ted Unangst | |
after discussions with beck deraadt kettenis. | |||
2013-11-12 | Use %llu+DL_GETPSIZE() to show partition size. Replace %li+(long) with | Kenneth R Westerback | |
%u for u_int32_t d_secsize. | |||
2013-11-01 | Sprinkle (long long) casts where %lld is being used to print daddr_t | Kenneth R Westerback | |
variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@ | |||
2013-06-11 | final removal of daddr64_t. daddr_t has been 64 bit for a long enough | Theo de Raadt | |
test period; i think 3 years ago the last bugs fell out. ok otto beck others | |||
2011-08-26 | Add a dmesg warning about sloppy disk I/O to vnd(4) devices to help | Matthew Dempsky | |
identify bad distrib scripts/tools. ok deraadt@ | |||
2011-07-18 | Revert vnd(4) to its older less strict behavior. | Matthew Dempsky | |
Verified by deraadt@ to fix distrib/sgi/iso. | |||
2011-07-12 | Range check vnd_secsize, vnd_ntracks, and vnd_nsectors so that later on | Theo de Raadt | |
they do not get integer truncated on 64-bit machines. ok matthew | |||
2011-07-08 | Ack, my last change used size_t for file offsets, but size_t is only | Matthew Dempsky | |
32-bit on 32-bit architectures; we need off_t to support >4GB vnd(4) images. Discovered by, tested, and ok bluhm@ | |||
2011-07-08 | Refactor vnd(4) to use vn_rdwr() instead of setting up the uio/iovec | Matthew Dempsky | |
structs and calling vn_lock+VOP_READ/WRITE+VOP_UNLOCK. | |||
2011-07-08 | Validate DISKUNIT(dev) in vndstrategy() like we do in other | Matthew Dempsky | |
xxstrategy() methods, and punt in validating it in vndread() and vndwrite() (also like we do in other xx{read,write}() methods...). | |||
2011-07-08 | Add a vndencryptbuf() function, and refactor vndstrategy() slightly to | Matthew Dempsky | |
use it instead. | |||
2011-07-06 | vndsize() can just return -1; we don't support swapping to vnd | Matthew Dempsky | |
anymore. | |||
2011-07-06 | Compact the vnd sc_flags bits. | Matthew Dempsky | |
ok krw@ | |||
2011-07-06 | Eliminate some sanity checks in vndstrategy() that are now handled by | Matthew Dempsky | |
bounds_check_with_label(). | |||
2011-07-06 | vndstrategy() should fail if VNF_HAVELABEL isn't set. This simplifies | Matthew Dempsky | |
the logic slightly and makes vnd(4) more like any other disk driver. To avoid races, this means vndopen() can only set VNF_HAVELABEL if dk_openmask == 0. Otherwise, it's possible for userspace to open rvnd0c, call VNDIOCSET, open vnd0a, then while vndreaddisklabel() (via vndstrategy) is waiting for VOP_READ() to finish, you could issue a read or write on the still open rvnd0c and have VNF_HAVELABEL set but the disklabel might be in a weird state. Note that this makes VNF_HAVELABEL nicely analogous to sd(4)/cd(4)'s SDEV_MEDIA_LOADED flag, which is handled similarly in {sd,cd}{open,close,strategy}. ok dlg@, krw@, deraadt@ | |||
2011-07-06 | Eliminate redundant buf validation checks in xxstrategy() methods now | Matthew Dempsky | |
that they're implemented consistently in bounds_check_with_label(). Also, per krw's request, change bounds_check_with_label() to return 0 if the checks succeed, and change the drivers to test == -1 instead of <= 0. (Man page update to follow; intentionally omitting arch/vax/mba/hp.c from this commit because it doesn't even build currently and miod@ promises to kill it soon.) ok krw@ | |||
2011-07-04 | move the specfs code to a place people can see it; ok guenther thib krw | Theo de Raadt | |
2011-07-03 | Cleanup vnd(4) a bit now that it only has one mode of operation and | Matthew Dempsky | |
uses standard disk device numbering. ok deraadt@ | |||
2011-07-03 | Fix vnd(4) support for read-only files. We can't clear sc_flags | Matthew Dempsky | |
before closing the vnode, because VNDRW() checks for the VNF_READONLY bit and the vnode layer doesn't like it when you close a read-only vnode with FREAD|FWRITE. ok deraadt@ | |||
2011-06-30 | Refactor some common open/close/detach disk driver code into | Matthew Dempsky | |
subr_disk.c. For now just the MI disk drivers. ok deraadt@, krw@; jsing@ liked the approach too | |||
2011-06-21 | looks like the disk_lock method actually does work | Theo de Raadt | |
2011-06-20 | explicit_bzero for the crypto key | Ted Unangst | |
2011-06-20 | for now, move back to a private rw_lock rather than the disk_lock. | Theo de Raadt | |
we have problems with instantiating new disks ok matthew | |||
2011-06-19 | Use disk_lock_nointr() in the xxclose() routines so that they cannot | Theo de Raadt | |
be interrupted. ok matthew | |||
2011-06-19 | Use disk_lock/disk_unlock directly and in the same way in these drivers, | Theo de Raadt | |
rather than using various wrappings. Convert vnd to using the sc_dk rwlock instead of using one of its own. ok matthew | |||
2011-06-19 | and in debug code, too | Theo de Raadt | |
2011-06-19 | stop trying to be clever with the softc name | Theo de Raadt | |
2011-06-09 | shorted code with a lovely goto | Theo de Raadt | |
ok matthew | |||
2011-06-05 | Drop kernel support for the useless DIOCWLABEL ioctl and prune a lot | Matthew Dempsky | |
of silly flag twiddling code in various disk drivers. ok deraadt@, miod@ N.B., users will need a -current disklabel(8) to be able to write new disklabels to disk now. | |||
2011-06-03 | Get rid of the wlabel argument to bounds_check_with_label(). It's | Matthew Dempsky | |
never done anything in OpenBSD and just clutters disk drivers with silly flag handling. More cleanup to follow. ok deraadt@, millert@; no objections krw@ | |||
2011-06-02 | No need to set error to 0, when it is still 0 from the start of the function. | Theo de Raadt | |
ok thib matthew | |||
2011-06-02 | The vndbufpl is no longer used. | Theo de Raadt | |
Spotted by matthew, verified by me. | |||
2011-06-02 | Initialize the dv_xname at attach time, so that we don't have to do | Theo de Raadt | |
this work later. Since the disk always has the same name (the different between svnd and vnd went away), we don't need to do this late anymore. Spotted with matthew. | |||
2011-06-02 | In vndclear(), clear all the flag bits. Leaving around a VNF_WLABEL bit | Theo de Raadt | |
is stupid (verified to be the case). Other flag bits might have lived longer than they should as well, with unknown consequences. Spotted with matthew, too. | |||
2011-06-02 | Initialize the dv_unit, because disk_attach will want it later. Before | Theo de Raadt | |
we were probably only ever reading labels off vnd0. Oops. Spotted by matthew |