DragonFly kernel List (threaded) for 2007-03
DragonFly BSD
DragonFly kernel List (threaded) for 2007-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Path passed to ffs_mount() is garbage?


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Thu, 22 Mar 2007 12:21:03 +0100

Matthew Dillon wrote:
:So I take my first foray into the dragonfly kernel and do this to
:ffs_mount() in /usr/src/sys/vfs/ufs/ffs_vfsops.c: I merely add a
:
: kprintf("ffs_mount to %s\n",((path == NULL) ? "(NULL)" : path));
:
:as the very first line of code (past the declarations of course).
:When I test this by starting up my vkernel, if path is non-null, it
:points to garbage data. :
:I'm probably being naive here, what am I missing?
path is passed from userland. Its a userland pointer. It shouldn't
be garbage, but you probably need to do a copyin() into a kernel
buffer instead of printing it directly. Actually, I'm a little at a loss because on the PC architecture the pointer should still be
printable (if a bit dangerous due to being a userland address).

yah, but not for vkernels... the vmspace is different :/ makes it also a bitch to debug


cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]