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-next>] [day] [month] [year] [list]
Date:	Fri, 13 Nov 2009 23:58:25 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	akpm@...ux-foundation.org
Cc:	mm-commits@...r.kernel.org, lihong.hi@...il.com,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: + recordmcount-stfu.patch added to -mm tree

On Fri, 2009-11-13 at 19:56 -0800, akpm@...ux-foundation.org wrote:
> The patch titled
>      recordmcount-stfu
> has been added to the -mm tree.  Its filename is
>      recordmcount-stfu.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 
> See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
> out what to do about this
> 
> The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
> 
> ------------------------------------------------------
> Subject: recordmcount-stfu
> From: Andrew Morton <akpm@...ux-foundation.org>
> 
> oy, people are trying to get work done here.
> 
> Cc: Li Hong <lihong.hi@...il.com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  scripts/recordmcount.pl |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff -puN scripts/recordmcount.pl~recordmcount-stfu scripts/recordmcount.pl
> --- a/scripts/recordmcount.pl~recordmcount-stfu
> +++ a/scripts/recordmcount.pl
> @@ -180,9 +180,9 @@ sub check_objcopy
>      close (IN);
>  
>      if (!$can_use_local) {
> -	print STDERR "WARNING: could not find objcopy version or version " .
> -	    "is less than 2.17.\n" .
> -	    "\tLocal function references is disabled.\n";
> +#	print STDERR "WARNING: could not find objcopy version or version " .
> +#	    "is less than 2.17.\n" .
> +#	    "\tLocal function references is disabled.\n";
>      }
>  }
>  

Andrew, would something like this patch be sufficient?

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 3ffa502..4b8293f 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1785,9 +1785,9 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
 static struct ring_buffer_event *
 rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
 	     unsigned long length, unsigned long tail,
-	     struct buffer_page *commit_page,
 	     struct buffer_page *tail_page, u64 *ts)
 {
+	struct buffer_page *commit_page = cpu_buffer->commit_page;
 	struct ring_buffer *buffer = cpu_buffer->buffer;
 	struct buffer_page *next_page;
 	int ret;
@@ -1890,13 +1890,10 @@ static struct ring_buffer_event *
 __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
 		  unsigned type, unsigned long length, u64 *ts)
 {
-	struct buffer_page *tail_page, *commit_page;
+	struct buffer_page *tail_page;
 	struct ring_buffer_event *event;
 	unsigned long tail, write;
 
-	commit_page = cpu_buffer->commit_page;
-	/* we just need to protect against interrupts */
-	barrier();
 	tail_page = cpu_buffer->tail_page;
 	write = local_add_return(length, &tail_page->write);
 
@@ -1907,7 +1904,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
 	/* See if we shot pass the end of this buffer page */
 	if (write > BUF_PAGE_SIZE)
 		return rb_move_tail(cpu_buffer, length, tail,
-				    commit_page, tail_page, ts);
+				    tail_page, ts);
 
 	/* We reserved something on the buffer */
 
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index a4e2435..ac4fa2d 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -162,6 +162,10 @@ my $alignment;		# The .align value to use for $mcount_section
 my $section_type;	# Section header plus possible alignment command
 my $can_use_local = 0; 	# If we can use local function references
 
+# Shut up recordmcount if user has older objcopy
+my $print_warning = 1;
+$print_warning = 0 if ( -f "FTRACE_QUIET");
+
 ##
 # check_objcopy - whether objcopy supports --globalize-symbols
 #
@@ -179,10 +183,12 @@ sub check_objcopy
     }
     close (IN);
 
-    if (!$can_use_local) {
+    if (!$can_use_local && $print_warning) {
 	print STDERR "WARNING: could not find objcopy version or version " .
 	    "is less than 2.17.\n" .
-	    "\tLocal function references is disabled.\n";
+	    "\tLocal function references are disabled.\n" .
+	    "\tTo disable this message, create the file FTRACE_QUIET\n" .
+	    "\tin the top level directory\n";
     }
 }
 


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