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] [day] [month] [year] [list]
Message-ID: <1285158142.2275.898.camel@laptop>
Date:	Wed, 22 Sep 2010 14:22:22 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	mingo@...hat.com, hpa@...or.com, acme@...hat.com,
	linux-kernel@...r.kernel.org, will.deacon@....com,
	matthltc@...ibm.com, mahesh@...ux.vnet.ibm.com,
	rostedt@...dmis.org, tglx@...utronix.de, prasad@...ux.vnet.ibm.com,
	greenrd@...enrd.org, mingo@...e.hu
Cc:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/core] perf events: Clean up pid passing

On Wed, 2010-09-15 at 10:03 +0000, tip-bot for Matt Helsley wrote:
> +++ b/kernel/hw_breakpoint.c
> @@ -433,8 +433,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr,
>                             perf_overflow_handler_t triggered,
>                             struct task_struct *tsk)
>  {
> -       return perf_event_create_kernel_counter(attr, -1, task_pid_vnr(tsk),
> -                                               triggered);
> +       return perf_event_create_kernel_counter(attr, -1, tsk, triggered);
>  }
>  EXPORT_SYMBOL_GPL(register_user_hw_breakpoint);
>   

That seems to have gotten lost somehow..

/usr/src/linux-2.6/kernel/hw_breakpoint.c: In function ‘register_user_hw_breakpoint’:
/usr/src/linux-2.6/kernel/hw_breakpoint.c:436: warning: passing argument 3 of ‘perf_event_create_kernel_counter’ makes pointer from integer without a cast
/usr/src/linux-2.6/include/linux/perf_event.h:909: note: expected ‘struct task_struct *’ but argument is of type ‘pid_t’

The below cures it

---
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
index 8f36c99..3b714e8 100644
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -433,7 +433,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr,
 			    perf_overflow_handler_t triggered,
 			    struct task_struct *tsk)
 {
-	return perf_event_create_kernel_counter(attr, -1, task_pid_vnr(tsk), triggered);
+	return perf_event_create_kernel_counter(attr, -1, tsk, triggered);
 }
 EXPORT_SYMBOL_GPL(register_user_hw_breakpoint);
 

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