All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: blaisorblade@yahoo.it
Cc: akpm@osdl.org, jdike@addtoit.com, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net, mingo@elte.hu
Subject: [uml-devel] Re: [patch 18/39] remap_file_pages protection support: add VM_FAULT_SIGSEGV
Date: Mon, 15 Aug 2005 10:40:22 +0100	[thread overview]
Message-ID: <20050815104022.D19811@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050812182145.DF52E24E7F3@zion.home.lan>; from blaisorblade@yahoo.it on Fri, Aug 12, 2005 at 08:21:45PM +0200

On Fri, Aug 12, 2005 at 08:21:45PM +0200, blaisorblade@yahoo.it 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?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core


-------------------------------------------------------
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

WARNING: multiple messages have this Message-ID (diff)
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: blaisorblade@yahoo.it
Cc: akpm@osdl.org, jdike@addtoit.com, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net, mingo@elte.hu
Subject: Re: [patch 18/39] remap_file_pages protection support: add VM_FAULT_SIGSEGV
Date: Mon, 15 Aug 2005 10:40:22 +0100	[thread overview]
Message-ID: <20050815104022.D19811@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050812182145.DF52E24E7F3@zion.home.lan>; from blaisorblade@yahoo.it on Fri, Aug 12, 2005 at 08:21:45PM +0200

On Fri, Aug 12, 2005 at 08:21:45PM +0200, blaisorblade@yahoo.it 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?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-08-15  9:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 18:21 [uml-devel] [patch 18/39] remap_file_pages protection support: add VM_FAULT_SIGSEGV blaisorblade
2005-08-12 18:21 ` blaisorblade
2005-08-15  9:40 ` Russell King [this message]
2005-08-15  9:40   ` Russell King
2005-08-15 10:12   ` [uml-devel] " Nick Piggin
2005-08-15 10:12     ` Nick Piggin
2005-08-15 10:15     ` [uml-devel] " Russell King
2005-08-15 10:15       ` Russell King
2005-08-15 10:25       ` Russell King
2005-08-23  8:45       ` [uml-devel] " Blaisorblade
2005-08-23  8:45         ` Blaisorblade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050815104022.D19811@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=blaisorblade@yahoo.it \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.