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: <20150320103139.1f5e79ea@gandalf.local.home>
Date:	Fri, 20 Mar 2015 10:31:39 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Stefan Strogin <s.strogin@...tner.samsung.com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Michal Nazarewicz <mina86@...a86.com>,
	aneesh.kumar@...ux.vnet.ibm.com,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Dmitry Safonov <d.safonov@...tner.samsung.com>,
	Pintu Kumar <pintu.k@...sung.com>,
	Weijie Yang <weijie.yang@...sung.com>,
	Laura Abbott <lauraa@...eaurora.org>,
	SeongJae Park <sj38.park@...il.com>,
	Hui Zhu <zhuhui@...omi.com>, Minchan Kim <minchan@...nel.org>,
	Dyasly Sergey <s.dyasly@...sung.com>,
	Vyacheslav Tyrtov <v.tyrtov@...sung.com>,
	Aleksei Mateosian <a.mateosian@...sung.com>,
	gregory.0xf0@...il.com, sasha.levin@...cle.com, gioh.kim@....com,
	pavel@....cz, stefan.strogin@...il.com,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v4 1/5] mm: cma: add trace events to debug
 physically-contiguous memory allocations

On Fri, 20 Mar 2015 13:46:39 +0300
Stefan Strogin <s.strogin@...tner.samsung.com> wrote:
 
> Ah, thanks, I see. So will this solve the described issue?
> +	TP_fast_assign(
> +		__entry->page = page;
> +		__entry->pfn = page_to_pfn(__entry->page) : 0;
> /* or -1 as Ingo suggested */
> +		__entry->count = count;
> +	),
> +
> +	TP_printk("page=%p pfn=%lu count=%u",
> +		  __entry->page,
> +		  __entry->pfn,
> +		  __entry->count)
> 
> Should we do the same in trace/events/kmem.h then?
> 
> But really I'm not sure why page_to_pfn()/pfn_to_page() can return
> different results... I thought that there can appear new 'struct page'
> entries arrays throughout one boot due to memory hotplug or smth. But
> how can existing 'struct page' entries associated with the same physical
> pages change their physical addresses? Or how can one physical address
> correspond to different physical page throughout one boot?

I don't know if those mappings can change. I'm just warning you that if
they can, then you can have an issue with it. If that's the case, then
it would be best to do the work in the tracepoint instead of the print.

One benefit for making this change is that it will let userspace tools
such as perf and trace-cmd parse it better.

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