lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 Nov 2007 22:54:18 +0200
From:	pageexec@...email.hu
To:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
CC:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [patch 06/11] Text Edit Lock - Alternative code for x86

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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ