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: <20151116214304.6fa42a4e@grimm.local.home>
Date:	Mon, 16 Nov 2015 21:43:04 -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 Tue, 17 Nov 2015 10:21:47 +0800
yalin wang <yalin.wang2010@...il.com> wrote:

  
> i have not tried ,
> just a question,
> if you print a %s , but don’t call trace_define_field() do define this string in
> __entry ,  how does user space perf tool to get this string info and print it ?
> i am curious ..
> i can try this when i have time.  and report to you .

Because the print_fmt has nothing to do with the fields. You can have
as your print_fmt as:

	TP_printk("Message = %s", "hello dolly!")

And both userspace and the kernel with process that correctly (if I got
string processing working in userspace, which I believe I do). The
string is processed, it's not dependent on TP_STRUCT__entry() unless it
references a field there. Which can also be used too:

	TP_printk("Message = %s", __entry->musical ? "Hello dolly!" :
			"Death Trap!")

userspace will see in the entry:

 print_fmt: "Message = %s", REC->musical ? "Hello dolly!" : "Death Trap!"

as long as the field "musical" exists, all is well.

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