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]
Message-Id: <200803131035.11943.rusty@rustcorp.com.au>
Date:	Thu, 13 Mar 2008 10:35:11 +1100
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	virtualization@...ts.linux-foundation.org
Cc:	Martin Schwidefsky <schwidefsky@...ibm.com>,
	linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
	virtualization@...ts.osdl.org, akpm@...l.org,
	nickpiggin@...oo.com.au, frankeh@...son.ibm.com, hugh@...itas.com
Subject: Re: [patch 4/6] Guest page hinting: writable page table entries.

On Thursday 13 March 2008 00:21:36 Martin Schwidefsky wrote:
> Index: linux-2.6/fs/exec.c
> ===================================================================
> --- linux-2.6.orig/fs/exec.c
> +++ linux-2.6/fs/exec.c
> @@ -51,6 +51,7 @@
>  #include <linux/tsacct_kern.h>
>  #include <linux/cn_proc.h>
>  #include <linux/audit.h>
> +#include <linux/page-states.h>
>
>  #include <asm/uaccess.h>
>  #include <asm/mmu_context.h>

I haven't compile-tested, but this seems unnecessary; it's the only change to 
this file.

> +/**
> + * __page_reset_writable() - clear the PageWritable bit
> + *
> + * @page: the page
> + */
> +void __page_reset_writable(struct page *page)
> +{
> +	preempt_disable();
> +	if (!page_test_set_state_change(page)) {
> +		ClearPageWritable(page);
> +		page_clear_state_change(page);
> +	}
> +	preempt_enable();
> +}
> +EXPORT_SYMBOL(__page_reset_writable);

If I understand correctly, you don't bother resetting the writable bit if you 
don't get the state_change lock.  Is this best effort, or is there some 
correctness issue here?

Cheers,
Rusty.
--
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