Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
BACKPORT: ANDROID: Remove xt_qtaguid module from new kernels.
For new devices ship with 4.9 kernel, the eBPF replacement should cover
all the functionalities of xt_qtaguid and it is safe now to remove this
android only module from the kernel.

Signed-off-by: Chenbo Feng <fengc@google.com>
Signed-off-by: Bruno Martins <bgcngm@gmail.com>
Bug: 79938294
Test: kernel build
Change-Id: I032aecc048f7349f6a0c5192dd381f286fc7e5bf
  • Loading branch information
Chenbo Feng authored and mikeNG committed Apr 18, 2022
1 parent afd7791 commit 8e649e0
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 4,086 deletions.
1 change: 0 additions & 1 deletion arch/arm/configs/ranchu_defconfig
Expand Up @@ -105,7 +105,6 @@ CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QTAGUID=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_QUOTA2=y
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/configs/ranchu64_defconfig
Expand Up @@ -117,7 +117,6 @@ CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QTAGUID=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_QUOTA2=y
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
Expand Down
1 change: 0 additions & 1 deletion arch/x86/configs/i386_ranchu_defconfig
Expand Up @@ -139,7 +139,6 @@ CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QTAGUID=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_QUOTA2=y
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
Expand Down
1 change: 0 additions & 1 deletion arch/x86/configs/x86_64_ranchu_defconfig
Expand Up @@ -157,7 +157,6 @@ CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QTAGUID=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_QUOTA2=y
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
Expand Down
14 changes: 0 additions & 14 deletions include/linux/netfilter/xt_qtaguid.h

This file was deleted.

4 changes: 0 additions & 4 deletions net/ipv4/af_inet.c
Expand Up @@ -89,7 +89,6 @@
#include <linux/netfilter_ipv4.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <linux/netfilter/xt_qtaguid.h>

#include <asm/uaccess.h>

Expand Down Expand Up @@ -416,9 +415,6 @@ int inet_release(struct socket *sock)
if (sk) {
long timeout;

#ifdef CONFIG_NETFILTER_XT_MATCH_QTAGUID
qtaguid_untag(sock, true);
#endif
/* Applications forget to leave groups before exiting */
ip_mc_drop_socket(sk);

Expand Down
16 changes: 0 additions & 16 deletions net/netfilter/Kconfig
Expand Up @@ -1327,22 +1327,6 @@ config NETFILTER_XT_MATCH_PKTTYPE

To compile it as a module, choose M here. If unsure, say N.

config NETFILTER_XT_MATCH_QTAGUID
bool '"quota, tag, owner" match and stats support'
depends on NETFILTER_XT_MATCH_SOCKET
depends on NETFILTER_XT_MATCH_OWNER=n
help
This option replaces the `owner' match. In addition to matching
on uid, it keeps stats based on a tag assigned to a socket.
The full tag is comprised of a UID and an accounting tag.
The tags are assignable to sockets from user space (e.g. a download
manager can assign the socket to another UID for accounting).
Stats and control are done via /proc/net/xt_qtaguid/.
It replaces owner as it takes the same arguments, but should
really be recognized by the iptables tool.

If unsure, say `N'.

config NETFILTER_XT_MATCH_QUOTA
tristate '"quota" match support'
depends on NETFILTER_ADVANCED
Expand Down
1 change: 0 additions & 1 deletion net/netfilter/Makefile
Expand Up @@ -157,7 +157,6 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CGROUP) += xt_cgroup.o
obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o
obj-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype.o
obj-$(CONFIG_NETFILTER_XT_MATCH_POLICY) += xt_policy.o
obj-$(CONFIG_NETFILTER_XT_MATCH_QTAGUID) += xt_qtaguid_print.o xt_qtaguid.o
obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA) += xt_quota.o
obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA2) += xt_quota2.o
obj-$(CONFIG_NETFILTER_XT_MATCH_RATEEST) += xt_rateest.o
Expand Down

0 comments on commit 8e649e0

Please sign in to comment.