kernel: bump 6.1 to 6.1.36
[openwrt/staging/hauke.git] / target / linux / generic / hack-6.1 / 901-debloat_sock_diag.patch
index ac502bdd16d6668b1cc898c9fc360a6f4fde5ebd..b93fe2b725dcc87250b91acc1ee4cfa48991fc93 100644 (file)
@@ -28,13 +28,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        help
 --- a/net/core/Makefile
 +++ b/net/core/Makefile
-@@ -10,9 +10,10 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_core.
+@@ -11,11 +11,12 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_core.
  
  obj-y              += dev.o dev_addr_lists.o dst.o netevent.o \
                        neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
 -                      sock_diag.o dev_ioctl.o tso.o sock_reuseport.o \
 +                      dev_ioctl.o tso.o sock_reuseport.o \
-                       fib_notifier.o xdp.o flow_offload.o
+                       fib_notifier.o xdp.o flow_offload.o gro.o
+ obj-$(CONFIG_NETDEV_ADDR_LIST_TEST) += dev_addr_lists_test.o
  
 +obj-$(CONFIG_SOCK_DIAG) += sock_diag.o
  obj-y += net-sysfs.o
@@ -50,15 +52,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  #include <linux/uaccess.h>
  
-@@ -143,6 +144,7 @@
+@@ -145,6 +146,7 @@
  
  static DEFINE_MUTEX(proto_list_mutex);
  static LIST_HEAD(proto_list);
 +DEFINE_COOKIE(sock_cookie);
  
- static void sock_inuse_add(struct net *net, int val);
-@@ -545,6 +547,18 @@ discard_and_relse:
+ static void sock_def_write_space_wfree(struct sock *sk);
+ static void sock_def_write_space(struct sock *sk);
+@@ -582,6 +584,18 @@ discard_and_relse:
  }
  EXPORT_SYMBOL(__sk_receive_skb);
  
@@ -77,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
                                                          u32));
  INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
-@@ -1983,9 +1997,11 @@ static void __sk_free(struct sock *sk)
+@@ -2168,9 +2182,11 @@ static void __sk_free(struct sock *sk)
        if (likely(sk->sk_net_refcnt))
                sock_inuse_add(sock_net(sk), -1);
  
@@ -91,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/core/sock_diag.c
 +++ b/net/core/sock_diag.c
-@@ -11,7 +11,6 @@
+@@ -12,7 +12,6 @@
  #include <linux/tcp.h>
  #include <linux/workqueue.h>
  #include <linux/nospec.h>
@@ -99,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #include <linux/inet_diag.h>
  #include <linux/sock_diag.h>
  
-@@ -20,20 +19,6 @@ static int (*inet_rcv_compat)(struct sk_
+@@ -21,20 +20,6 @@ static int (*inet_rcv_compat)(struct sk_
  static DEFINE_MUTEX(sock_diag_table_mutex);
  static struct workqueue_struct *broadcast_wq;
  
@@ -122,7 +124,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        u64 res;
 --- a/net/ipv4/Kconfig
 +++ b/net/ipv4/Kconfig
-@@ -424,6 +424,7 @@ config INET_TUNNEL
+@@ -423,6 +423,7 @@ config INET_TUNNEL
  
  config INET_DIAG
        tristate "INET: socket monitoring interface"
@@ -160,3 +162,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        default n
        help
          Support for UNIX socket monitoring interface used by the ss tool.
+--- a/net/xdp/Kconfig
++++ b/net/xdp/Kconfig
+@@ -10,6 +10,7 @@ config XDP_SOCKETS
+ config XDP_SOCKETS_DIAG
+       tristate "XDP sockets: monitoring interface"
+       depends on XDP_SOCKETS
++      select SOCK_DIAG
+       default n
+       help
+         Support for PF_XDP sockets monitoring interface used by the ss tool.