Russell King wrote:
On Fri, Aug 12, 2005 at 08:21:45PM +0200, [EMAIL PROTECTED] wrote:

@@ -632,10 +632,11 @@ static inline int page_mapped(struct pag
 * Used to decide whether a process gets delivered SIGBUS or
 * just gets major/minor fault counters bumped up.
 */
-#define VM_FAULT_OOM   (-1)
-#define VM_FAULT_SIGBUS        0
-#define VM_FAULT_MINOR 1
-#define VM_FAULT_MAJOR 2
+#define VM_FAULT_OOM           (-1)
+#define VM_FAULT_SIGBUS                0
+#define VM_FAULT_MINOR         1
+#define VM_FAULT_MAJOR         2
+#define VM_FAULT_SIGSEGV       3

#define offset_in_page(p)       ((unsigned long)(p) & ~PAGE_MASK)



Please arrange for "success" values to be numerically larger than "failure"
values.  This will avoid breaking ARM.

Is there a reason why we don't use -ve numbers for failure and +ve for
success here?


Well there is now, and that is we are now using a bit in the 2nd
byte as flags. So I had to do away with -ve numbers there entirely.

You could achieve a similar thing by using another bit in that byte
#define VM_FAULT_FAILED 0x20
and make that bit present in VM_FAULT_OOM and VM_FAULT_SIGBUS, then
do an unlikely test for that bit in your handler and branch away to
the slow path.

--
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to