mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] x86: test case for the RODATA config option
Date: Wed, 23 Jan 2008 01:04:59 +0100	[thread overview]
Message-ID: <20080123000459.GB16576@elte.hu> (raw)
In-Reply-To: <20080122144420.4ebcf95f@laptopd505.fenrus.org>


cool!

could you perhaps also do an add-on:

> +	/* test 1: read the value */
> +	/* test 2: write to the variable; this should fault */
> +	/* test 3: check the value hasn't changed */

           test 4: make it writable again
           test 5: make it NX -> check that it's not executable

and perhaps also check that normal kernel allocations (kmalloc(), etc.) are NX as well? (with the same section trick you use in 
this patch - perhaps try to call a kmalloc()-ed buffer that contains a 
'ret' instruction - if that call faults then the test is OK, if the call 
succeeds then the test failed.)

	Ingo

  reply	other threads:[~2008-01-23  0:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22 22:44 Arjan van de Ven
2008-01-23  0:04 ` Ingo Molnar [this message]
2008-01-23  1:11 ` Nick Piggin
2008-01-23  5:29   ` Arjan van de Ven
2008-01-23  9:09 ` Andi Kleen
2008-01-23 14:49   ` Arjan van de Ven
2008-01-23 15:27     ` Andi Kleen
2008-01-23 16:04       ` Arjan van de Ven
2008-01-23 16:54         ` Andi Kleen
2008-01-23 17:49           ` Arjan van de Ven

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=20080123000459.GB16576@elte.hu \
    --to=mingo@elte.hu \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®