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: <alpine.LFD.1.00.0801311720280.9204@apollo.tec.linutronix.de>
Date:	Thu, 31 Jan 2008 17:28:11 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	huang ying <huang.ying.caritas@...il.com>
cc:	"Huang, Ying" <ying.huang@...el.com>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...e.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] x86: add executable mapping support to ioremap

On Thu, 31 Jan 2008, huang ying wrote:

> On Jan 31, 2008 9:00 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> > On Thu, 31 Jan 2008, Huang, Ying wrote:
> >
> > > This patch makes ioremap() can be used to map pages as executable,
> > > this is needed by EFI support.
> >
> > > +extern void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
> > > +                            enum ioremap_mode mode,
> > > +                            enum ioremap_xmode xmode);
> > > +
> >
> > Why do you want to add a new API?
> >
> >     addr = ioremap(phys_addr, len);
> >     set_memory_x(addr);
> >
> > should do what you want already. I think Arjan was not very clear in
> > his reply yesterday.
> 
> In current implementation, change_page_attr() can be used to change
> identity map only.  At least I can find __pa() are used in
> change_page_attr_addr() to get physical address. So I think
> change_page_attr() should be fixed firstly.

There is nothing to fix. It works on virtual addresses. 

The __pa() in change_page_attr_addr() is only used to check for the
high alias mapping of the kernel, but the call to change_page_attr
uses the virtual address.

Thanks,

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