qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] RFC: x86_64 Best way to fix 'cast to pointer from integ


From: Fabrice Bellard
Subject: Re: [Qemu-devel] RFC: x86_64 Best way to fix 'cast to pointer from integer of different size' problems?
Date: Wed, 07 Nov 2007 20:18:06 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070212)

Hi,

Regarding the user memory access, here is my suggestion which should
minimize the changes:

- Keep __put_user() and __get_user() as you did.

- Remove put_user(), get_user(), copy_from_user() and copy_to_user()

- Modify the signal.c code so that it uses __put_user, __get_user and
lock/unlock_user.

- Modify lock_user() so that it automatically does access_ok() and
returns NULL if access_ok() fails.

- Test lock_user/lock_user_struct/... return value explicitely at every
call.

- Fix page_check_range() so that it handles writes to pages containing
code by calling page_unprotect when necessary (the current code can fail
in this case !).

- Suppress no longer needed page_unprotect_range() call in syscall.c.

- Suppress or fix tput/tget macros so that they do access_ok().

Regards,

Fabrice.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]