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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 17 Feb 2011 22:53:51 -0700
From:	David Ahern <daahern@...co.com>
To:	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	peterz@...radead.org, mingo@...e.hu, acme@...stprotocols.net,
	paulus@...ba.org, David Ahern <daahern@...co.com>
Subject: [PATCH 1/3] perf events: fix WARN_ON_ONCE for 64-bit raw data, SW events

This check does not work out for 64-bit counter:

    sizeof(u32) + sizeof(u64) = 4 + 8 = 12

which does not pass the WARN_ON_ONCE test. I'm guessing (hoping
really) that the intent is that the size of the raw data is a
multiple of 4 bytes, not 8.

Signed-off-by: David Ahern <daahern@...co.com>
---
 kernel/perf_event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index a0a6987..3280671 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4351,7 +4351,7 @@ void perf_prepare_sample(struct perf_event_header *header,
 		else
 			size += sizeof(u32);
 
-		WARN_ON_ONCE(size & (sizeof(u64)-1));
+		WARN_ON_ONCE(size & (sizeof(u32)-1));
 		header->size += size;
 	}
 }
-- 
1.7.3.4

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