move netd maps and progs into /sys/fs/bpf/netd_shared/...

(out of current /sys/fs/bpf/net_shared/...)

This will allow genfscon regexp changes in a followup selinux commit.

Note that this has a hard dependency on system/bpf change
  'bpfloader: add support for netd_shared and net_private subdirs'
which also bumps bpfloader to v0.13.

This was merged May 12, 2022 (into both aosp/master and tm-dev)
and it is in Android T starting with Beta 3 release.

This isn't really an issue since amusingly T Beta 2 is already
incompatible with current mainline releases due to the snap
reverting a previous required bpfloader system/bpf change:
  move net_shared bpf programs into net_shared subdirectory
See: http://b/232050459#comment14

So this doesn't break T Beta1/2, since they already don't work,
and Beta3 will work.

Bug: 218408035
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id5f14d6e3f11cfe35d9d8a9496548a2bc4d022ec
This commit is contained in:
Maciej Żenczykowski
2022-05-16 13:59:12 -07:00
parent 080974233c
commit 6d116d0f38
6 changed files with 55 additions and 51 deletions

View File

@@ -748,7 +748,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
* The BPF program attached to the tc-police hook to account for to-be-dropped traffic.
*/
private static final String TC_POLICE_BPF_PROG_PATH =
"/sys/fs/bpf/net_shared/prog_netd_schedact_ingress_account";
"/sys/fs/bpf/netd_shared/prog_netd_schedact_ingress_account";
private static String eventName(int what) {
return sMagicDecoderRing.get(what, Integer.toString(what));