Re: how can i wipeout swap pages?
On Thu, 25 Oct 2001, Terry Lambert wrote: To do what you want, which is to clean the backing pages, you Yes, i mean cleaning pages in the backing storage. are better off doing it for all freed blocks, not just swap blocks (if someone can read your swap, they can read other data off your unallocated disk blocks from the FS, as well). I clean UFS freed disk blocks, but i don't know how to do it from swap_pager. :( there are some kva to phisical mapping, which i do not understand. So i thought someone could point me how can write block from swap_pager to the disk or where can i read more info (except McKusicks' book and kernel sources). PS. I can make patch, which wipes files(freed blocks) upon deletion for -current, if someone is interested. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
how can i wipeout swap pages?
I'm trying to implement wiping of freed swap pages inside swap_pager. I'm using 2.2-branch, here is my thoughts and steps: I have a (starting) block number of swapped page, i know page size, and i know that i have to use some pool of buffers inside kernel. So i get buffer with getpbuf(), then fill in b_data, b_blkno, b_bcount, b_bufsize, b_proc and b_flags fields and call pbgetvp(swapdev_vp,bp) and VOP_STRATEGY(bp). Then i analize error flag in b_flags and call pbrelvp(bp) and relpbuf(bp). This code was copied from getpages/putpages routines, but it hangs kernel and PC. So i misunderstand something and need help. How can i successfully write down some data to the known block number on the known device from the kernel? Or maybe someone can point me where can i find more information on I/O in kernel? Thank you. PS. I've read -current manpages, but they didn't help me much. :( To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message