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: <20101007084837.GG9891@spritzera.linux.bs1.fc.nec.co.jp>
Date:	Thu, 7 Oct 2010 17:48:37 +0900
From:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org, fengguang.wu@...el.com,
	linux-mm@...ck.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 3/4] HWPOISON: Report correct address granuality for AO
 huge page errors

On Thu, Oct 07, 2010 at 10:45:29AM +0200, Andi Kleen wrote:
> On Thu, Oct 07, 2010 at 05:41:01PM +0900, Naoya Horiguchi wrote:
> > On Thu, Oct 07, 2010 at 09:38:48AM +0200, Andi Kleen wrote:
> > > On Thu, Oct 07, 2010 at 09:31:20AM +0900, Naoya Horiguchi wrote:
> > > > > @@ -198,7 +199,8 @@ static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno,
> > > > >  #ifdef __ARCH_SI_TRAPNO
> > > > >  	si.si_trapno = trapno;
> > > > >  #endif
> > > > > -	si.si_addr_lsb = PAGE_SHIFT;
> > > > > +	order = PageCompound(page) ? huge_page_order(page) : PAGE_SHIFT;
> > > >                                                      ^^^^
> > > >                                      huge_page_order(page_hstate(page)) ?
> > > 
> > > Ok.
> > 
> > order seems to represent a least significant bit of corrupted address,
> > so is huge_page_order() + PAGE_SHIFT or huge_page_shift() correct?
> 
> Both I guess.
> 
> > And since @page can be a tail page, compound_head() is needed as Wu-san pointed out.
> > So huge_page_shift(page_hstate(compound_head(page))) looks good for me.
> 
> I used compound_order(compound_head(page)) + PAGE_SHIFT now.
> This even works for non compound, so the special case check
> can be dropped.

OK.

Thanks,
Naoya Horiguchi
--
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