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: <20151116092242.26474f89@gandalf.local.home>
Date:	Mon, 16 Nov 2015 09:22:42 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	yalin wang <yalin.wang2010@...il.com>
Cc:	Vlastimil Babka <vbabka@...e.cz>, Ingo Molnar <mingo@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ebru Akagunduz <ebru.akagunduz@...il.com>,
	Rik van Riel <riel@...hat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	jmarchan@...hat.com, mgorman@...hsingularity.net,
	willy@...ux.intel.com, linux-kernel <linux-kernel@...r.kernel.org>,
	linux-mm@...ck.org
Subject: Re: [PATCH V4] mm: fix kernel crash in khugepaged thread

On Mon, 16 Nov 2015 09:35:53 +0800
yalin wang <yalin.wang2010@...il.com> wrote:

> > On Nov 13, 2015, at 22:01, Steven Rostedt <rostedt@...dmis.org> wrote:
> > 
> > On Fri, 13 Nov 2015 19:54:11 +0800
> > yalin wang <yalin.wang2010@...il.com> wrote:
> >   
> >>>>> 	TP_fast_assign(
> >>>>> 		__entry->mm = mm;
> >>>>> -		__entry->pfn = pfn;
> >>>>> +		__entry->pfn = page_to_pfn(page);    
> >>>> 
> >>>> Instead of the condition, we could have:
> >>>> 
> >>>> 	__entry->pfn = page ? page_to_pfn(page) : -1;    
> >>> 
> >>> I agree. Please do it like this.    
> > 
> > hmm, pfn is defined as an unsigned long, would -1 be the best.
> > Or should it be (-1UL).
> > 
> > Then we could also have:
> > 
> >        TP_printk("mm=%p, scan_pfn=0x%lx%s, writable=%d, referenced=%d, none_or_zero=%d, status=%s, unmapped=%d",
> >                __entry->mm,
> >                __entry->pfn == (-1UL) ? 0 : __entry->pfn,
> > 		__entry->pfn == (-1UL) ? "(null)" : "",
> > 
> > Note the added %s after %lx I have in the print format.
> > 
> > -- Steve  
> it is not easy to print for perf tools in userspace ,
> if you use this format ,
> for user space perf tool, it print the entry by look up the member in entry struct by offset ,
> you print a dynamic string which user space perf tool don’t know how to print this string .

Have you tried it? It should work. If not, I'll fix it. The string
"null" is exported in the trace output file, and perf should have
enough information to know how to handle that. If it fails to parse, I
can easily fix it.

Remember, I'm the author of the parsing of events in userspace.

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