On Fri, Nov 30, 2018 at 08:44:20PM -0800, David Miller wrote:
From: Alexei Starovoitov <redacted>
Date: Fri, 30 Nov 2018 13:58:20 -0800
quoted
On Thu, Nov 29, 2018 at 07:32:41PM -0800, David Miller wrote:
quoted
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 426b5c8..c9647ea 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -232,6 +232,16 @@ enum bpf_attach_type {
*/
#define BPF_F_STRICT_ALIGNMENT (1U << 0)
+/* If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the
+ * verifier will allow any alignment whatsoever. This bypasses
+ * what CONFIG_EFFICIENT_UNALIGNED_ACCESS would cause it to do.
I think majority of user space folks who read uapi/bpf.h have no idea
what that kernel config does.
Could you reword the comment here to say that this flag is only
effective on architectures and like sparc and mips that don't
have efficient unaligned access and ignored on x86/arm64 ?
I just want to point out in passing that your feeback applies also to
the comment above BPF_F_STRICT_ALIGNMENT, which I used as a model for
my comment.
Good point. Missed that earlier.
NET_IP_ALIGN is even more cryptic and it's not the same as HAVE_EFFICIENT_UNALIGNED_ACCESS.
Example: s390
We need to reword it.