From f14f7ff5f9e15acadd7cf5ba2d796c73e7697a2e Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 28 Jun 2017 04:27:31 +0200 Subject: compat: do not export symbols unnecessarily --- src/compat/dst_cache/dst_cache.c | 7 ------- src/compat/memneq/memneq.c | 1 - src/compat/siphash/siphash.c | 20 -------------------- src/compat/udp_tunnel/udp_tunnel.c | 6 ------ 4 files changed, 34 deletions(-) (limited to 'src') diff --git a/src/compat/dst_cache/dst_cache.c b/src/compat/dst_cache/dst_cache.c index 24f1e90..3f7b1bd 100644 --- a/src/compat/dst_cache/dst_cache.c +++ b/src/compat/dst_cache/dst_cache.c @@ -80,7 +80,6 @@ struct dst_entry *dst_cache_get(struct dst_cache *dst_cache) return dst_cache_per_cpu_get(dst_cache, this_cpu_ptr(dst_cache->cache)); } -EXPORT_SYMBOL_GPL(dst_cache_get); struct rtable *dst_cache_get_ip4(struct dst_cache *dst_cache, __be32 *saddr) { @@ -98,7 +97,6 @@ struct rtable *dst_cache_get_ip4(struct dst_cache *dst_cache, __be32 *saddr) *saddr = idst->in_saddr.s_addr; return container_of(dst, struct rtable, dst); } -EXPORT_SYMBOL_GPL(dst_cache_get_ip4); void dst_cache_set_ip4(struct dst_cache *dst_cache, struct dst_entry *dst, __be32 saddr) @@ -112,7 +110,6 @@ void dst_cache_set_ip4(struct dst_cache *dst_cache, struct dst_entry *dst, dst_cache_per_cpu_dst_set(idst, dst, 0); idst->in_saddr.s_addr = saddr; } -EXPORT_SYMBOL_GPL(dst_cache_set_ip4); #if IS_ENABLED(CONFIG_IPV6) void dst_cache_set_ip6(struct dst_cache *dst_cache, struct dst_entry *dst, @@ -128,7 +125,6 @@ void dst_cache_set_ip6(struct dst_cache *dst_cache, struct dst_entry *dst, rt6_get_cookie((struct rt6_info *)dst)); idst->in6_saddr = *addr; } -EXPORT_SYMBOL_GPL(dst_cache_set_ip6); struct dst_entry *dst_cache_get_ip6(struct dst_cache *dst_cache, struct in6_addr *saddr) @@ -147,7 +143,6 @@ struct dst_entry *dst_cache_get_ip6(struct dst_cache *dst_cache, *saddr = idst->in6_saddr; return dst; } -EXPORT_SYMBOL_GPL(dst_cache_get_ip6); #endif int dst_cache_init(struct dst_cache *dst_cache, gfp_t gfp) @@ -165,7 +160,6 @@ int dst_cache_init(struct dst_cache *dst_cache, gfp_t gfp) dst_cache_reset(dst_cache); return 0; } -EXPORT_SYMBOL_GPL(dst_cache_init); void dst_cache_destroy(struct dst_cache *dst_cache) { @@ -179,4 +173,3 @@ void dst_cache_destroy(struct dst_cache *dst_cache) free_percpu(dst_cache->cache); } -EXPORT_SYMBOL_GPL(dst_cache_destroy); diff --git a/src/compat/memneq/memneq.c b/src/compat/memneq/memneq.c index b85cd9e..0bcb4b8 100644 --- a/src/compat/memneq/memneq.c +++ b/src/compat/memneq/memneq.c @@ -166,6 +166,5 @@ noinline unsigned long __crypto_memneq(const void *a, const void *b, return __crypto_memneq_generic(a, b, size); } } -EXPORT_SYMBOL(__crypto_memneq); #endif /* __HAVE_ARCH_CRYPTO_MEMNEQ */ diff --git a/src/compat/siphash/siphash.c b/src/compat/siphash/siphash.c index edbc893..0d4309b 100644 --- a/src/compat/siphash/siphash.c +++ b/src/compat/siphash/siphash.c @@ -87,7 +87,6 @@ u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key) #endif POSTAMBLE } -EXPORT_SYMBOL(__siphash_aligned); #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key) @@ -120,7 +119,6 @@ u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key) #endif POSTAMBLE } -EXPORT_SYMBOL(__siphash_unaligned); #endif /** @@ -137,7 +135,6 @@ u64 siphash_1u64(const u64 first, const siphash_key_t *key) v0 ^= first; POSTAMBLE } -EXPORT_SYMBOL(siphash_1u64); /** * siphash_2u64 - compute 64-bit siphash PRF value of 2 u64 @@ -158,7 +155,6 @@ u64 siphash_2u64(const u64 first, const u64 second, const siphash_key_t *key) v0 ^= second; POSTAMBLE } -EXPORT_SYMBOL(siphash_2u64); /** * siphash_3u64 - compute 64-bit siphash PRF value of 3 u64 @@ -185,7 +181,6 @@ u64 siphash_3u64(const u64 first, const u64 second, const u64 third, v0 ^= third; POSTAMBLE } -EXPORT_SYMBOL(siphash_3u64); /** * siphash_4u64 - compute 64-bit siphash PRF value of 4 u64 @@ -217,7 +212,6 @@ u64 siphash_4u64(const u64 first, const u64 second, const u64 third, v0 ^= forth; POSTAMBLE } -EXPORT_SYMBOL(siphash_4u64); u64 siphash_1u32(const u32 first, const siphash_key_t *key) { @@ -225,7 +219,6 @@ u64 siphash_1u32(const u32 first, const siphash_key_t *key) b |= first; POSTAMBLE } -EXPORT_SYMBOL(siphash_1u32); u64 siphash_3u32(const u32 first, const u32 second, const u32 third, const siphash_key_t *key) @@ -239,7 +232,6 @@ u64 siphash_3u32(const u32 first, const u32 second, const u32 third, b |= third; POSTAMBLE } -EXPORT_SYMBOL(siphash_3u32); #if BITS_PER_LONG == 64 /* Note that on 64-bit, we make HalfSipHash1-3 actually be SipHash1-3, for @@ -287,7 +279,6 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) #endif HPOSTAMBLE } -EXPORT_SYMBOL(__hsiphash_aligned); #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS u32 __hsiphash_unaligned(const void *data, size_t len, @@ -320,7 +311,6 @@ u32 __hsiphash_unaligned(const void *data, size_t len, #endif HPOSTAMBLE } -EXPORT_SYMBOL(__hsiphash_unaligned); #endif /** @@ -334,7 +324,6 @@ u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) b |= first; HPOSTAMBLE } -EXPORT_SYMBOL(hsiphash_1u32); /** * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 @@ -351,7 +340,6 @@ u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) v0 ^= combined; HPOSTAMBLE } -EXPORT_SYMBOL(hsiphash_2u32); /** * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 @@ -371,7 +359,6 @@ u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, b |= third; HPOSTAMBLE } -EXPORT_SYMBOL(hsiphash_3u32); /** * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 @@ -395,7 +382,6 @@ u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, v0 ^= combined; HPOSTAMBLE } -EXPORT_SYMBOL(hsiphash_4u32); #else #define HSIPROUND \ do { \ @@ -445,7 +431,6 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) } HPOSTAMBLE } -EXPORT_SYMBOL(__hsiphash_aligned); #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS u32 __hsiphash_unaligned(const void *data, size_t len, @@ -468,7 +453,6 @@ u32 __hsiphash_unaligned(const void *data, size_t len, } HPOSTAMBLE } -EXPORT_SYMBOL(__hsiphash_unaligned); #endif /** @@ -484,7 +468,6 @@ u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) v0 ^= first; HPOSTAMBLE } -EXPORT_SYMBOL(hsiphash_1u32); /** * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 @@ -503,7 +486,6 @@ u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) v0 ^= second; HPOSTAMBLE } -EXPORT_SYMBOL(hsiphash_2u32); /** * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 @@ -527,7 +509,6 @@ u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, v0 ^= third; HPOSTAMBLE } -EXPORT_SYMBOL(hsiphash_3u32); /** * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 @@ -555,5 +536,4 @@ u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, v0 ^= forth; HPOSTAMBLE } -EXPORT_SYMBOL(hsiphash_4u32); #endif diff --git a/src/compat/udp_tunnel/udp_tunnel.c b/src/compat/udp_tunnel/udp_tunnel.c index 4a74d63..78232a8 100644 --- a/src/compat/udp_tunnel/udp_tunnel.c +++ b/src/compat/udp_tunnel/udp_tunnel.c @@ -77,7 +77,6 @@ error: *sockp = NULL; return err; } -EXPORT_SYMBOL(udp_sock_create4); void setup_udp_tunnel_sock(struct net *net, struct socket *sock, struct udp_tunnel_sock_cfg *cfg) @@ -87,7 +86,6 @@ void setup_udp_tunnel_sock(struct net *net, struct socket *sock, rcu_assign_sk_user_data(sock->sk, cfg->sk_user_data); sock->sk->sk_data_ready = our_sk_data_ready; } -EXPORT_SYMBOL_GPL(setup_udp_tunnel_sock); #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) static inline __sum16 udp_v4_check(int len, __be32 saddr, @@ -212,7 +210,6 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb iptunnel_xmit_stats(ret, &dev->stats, dev->tstats); #endif } -EXPORT_SYMBOL_GPL(udp_tunnel_xmit_skb); void udp_tunnel_sock_release(struct socket *sock) { @@ -220,7 +217,6 @@ void udp_tunnel_sock_release(struct socket *sock) kernel_sock_shutdown(sock, SHUT_RDWR); sock_release(sock); } -EXPORT_SYMBOL_GPL(udp_tunnel_sock_release); #if IS_ENABLED(CONFIG_IPV6) #include @@ -296,7 +292,6 @@ error: *sockp = NULL; return err; } -EXPORT_SYMBOL_GPL(udp_sock_create6); #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) static inline __sum16 udp_v6_check(int len, @@ -382,5 +377,4 @@ int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk, ip6tunnel_xmit(skb, dev); return 0; } -EXPORT_SYMBOL_GPL(udp_tunnel6_xmit_skb); #endif -- cgit v1.2.3-59-g8ed1b