@@ -35,5 +35,5 @@ CLANG ?= clang
%.o: %.c
$(CLANG) -I../../../include/uapi -I../../../../samples/bpf/ \
- -D__x86_64__ -Wno-compare-distinct-pointer-types \
+ -D__sparc__ -Wno-compare-distinct-pointer-types \
-O2 -target bpf -c $< -o $@
which should be reasonably easy to deal with.
The second is more difficult:
@@ -801,8 +801,12 @@ static int check_ptr_alignment(const struct bpf_reg_state *reg,
{
switch (reg->type) {
case PTR_TO_PACKET:
+#if 1
+ return 0;
+#else
return IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) ? 0 :
check_pkt_ptr_alignment(reg, off, size);
+#endif
case PTR_TO_MAP_VALUE_ADJ:
return IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) ? 0 :
check_val_ptr_alignment(reg, size);