aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 22:07:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 22:07:42 -0400
commit3e9a97082fa639394e905e1fc4a0a7f719ca7644 (patch)
tree9985cfa26e0597128eae03a2ee7e4614efea571f /include/trace
parent941c8726e4e737e74d418ccec3d8e7b946a65541 (diff)
parentd2e7c96af1e54b507ae2a6a7dd2baf588417a7e5 (diff)
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull random subsystem patches from Ted Ts'o: "This patch series contains a major revamp of how we collect entropy from interrupts for /dev/random and /dev/urandom. The goal is to addresses weaknesses discussed in the paper "Mining your Ps and Qs: Detection of Widespread Weak Keys in Network Devices", by Nadia Heninger, Zakir Durumeric, Eric Wustrow, J. Alex Halderman, which will be published in the Proceedings of the 21st Usenix Security Symposium, August 2012. (See https://factorable.net for more information and an extended version of the paper.)" Fix up trivial conflicts due to nearby changes in drivers/{mfd/ab3100-core.c, usb/gadget/omap_udc.c} * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (33 commits) random: mix in architectural randomness in extract_buf() dmi: Feed DMI table to /dev/random driver random: Add comment to random_initialize() random: final removal of IRQF_SAMPLE_RANDOM um: remove IRQF_SAMPLE_RANDOM which is now a no-op sparc/ldc: remove IRQF_SAMPLE_RANDOM which is now a no-op [ARM] pxa: remove IRQF_SAMPLE_RANDOM which is now a no-op board-palmz71: remove IRQF_SAMPLE_RANDOM which is now a no-op isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-op pxa25x_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op omap_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op goku_udc: remove IRQF_SAMPLE_RANDOM which was commented out uartlite: remove IRQF_SAMPLE_RANDOM which is now a no-op drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-op xen-blkfront: remove IRQF_SAMPLE_RANDOM which is now a no-op n2_crypto: remove IRQF_SAMPLE_RANDOM which is now a no-op pda_power: remove IRQF_SAMPLE_RANDOM which is now a no-op i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op input/serio/hp_sdc.c: remove IRQF_SAMPLE_RANDOM which is now a no-op mfd: remove IRQF_SAMPLE_RANDOM which is now a no-op ...
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/random.h134
1 files changed, 134 insertions, 0 deletions
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
new file mode 100644
index 000000000000..422df19de732
--- /dev/null
+++ b/include/trace/events/random.h
@@ -0,0 +1,134 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM random
3
4#if !defined(_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_RANDOM_H
6
7#include <linux/writeback.h>
8#include <linux/tracepoint.h>
9
10DECLARE_EVENT_CLASS(random__mix_pool_bytes,
11 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
12
13 TP_ARGS(pool_name, bytes, IP),
14
15 TP_STRUCT__entry(
16 __field( const char *, pool_name )
17 __field( int, bytes )
18 __field(unsigned long, IP )
19 ),
20
21 TP_fast_assign(
22 __entry->pool_name = pool_name;
23 __entry->bytes = bytes;
24 __entry->IP = IP;
25 ),
26
27 TP_printk("%s pool: bytes %d caller %pF",
28 __entry->pool_name, __entry->bytes, (void *)__entry->IP)
29);
30
31DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes,
32 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
33
34 TP_ARGS(pool_name, bytes, IP)
35);
36
37DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
38 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
39
40 TP_ARGS(pool_name, bytes, IP)
41);
42
43TRACE_EVENT(credit_entropy_bits,
44 TP_PROTO(const char *pool_name, int bits, int entropy_count,
45 int entropy_total, unsigned long IP),
46
47 TP_ARGS(pool_name, bits, entropy_count, entropy_total, IP),
48
49 TP_STRUCT__entry(
50 __field( const char *, pool_name )
51 __field( int, bits )
52 __field( int, entropy_count )
53 __field( int, entropy_total )
54 __field(unsigned long, IP )
55 ),
56
57 TP_fast_assign(
58 __entry->pool_name = pool_name;
59 __entry->bits = bits;
60 __entry->entropy_count = entropy_count;
61 __entry->entropy_total = entropy_total;
62 __entry->IP = IP;
63 ),
64
65 TP_printk("%s pool: bits %d entropy_count %d entropy_total %d "
66 "caller %pF", __entry->pool_name, __entry->bits,
67 __entry->entropy_count, __entry->entropy_total,
68 (void *)__entry->IP)
69);
70
71TRACE_EVENT(get_random_bytes,
72 TP_PROTO(int nbytes, unsigned long IP),
73
74 TP_ARGS(nbytes, IP),
75
76 TP_STRUCT__entry(
77 __field( int, nbytes )
78 __field(unsigned long, IP )
79 ),
80
81 TP_fast_assign(
82 __entry->nbytes = nbytes;
83 __entry->IP = IP;
84 ),
85
86 TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP)
87);
88
89DECLARE_EVENT_CLASS(random__extract_entropy,
90 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
91 unsigned long IP),
92
93 TP_ARGS(pool_name, nbytes, entropy_count, IP),
94
95 TP_STRUCT__entry(
96 __field( const char *, pool_name )
97 __field( int, nbytes )
98 __field( int, entropy_count )
99 __field(unsigned long, IP )
100 ),
101
102 TP_fast_assign(
103 __entry->pool_name = pool_name;
104 __entry->nbytes = nbytes;
105 __entry->entropy_count = entropy_count;
106 __entry->IP = IP;
107 ),
108
109 TP_printk("%s pool: nbytes %d entropy_count %d caller %pF",
110 __entry->pool_name, __entry->nbytes, __entry->entropy_count,
111 (void *)__entry->IP)
112);
113
114
115DEFINE_EVENT(random__extract_entropy, extract_entropy,
116 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
117 unsigned long IP),
118
119 TP_ARGS(pool_name, nbytes, entropy_count, IP)
120);
121
122DEFINE_EVENT(random__extract_entropy, extract_entropy_user,
123 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
124 unsigned long IP),
125
126 TP_ARGS(pool_name, nbytes, entropy_count, IP)
127);
128
129
130
131#endif /* _TRACE_RANDOM_H */
132
133/* This part must be outside protection */
134#include <trace/define_trace.h>