20 Aug 2001 22:06
Re: [TRIVIAL] Warn users about machines with non-working WP bit
Pavel Machek <pavel <at> suse.cz>
2001-08-20 20:06:49 GMT
2001-08-20 20:06:49 GMT
Hi! > >I just get another idea, that might be easier to get right. If > >the only problem is one process changing the mm while another > >process is doing a copy_to_user, we should be able to fix it by > >placing a readlock on the mm while the copy_to_user is in progress. > > > > > Yes, that would work. copy_to_user is never called with the mmap > semaphore locked, i.e. > > #define copy_to_user(...) > down(¤t->mm->mmap_sem); > check_wp_bit(); > real_copy_to_user(); > up(¤t->mm->mmap_sem) > > verify_area would just check that the pointer is below TASK_SIZE, and > the wp bit is checked within copy_to_user(). > > But how many 80386 Linux systems that run the 2.4 kernel exist? Many embedded boxes, I beieve, have modern 386 CPUs. Pavel -- -- Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt, details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
]
Pavel
RSS Feed