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:	Wed, 02 Apr 2008 19:57:34 +0200
From:	Thomas Hellström <thomas@...gstengraphics.com>
To:	Arjan van de Ven <arjan@...ux.intel.com>
CC:	Andi Kleen <andi@...stfloor.org>, Dave Airlie <airlied@...hat.com>,
	linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com
Subject: Re: [PATCH] x86: create array based interface to change page attribute

Arjan van de Ven wrote:
> Thomas Hellström wrote:
>
> > to fix the long standing uc/wc aliasing issue, provided we
>
> I'm not opposed to a real fix. I am opposed to a bad hack.
>
Great. So a real clean fix involves setting all "default" kernel 
mappings either to WC (which will require PAT) or
Unmapped, for a pool of pages used in the graphics tables.

To reduce the number of attribute changes for mappings that are 
frequently switched, and also to reduce the number of clflushes, and to 
avoid waiting for upcoming wc versions of set_memory_xx, I have a strong 
preference for unmapping the pages.

Now is where I need some guidance, because interface design is not my 
strong side. I see three possible ways to do this.

1) Use set_memory_np(). Not desirable since we want to be able to use 
that function on a single mapping, and not imply other semantics.
2) Have the driver try to find out which "default" mappings the kernel 
has set up on a page and call set_memory_np() on each one of them. This 
seems very fragile and ugly even to me.
3) Have code in x86/pageattr.c decide which "default" mappings are 
present on the given pages and set them all as non-present.
In fact, there is already such a function in pageattr.c:

kernel_map_pages(struct page *pages, int numpages, bool enable);

But it's for debugging purposes only, could we use and export a variant 
of this?

I guess I need a hint as to what's considered allowable here, to avoid 
spending a lot of time on something that will in the end get rejected 
anyway.

Thanks,

Thomas





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