From: pageexec@freemail.hu
To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: [patch 06/11] Text Edit Lock - Alternative code for x86
Date: Tue, 13 Nov 2007 22:54:18 +0200 [thread overview]
Message-ID: <473A2B1A.16967.38D5698D@pageexec.freemail.hu> (raw)
In-Reply-To: <20071113184719.506949138@polymtl.ca>
On 13 Nov 2007 at 13:46, Mathieu Desnoyers wrote:
> +void *text_poke_early(void *addr, const void *opcode, size_t len)
> +{
> + memcpy(addr, opcode, len);
> + text_sync(addr, len);
> + return addr;
> +}
why do you need this function (vs. using text_poke throughout)?
> +#define kernel_wp_save(cr0) \
> + do { \
> + preempt_disable(); \
> + cr0 = read_cr0(); \
> + if (cpu_data(smp_processor_id()).wp_works_ok) \
why do you need this test? if cr0.wp is ineffective, then it doesn't
matter whether it's on or off (in fact, at least the intel manual
says that 386s would not even let you change its value, they'll
silently ignore attempts of setting the wp bit).
> + write_cr0(cr0 & ~X86_CR0_WP); \
> + } while (0)
> +
> +#define kernel_wp_restore(cr0) \
> + do { \
> + if (cpu_data(smp_processor_id()).wp_works_ok) \
ditto...
> + write_cr0(cr0); \
> + preempt_enable(); \
> + } while (0)
>
> #endif /* _I386_ALTERNATIVE_H */
next prev parent reply other threads:[~2007-11-13 22:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 18:46 [patch 00/11] Text Edit Lock Mathieu Desnoyers
2007-11-13 18:46 ` [patch 01/11] Kprobes - use a mutex to protect the instruction pages list Mathieu Desnoyers
2007-11-13 18:46 ` [patch 02/11] Kprobes - do not use kprobes mutex in arch code Mathieu Desnoyers
2007-11-13 18:46 ` [patch 03/11] Kprobes - declare kprobe_mutex static Mathieu Desnoyers
2007-11-13 18:46 ` [patch 04/11] Add INIT_ARRAY() to kernel.h Mathieu Desnoyers
2007-11-13 18:46 ` [patch 05/11] Text Edit Lock - Architecture Independent Code Mathieu Desnoyers
2007-11-13 18:46 ` [patch 06/11] Text Edit Lock - Alternative code for x86 Mathieu Desnoyers
2007-11-13 20:54 ` pageexec [this message]
2007-11-13 22:10 ` Mathieu Desnoyers
2007-11-14 1:42 ` [patch 06/11] Text Edit Lock - Alternative code for x86 (updated) Mathieu Desnoyers
2007-11-13 18:46 ` [patch 07/11] Text Edit Lock - kprobes architecture independent support Mathieu Desnoyers
2007-11-13 18:46 ` [patch 08/11] Text Edit Lock - kprobes x86_32 Mathieu Desnoyers
2007-11-13 18:46 ` [patch 09/11] Text Edit Lock - kprobes x86_64 Mathieu Desnoyers
2007-11-13 18:46 ` [patch 10/11] Text Edit Lock - x86_32 standardize debug rodata Mathieu Desnoyers
2007-11-13 18:46 ` [patch 11/11] Text Edit Lock - x86_64 " Mathieu Desnoyers
2007-12-06 2:02 [patch 00/11] Text Edit Lock for 2.6.24-rc4-git3 Mathieu Desnoyers
2007-12-06 2:02 ` [patch 06/11] Text Edit Lock - Alternative code for x86 Mathieu Desnoyers
2007-12-06 12:19 ` pageexec
2007-12-06 14:21 ` Mathieu Desnoyers
2007-12-06 14:44 ` Mathieu Desnoyers
2007-12-06 13:58 ` pageexec
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=473A2B1A.16967.38D5698D@pageexec.freemail.hu \
--to=pageexec@freemail.hu \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
/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®