plan9fox/sys/src/9/port
cinap_lenrek 12fa017f3f devproc: fix fishy locking in proctext(), check proc validity, static functions
the locking in proctext() is wrong. we have to acquire Proc.seglock
when reading segments from Proc.seg[] as segments do not
have a private freelist and can therefore be reused for other
data structures.

once we have Proc.seglock acquired, check that the process pid
is still valid so we wont accidentally read some other processes
segments. (for both proctext() and procctlmemio()). this also
should give better error message to distinguish the case when
the process did segdetach() the segment in question before we
could acquire Proc.seglock.

declare private functions as static.
2019-09-21 16:36:40 +02:00
..
alarm.c kernel: make sure procalarm() remaining time doesnt become negative 2016-09-08 01:28:34 +02:00
alloc.c libc: move calloc() into its own compilation unit 2016-11-05 18:00:10 +01:00
allocb.c kernel: fix allocb for BLOCKALIGN*2 >= Hdrspc 2018-10-20 19:52:54 +02:00
aoe.h aoe: updating aoe driver from erik quanstros 9atom 2013-05-01 18:50:07 +02:00
audioif.h audiohda: first attempt on audio recording support for intel hda audio, distinguish mode in audio code 2013-01-19 01:12:39 +01:00
auth.c kernel: make fversion()/mntversion() types consistent 2016-03-10 03:02:28 +01:00
cache.c kernel: make the mntcache robust against fileserver like fossil that do not change the qid.vers on wstat 2017-01-12 20:13:20 +01:00
chan.c kernel: get rid of tmperrbuf and use syserrstr swapping instead in namec() 2019-09-04 02:44:39 +02:00
cis.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
dev.c kernel: stop the practice of passing DMDIR to devir() perm argument 2018-06-03 23:33:35 +02:00
devaoe.c devaoe: really fix unit numbering, to be 0-based 2018-08-06 09:41:28 -07:00
devaudio.c kernel: properly handle bad attach specifiers 2018-02-25 17:11:18 +01:00
devbridge.c devbridge: fix runt packets going through the bridge (thanks cinap) 2018-11-17 17:23:56 -08:00
devcap.c devcap: timeout capabilities after a minute, fix memory leak, paranoia 2016-09-07 21:14:23 +02:00
devcons.c devvga: re-render text from kmesg after resize 2017-11-26 04:49:30 +01:00
devdraw.c devdraw: get rid of softscreen==0xa110c hack and make attachscreen() return Memdata* 2019-01-30 18:22:52 +01:00
devdtracy.c devdtracy: make machlocks and dtktab static 2019-06-14 10:30:50 +02:00
devdup.c kernel: stop the practice of passing DMDIR to devir() perm argument 2018-06-03 23:33:35 +02:00
devenv.c devenv: make #ec files not show up as world writable 2018-06-03 23:30:05 +02:00
devether.c kernel: properly handle bad attach specifiers 2018-02-25 17:11:18 +01:00
devflash.c kernel: properly handle bad attach specifiers 2018-02-25 17:11:18 +01:00
devfs.c kernel: stop the practice of passing DMDIR to devir() perm argument 2018-06-03 23:33:35 +02:00
devkprof.c kernel: apply uintptr for ulong when a pointer is stored 2014-01-20 00:47:55 +01:00
devloopback.c devloopback: reassign device letter from #X to #λ to avoid collision with devvmx 2018-02-25 19:06:37 +01:00
devmnt.c devmnt: make sure auth chan is on said conection in mntattach() 2018-07-16 01:35:02 +02:00
devmouse.c devmouse: produce signed msec timestamp in /dev/mouse, accept unsigned on write 2018-07-23 19:29:15 +02:00
devpipe.c kernel: stop the practice of passing DMDIR to devir() perm argument 2018-06-03 23:33:35 +02:00
devpnp.c kernel: fix more malloc/smalloc errors 2011-12-12 19:17:58 +01:00
devproc.c devproc: fix fishy locking in proctext(), check proc validity, static functions 2019-09-21 16:36:40 +02:00
devroot.c provide /n and /mnt early in bootrc to allow consistent use in /lib/namespace 2016-02-14 01:42:32 +01:00
devsd.c devsd: fix sddelpart() AGAIN 2019-04-16 16:25:33 +02:00
devsdp.c kernel: properly handle bad attach specifiers 2018-02-25 17:11:18 +01:00
devsegment.c kernel: stop the practice of passing DMDIR to devir() perm argument 2018-06-03 23:33:35 +02:00
devshr.c kernel: pgrpcpy(), simplify Mount structure 2015-08-09 21:16:10 +02:00
devsrv.c devsrv, devshr: wstat permissions 2013-06-18 22:09:40 +02:00
devssl.c devtls, devssl: avoid ~0UL comparsion (from drawterm) 2017-12-28 19:13:53 +01:00
devswap.c devswap: simplify, don't panic when writing swapfile fails 2019-01-22 22:06:42 +01:00
devtls.c devtls: remove static "already" flag in tlsinit(). this function is only run once. 2019-01-22 22:08:07 +01:00
devuart.c devuart: make sure uart is enabled in uartkick() 2019-07-11 07:45:34 +02:00
devusb.c devusb: use Enotconf[] string constant 2018-10-20 19:41:37 +02:00
devwd.c kernel: fix more malloc/smalloc errors 2011-12-12 19:17:58 +01:00
dtracysys.c dtracy: avoid dmachlock() race 2019-03-30 09:17:46 +01:00
dtracytimer.c dtracy: avoid dmachlock() race 2019-03-30 09:17:46 +01:00
ecc.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
edf.c kernel: fix twakeup()/timerdel() race condition 2017-03-29 00:30:53 +02:00
edf.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
error.h kernel: make noswap flag exclude processes from killbig() if not eve, reset noswap flag on exec 2014-08-17 00:50:20 +02:00
etherif.h devether: remove (unimplemented) detach, allow device creation on attach 2018-02-25 03:42:38 +01:00
ethermii.c bcm64: work in progress genet ethernet driver for raspberry pi 4 2019-07-25 09:11:53 +02:00
ethermii.h bcm64: work in progress genet ethernet driver for raspberry pi 4 2019-07-25 09:11:53 +02:00
ethersink.c ethersink: after the experiment, the zeros get dismantled. and then destroyed. 2018-02-12 01:48:20 +01:00
fault.c kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
flashif.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
initcode.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
led.c kernel: fix cb->f[0] nil dereferences due to short control request 2016-05-05 18:54:58 +02:00
led.h merge sd changes from 9atom 2011-07-10 14:14:23 +02:00
lib.h kernel: make exec clear errstr, stop side-channels and truncate on utf8 boundary 2019-09-04 02:40:41 +02:00
log.c kernel: fix more malloc/smalloc errors 2011-12-12 19:17:58 +01:00
master.local Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mkbootrules Some more permissions for kernel compile 2011-03-31 09:06:36 +00:00
mkdevc add dtracy support to mkdevc and enable dtracy with plan9.ini 2018-12-11 07:44:34 +00:00
mkdevlist add experimental pc64 kernel 2014-02-01 10:25:10 +01:00
mkerrstr perms 2011-04-11 15:38:29 +00:00
mkextract perms 2011-04-11 15:38:29 +00:00
mkfile perms 2011-04-11 15:38:29 +00:00
mkfilelist Some more permissions for kernel compile 2011-03-31 09:06:36 +00:00
mkroot perms 2011-04-11 15:38:29 +00:00
mkrootall Some more permissions for kernel compile 2011-03-31 09:06:36 +00:00
mkrootc Some more permissions for kernel compile 2011-03-31 09:06:36 +00:00
mksystab kernel: apply uintptr for ulong when a pointer is stored 2014-01-20 00:47:55 +01:00
mul64fract.c kernel: more (arm) compiler friendly mul64fract() 2016-06-26 15:13:10 +02:00
nandecc.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
netif.c kernel: stop the practice of passing DMDIR to devir() perm argument 2018-06-03 23:33:35 +02:00
netif.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
page.c kernel: get rid of checkpagerefs() debugging 2019-05-01 12:40:27 +02:00
parse.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
pgrp.c kernel: simplify pgrpnote(); moving the note string copying to procwrite() 2019-09-19 02:07:46 +02:00
portclock.c kernel: remove unused static variable "sofar" from timerintr() (thanks mischief) 2018-12-05 03:59:08 +01:00
portdat.h kernel: expose no execute bit to portable mmu code as SG_NOEXEC / PTENOEXEC, add PTECACHED bits 2019-08-26 22:34:38 +02:00
portfns.h kernel: simplify pgrpnote(); moving the note string copying to procwrite() 2019-09-19 02:07:46 +02:00
portmkfile usbxhci: implement portable dma flush operations and move to port/ 2019-07-17 10:30:06 +02:00
print.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
proc.c kernel: clear FPillegal in pexit() and before pprint() 2019-09-08 19:02:01 +02:00
qio.c qio: handle common case in trimblock() 2019-03-03 05:26:09 +01:00
qlock.c kernel: cleanup qlock.c to use nil instead of 0 for pointers 2015-08-02 05:36:35 +02:00
random.c kernel: rekey chacha state on each randomread() invocation 2016-09-11 19:07:17 +02:00
rdb.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
rebootcmd.c bcm64: switch to 64k page size 2019-05-17 18:35:14 +02:00
sd.h emmc: 50MHz highspeed support (from richard miller) 2019-08-25 20:02:53 +02:00
sdaoe.c devaoe: more nil vs. 0 2015-07-23 22:05:46 +02:00
sdloop.c sdloop: hardcode Enotup[] string to avoid devaoe dependency 2014-12-19 02:38:36 +01:00
sdmmc.c emmc: 50MHz highspeed support (from richard miller) 2019-08-25 20:02:53 +02:00
sdram.c kernel: expose no execute bit to portable mmu code as SG_NOEXEC / PTENOEXEC, add PTECACHED bits 2019-08-26 22:34:38 +02:00
sdscsi.c devsd: don't raise Enomem error if sdmalloc() fails, instead wait for the memory to become available 2013-05-19 20:59:55 +02:00
segment.c kernel: prohibit changing cache attributes (SG_CACHED|SG_DEVICE) in segattach(), set SG_RONLY in data2txt() 2019-08-27 06:16:20 +02:00
semaphore.p Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
swcursor.c dont flush screen when hiding software cursor 2014-11-08 11:48:38 +01:00
syscallfmt.c kernel: get rid of PTR2UINT() and UINT2PTR() macros 2019-04-11 13:51:38 +02:00
sysfile.c kernel: fix rewinding in directories with pread() offset 2017-04-30 01:51:07 +02:00
sysproc.c kernel: make exec clear errstr, stop side-channels and truncate on utf8 boundary 2019-09-04 02:40:41 +02:00
taslock.c kernel: include lock pointer in error report, stop spamming lockloop prints when we are panicing 2019-05-01 09:39:02 +02:00
thwack.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
thwack.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
tod.c kernel: remove todfix overflow iprint() spam 2016-01-07 19:37:05 +01:00
ucalloc.c kernel: add portable uncached memory allocator (ucalloc) (from sources) 2013-01-26 17:25:23 +01:00
ucallocb.c kernel: cleanup exit()/shutdown()/reboot() code 2015-11-30 14:56:00 +01:00
unthwack.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
usb.h usbehci: add uframes control request to return uframes one at a time 2018-03-06 17:18:48 +00:00
usbehci.c usbehci: silence "param declared but not used" compiler warning in itdinit()/sitdinit() 2019-09-09 16:58:45 +02:00
usbxhci.c usbxhci: implement portable dma flush operations and move to port/ 2019-07-17 10:30:06 +02:00
wifi.c wifi: fix %.*s format in wifictl 2019-02-25 04:22:03 +01:00
wifi.h wifi: lilu dallas multirate 2018-08-06 23:13:23 +02:00
xalloc.c kernel: ignore last page at the top of virtual kernel address space for xalloc() 2015-06-19 02:45:58 +02:00