Thread (10 messages) 10 messages, 4 authors, 2022-11-30

Re: [PATCH v10 3/4] random: introduce generic vDSO getrandom() implementation

flat view

From: Florian Weimer <hidden>
Date: 2022-11-30 10:45:46
Also in: linux-crypto, linux-patches, lkml

Possibly related (same subject, not in this thread)

* Jason A. Donenfeld:
quoted hunk
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index 73eb622e7663..9ae4d76b36c7 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -109,6 +109,16 @@ struct vdso_data {
 	struct arch_vdso_data	arch_data;
 };
 
+/**
+ * struct vdso_rng_data - vdso RNG state information
+ * @generation:	a counter representing the number of RNG reseeds
+ * @is_ready:	whether the RNG is initialized
+ */
+struct vdso_rng_data {
+	unsigned long	generation;
+	bool		is_ready;
+};
+
I don't think you can use a type like long here.  The header says this:

 * vdso_data will be accessed by 64 bit and compat code at the same time
 * so we should be careful before modifying this structure.

So the ABI must be same for 32-bit and 64-bit mode, and long isn't.

Thanks,
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help