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: <1422396079.2493.62.camel@misato.fc.hp.com>
Date:	Tue, 27 Jan 2015 15:01:19 -0700
From:	Toshi Kani <toshi.kani@...com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	hpa@...or.com, tglx@...utronix.de, mingo@...hat.com, arnd@...db.de,
	linux-mm@...ck.org, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 2/7] lib: Add huge I/O map capability interfaces

On Tue, 2015-01-27 at 13:37 -0800, Andrew Morton wrote:
> On Mon, 26 Jan 2015 18:01:55 -0700 Toshi Kani <toshi.kani@...com> wrote:
> 
> > > >  static int ioremap_pte_range(pmd_t *pmd, unsigned long addr,
> > > >  		unsigned long end, phys_addr_t phys_addr, pgprot_t prot)
> > > >  {
> > > > @@ -74,6 +112,12 @@ int ioremap_page_range(unsigned long addr,
> > > >  	unsigned long start;
> > > >  	unsigned long next;
> > > >  	int err;
> > > > +	static int ioremap_huge_init_done;
> > > > +
> > > > +	if (!ioremap_huge_init_done) {
> > > > +		ioremap_huge_init_done = 1;
> > > > +		ioremap_huge_init();
> > > > +	}
> > > 
> > > Looks hacky.  Why can't we just get the startup ordering correct?  It
> > > at least needs a comment which fully explains the situation.
> > 
> > How about calling it from mm_init() after vmalloc_init()?  
> > 
> > void __init mm_init(void)
> > 		:
> >         percpu_init_late();
> >         pgtable_init();
> >         vmalloc_init();
> > +       ioremap_huge_init();
> >  }
> 
> Sure, that would be better, assuming it can be made to work.

Yes, I verified that ioremap() works right after this point.

> Don't forget to mark ioremap_huge_init() as __init.

Right.

Thanks,
-Toshi


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