From: kernel test robot <lkp@intel.com>
To: "Stephan Müller" <smueller@chronox.de>, "Arnd Bergmann" <arnd@arndb.de>
Cc: kbuild-all@lists.01.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-crypto@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-api@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
"Alexander E. Patrakov" <patrakov@gmail.com>,
"Ahmed S. Darwish" <darwish.07@gmail.com>,
"Theodore Y. Ts'o" <tytso@mit.edu>, Willy Tarreau <w@1wt.eu>
Subject: Re: [PATCH v33 03/12] LRNG - sysctls and /proc interface
Date: Sun, 23 Aug 2020 15:10:07 +0800 [thread overview]
Message-ID: <202008231542.U3of2z1R%lkp@intel.com> (raw)
In-Reply-To: <21893127.6Emhk5qWAg@positron.chronox.de>
[-- Attachment #1: Type: text/plain, Size: 7734 bytes --]
Hi "Stephan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on cryptodev/master crypto/master v5.9-rc1 next-20200821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Stephan-M-ller/dev-random-a-new-approach-with-full-SP800-90B-compliance/20200821-140523
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git d162219c655c8cf8003128a13840d6c1e183fb80
config: arm64-randconfig-s031-20200821 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/char/lrng/lrng_proc.c:49:50: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@
>> drivers/char/lrng/lrng_proc.c:49:50: sparse: expected void *
>> drivers/char/lrng/lrng_proc.c:49:50: sparse: got void [noderef] __user *buffer
>> drivers/char/lrng/lrng_proc.c:100:35: sparse: sparse: incorrect type in initializer (incompatible argument 3 (different address spaces)) @@ expected int ( [usertype] *proc_handler )( ... ) @@ got int ( * )( ... ) @@
>> drivers/char/lrng/lrng_proc.c:100:35: sparse: expected int ( [usertype] *proc_handler )( ... )
>> drivers/char/lrng/lrng_proc.c:100:35: sparse: got int ( * )( ... )
drivers/char/lrng/lrng_proc.c:106:35: sparse: sparse: incorrect type in initializer (incompatible argument 3 (different address spaces)) @@ expected int ( [usertype] *proc_handler )( ... ) @@ got int ( * )( ... ) @@
drivers/char/lrng/lrng_proc.c:106:35: sparse: expected int ( [usertype] *proc_handler )( ... )
drivers/char/lrng/lrng_proc.c:106:35: sparse: got int ( * )( ... )
>> drivers/char/lrng/lrng_proc.c:150:25: sparse: sparse: context imbalance in 'lrng_proc_type_show' - different lock contexts for basic block
# https://github.com/0day-ci/linux/commit/902758205b535f162d904f8209936aed9d6ae6d3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Stephan-M-ller/dev-random-a-new-approach-with-full-SP800-90B-compliance/20200821-140523
git checkout 902758205b535f162d904f8209936aed9d6ae6d3
vim +49 drivers/char/lrng/lrng_proc.c
15
16 /*
17 * This function is used to return both the bootid UUID, and random
18 * UUID. The difference is in whether table->data is NULL; if it is,
19 * then a new UUID is generated and returned to the user.
20 *
21 * If the user accesses this via the proc interface, the UUID will be
22 * returned as an ASCII string in the standard UUID format; if via the
23 * sysctl system call, as 16 bytes of binary data.
24 */
25 static int lrng_proc_do_uuid(struct ctl_table *table, int write,
26 void __user *buffer, size_t *lenp, loff_t *ppos)
27 {
28 struct ctl_table fake_table;
29 unsigned char buf[64], tmp_uuid[16], *uuid;
30
31 uuid = table->data;
32 if (!uuid) {
33 uuid = tmp_uuid;
34 generate_random_uuid(uuid);
35 } else {
36 static DEFINE_SPINLOCK(bootid_spinlock);
37
38 spin_lock(&bootid_spinlock);
39 if (!uuid[8])
40 generate_random_uuid(uuid);
41 spin_unlock(&bootid_spinlock);
42 }
43
44 sprintf(buf, "%pU", uuid);
45
46 fake_table.data = buf;
47 fake_table.maxlen = sizeof(buf);
48
> 49 return proc_dostring(&fake_table, write, buffer, lenp, ppos);
50 }
51
52 static int lrng_proc_do_entropy(struct ctl_table *table, int write,
53 void *buffer, size_t *lenp, loff_t *ppos)
54 {
55 struct ctl_table fake_table;
56 int entropy_count;
57
58 entropy_count = lrng_avail_entropy();
59
60 fake_table.data = &entropy_count;
61 fake_table.maxlen = sizeof(entropy_count);
62
63 return proc_dointvec(&fake_table, write, buffer, lenp, ppos);
64 }
65
66 static int lrng_sysctl_poolsize = LRNG_POOL_SIZE_BITS;
67 static int lrng_min_write_thresh;
68 static int lrng_max_write_thresh = LRNG_POOL_SIZE_BITS;
69 static char lrng_sysctl_bootid[16];
70 static int lrng_drng_reseed_max_min;
71
72 struct ctl_table random_table[] = {
73 {
74 .procname = "poolsize",
75 .data = &lrng_sysctl_poolsize,
76 .maxlen = sizeof(int),
77 .mode = 0444,
78 .proc_handler = proc_dointvec,
79 },
80 {
81 .procname = "entropy_avail",
82 .maxlen = sizeof(int),
83 .mode = 0444,
84 .proc_handler = lrng_proc_do_entropy,
85 },
86 {
87 .procname = "write_wakeup_threshold",
88 .data = &lrng_write_wakeup_bits,
89 .maxlen = sizeof(int),
90 .mode = 0644,
91 .proc_handler = proc_dointvec_minmax,
92 .extra1 = &lrng_min_write_thresh,
93 .extra2 = &lrng_max_write_thresh,
94 },
95 {
96 .procname = "boot_id",
97 .data = &lrng_sysctl_bootid,
98 .maxlen = 16,
99 .mode = 0444,
> 100 .proc_handler = lrng_proc_do_uuid,
101 },
102 {
103 .procname = "uuid",
104 .maxlen = 16,
105 .mode = 0444,
106 .proc_handler = lrng_proc_do_uuid,
107 },
108 {
109 .procname = "urandom_min_reseed_secs",
110 .data = &lrng_drng_reseed_max_time,
111 .maxlen = sizeof(int),
112 .mode = 0644,
113 .proc_handler = proc_dointvec,
114 .extra1 = &lrng_drng_reseed_max_min,
115 },
116 { }
117 };
118
119 /* Number of online DRNGs */
120 static u32 numa_drngs = 1;
121
122 void lrng_pool_inc_numa_node(void)
123 {
124 numa_drngs++;
125 }
126
127 static int lrng_proc_type_show(struct seq_file *m, void *v)
128 {
129 struct lrng_drng *lrng_drng_init = lrng_drng_init_instance();
130 unsigned long flags = 0;
131 unsigned char buf[300];
132
133 lrng_drng_lock(lrng_drng_init, &flags);
134 snprintf(buf, sizeof(buf),
135 "DRNG name: %s\n"
136 "Hash for reading entropy pool: %s\n"
137 "DRNG security strength: %d bits\n"
138 "number of DRNG instances: %u\n"
139 "SP800-90B compliance: %s\n"
140 "High-resolution timer: %s\n"
141 "LRNG minimally seeded: %s\n"
142 "LRNG fully seeded: %s\n",
143 lrng_drng_init->crypto_cb->lrng_drng_name(),
144 lrng_drng_init->crypto_cb->lrng_hash_name(),
145 LRNG_DRNG_SECURITY_STRENGTH_BITS, numa_drngs,
146 lrng_sp80090b_compliant() ? "true" : "false",
147 lrng_pool_highres_timer() ? "true" : "false",
148 lrng_state_min_seeded() ? "true" : "false",
149 lrng_state_fully_seeded() ? "true" : "false");
> 150 lrng_drng_unlock(lrng_drng_init, &flags);
151
152 seq_write(m, buf, strlen(buf));
153
154 return 0;
155 }
156
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34610 bytes --]
next prev parent reply other threads:[~2020-08-23 7:12 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 8:25 [PATCH v32 00/12] /dev/random - a new approach with full SP800-90B compliance Stephan Müller
2020-08-20 8:39 ` [PATCH v32 01/12] Linux Random Number Generator Stephan Müller
2020-08-20 11:46 ` kernel test robot
2020-08-20 12:31 ` Stephan Müller
2020-08-20 8:40 ` [PATCH v32 02/12] LRNG - allocate one DRNG instance per NUMA node Stephan Müller
2020-08-20 8:40 ` [PATCH v32 03/12] LRNG - sysctls and /proc interface Stephan Müller
2020-08-20 8:41 ` [PATCH v32 04/12] LRNG - add switchable DRNG support Stephan Müller
2020-08-20 8:42 ` [PATCH v32 05/12] crypto: DRBG - externalize DRBG functions for LRNG Stephan Müller
2020-08-20 8:42 ` [PATCH v32 06/12] LRNG - add SP800-90A DRBG extension Stephan Müller
2020-08-20 12:07 ` kernel test robot
2020-08-20 12:27 ` Stephan Müller
2020-08-20 8:43 ` [PATCH v32 07/12] LRNG - add kernel crypto API PRNG extension Stephan Müller
2020-08-20 12:32 ` kernel test robot
2020-08-20 8:43 ` [PATCH v32 08/12] crypto: provide access to a static Jitter RNG state Stephan Müller
2020-08-20 8:44 ` [PATCH v32 09/12] LRNG - add Jitter RNG fast noise source Stephan Müller
2020-08-20 8:44 ` [PATCH v32 10/12] LRNG - add SP800-90B compliant health tests Stephan Müller
2020-08-20 8:45 ` [PATCH v32 11/12] LRNG - add interface for gathering of raw entropy Stephan Müller
2020-08-20 12:47 ` kernel test robot
2020-08-20 8:45 ` [PATCH v32 12/12] LRNG - add power-on and runtime self-tests Stephan Müller
2020-08-21 5:37 ` [PATCH v33 00/12] /dev/random - a new approach with full SP800-90B compliance Stephan Müller
2020-08-21 5:38 ` [PATCH v33 01/12] Linux Random Number Generator Stephan Müller
2020-08-21 19:42 ` kernel test robot
2020-08-22 4:49 ` Stephan Müller
2020-08-22 3:34 ` kernel test robot
2020-08-26 14:27 ` kernel test robot
2020-08-26 14:22 ` Stephan Mueller
2020-08-21 5:39 ` [PATCH v33 02/12] LRNG - allocate one DRNG instance per NUMA node Stephan Müller
2020-08-21 5:39 ` [PATCH v33 03/12] LRNG - sysctls and /proc interface Stephan Müller
2020-08-23 7:10 ` kernel test robot [this message]
2020-08-21 5:40 ` [PATCH v33 04/12] LRNG - add switchable DRNG support Stephan Müller
2020-08-21 5:40 ` [PATCH v33 05/12] crypto: DRBG - externalize DRBG functions for LRNG Stephan Müller
2020-08-21 5:41 ` [PATCH v33 06/12] LRNG - add SP800-90A DRBG extension Stephan Müller
2020-08-21 5:42 ` [PATCH v33 07/12] LRNG - add kernel crypto API PRNG extension Stephan Müller
2020-08-21 5:42 ` [PATCH v33 08/12] crypto: provide access to a static Jitter RNG state Stephan Müller
2020-08-21 5:42 ` [PATCH v33 09/12] LRNG - add Jitter RNG fast noise source Stephan Müller
2020-08-21 5:43 ` [PATCH v33 10/12] LRNG - add SP800-90B compliant health tests Stephan Müller
2020-08-21 5:43 ` [PATCH v33 11/12] LRNG - add interface for gathering of raw entropy Stephan Müller
2020-08-21 5:44 ` [PATCH v33 12/12] LRNG - add power-on and runtime self-tests Stephan Müller
2020-08-23 14:50 ` kernel test robot
2020-08-25 7:21 ` [PATCH v34 00/12] /dev/random - a new approach with full SP800-90B compliance Stephan Müller
2020-08-25 7:22 ` [PATCH v34 01/12] Linux Random Number Generator Stephan Müller
2020-08-25 11:28 ` kernel test robot
2020-08-25 11:51 ` Stephan Mueller
2020-08-31 9:24 ` kernel test robot
2020-08-25 7:23 ` [PATCH v34 02/12] LRNG - allocate one DRNG instance per NUMA node Stephan Müller
2020-08-25 7:23 ` [PATCH v34 03/12] LRNG - sysctls and /proc interface Stephan Müller
2020-08-25 7:24 ` [PATCH v34 04/12] LRNG - add switchable DRNG support Stephan Müller
2020-08-31 10:03 ` kernel test robot
2020-08-25 7:24 ` [PATCH v34 05/12] crypto: DRBG - externalize DRBG functions for LRNG Stephan Müller
2020-08-25 7:25 ` [PATCH v34 06/12] LRNG - add SP800-90A DRBG extension Stephan Müller
2020-08-25 7:25 ` [PATCH v34 07/12] LRNG - add kernel crypto API PRNG extension Stephan Müller
2020-08-25 7:26 ` [PATCH v34 08/12] crypto: provide access to a static Jitter RNG state Stephan Müller
2020-08-25 7:26 ` [PATCH v34 09/12] LRNG - add Jitter RNG fast noise source Stephan Müller
2020-08-25 7:27 ` [PATCH v34 10/12] LRNG - add SP800-90B compliant health tests Stephan Müller
2020-08-25 7:27 ` [PATCH v34 11/12] LRNG - add interface for gathering of raw entropy Stephan Müller
2020-08-25 7:27 ` [PATCH v34 12/12] LRNG - add power-on and runtime self-tests Stephan Müller
2020-09-18 9:47 ` [PATCH v35 00/13] /dev/random - a new approach Stephan Müller
2020-09-18 9:48 ` [PATCH v35 01/13] Linux Random Number Generator Stephan Müller
2020-09-18 13:02 ` kernel test robot
2020-09-20 16:49 ` Stephan Mueller
2020-09-18 9:48 ` [PATCH v35 02/13] LRNG - allocate one DRNG instance per NUMA node Stephan Müller
2020-09-18 9:49 ` [PATCH v35 03/13] LRNG - sysctls and /proc interface Stephan Müller
2020-09-18 9:49 ` [PATCH v35 04/13] LRNG - add switchable DRNG support Stephan Müller
2020-09-18 9:49 ` [PATCH v35 05/13] LRNG - add common generic hash support Stephan Müller
2020-09-18 9:50 ` [PATCH v35 06/13] crypto: DRBG - externalize DRBG functions for LRNG Stephan Müller
2020-09-18 9:50 ` [PATCH v35 07/13] LRNG - add SP800-90A DRBG extension Stephan Müller
2020-09-18 9:51 ` [PATCH v35 08/13] LRNG - add kernel crypto API PRNG extension Stephan Müller
2020-09-18 9:51 ` [PATCH v35 09/13] crypto: provide access to a static Jitter RNG state Stephan Müller
2020-09-18 9:51 ` [PATCH v35 10/13] LRNG - add Jitter RNG fast noise source Stephan Müller
2020-09-18 9:52 ` [PATCH v35 11/13] LRNG - add SP800-90B compliant health tests Stephan Müller
2020-09-18 9:53 ` [PATCH v35 12/13] LRNG - add interface for gathering of raw entropy Stephan Müller
2020-09-18 9:53 ` [PATCH v35 13/13] LRNG - add power-on and runtime self-tests Stephan Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202008231542.U3of2z1R%lkp@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=darwish.07@gmail.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrakov@gmail.com \
--cc=smueller@chronox.de \
--cc=tytso@mit.edu \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).