Commit Graph

67524 Commits

Author SHA1 Message Date
Vignesh Saravanaperumal 1dc9f51423 ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle
Some vendors want to add a field when a 'sruct sock' is added so give a
hook to handle this.  Any memory allocated when
trace_android_rvh_sk_alloc() is called needs to be freed when
trace_android_rvh_sk_free() is called.

Note, if trace_android_rvh_sk_alloc() fails, be sure to be able to
handle this in trace_android_rvh_sk_free(), but that should not be an
issue as that needs to be addressed in vendor code that runs for 'struct
sock' objects that have been created before the vendor code is loaded no
matter what.

Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: I108a2f31d2dcc228f46159816deee6235afafbbd
2022-06-18 18:28:48 +00:00
Vignesh Saravanaperumal 72c4b4cdad ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle
Some vendors want to add a field when a 'sruct nf_conn' is added so give a
hook to handle this.  Any memory allocated when
trace_android_rvh_nf_conn_alloc() is called needs to be freed when
trace_android_rvh_nf_conn_free() is called.

Note, if trace_android_rvh_nf_conn_alloc() fails, be sure to be able to
handle this in trace_android_rvh_nf_conn_free(), but that should not be
an issue as that needs to be addressed in vendor code that runs for
'struct nf_conn' objects that have been created before the vendor code
is loaded no matter what.

Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: I4d2b025196a3df7ba4adec313c90483811cac728
2022-06-18 18:28:48 +00:00
Eyal Birger 9a526b9527 UPSTREAM: xfrm: fix "disable_policy" flag use when arriving from different devices
[ Upstream commit e6175a2ed1f18bf2f649625bf725e07adcfa6a28 ]

In IPv4 setting the "disable_policy" flag on a device means no policy
should be enforced for traffic originating from the device. This was
implemented by seting the DST_NOPOLICY flag in the dst based on the
originating device.

However, dsts are cached in nexthops regardless of the originating
devices, in which case, the DST_NOPOLICY flag value may be incorrect.

Consider the following setup:

                     +------------------------------+
                     | ROUTER                       |
  +-------------+    | +-----------------+          |
  | ipsec src   |----|-|ipsec0           |          |
  +-------------+    | |disable_policy=0 |   +----+ |
                     | +-----------------+   |eth1|-|-----
  +-------------+    | +-----------------+   +----+ |
  | noipsec src |----|-|eth0             |          |
  +-------------+    | |disable_policy=1 |          |
                     | +-----------------+          |
                     +------------------------------+

Where ROUTER has a default route towards eth1.

dst entries for traffic arriving from eth0 would have DST_NOPOLICY
and would be cached and therefore can be reused by traffic originating
from ipsec0, skipping policy check.

Fix by setting a IPSKB_NOPOLICY flag in IPCB and observing it instead
of the DST in IN/FWD IPv4 policy checks.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reported-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 952c246496)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib99071ce487325fd9c3646ca77dd682128feeb7c
2022-06-18 18:28:46 +00:00
Nicolas Dichtel 6508a3753c UPSTREAM: xfrm: rework default policy structure
[ Upstream commit b58b1f563ab78955d37e9e43e02790a85c66ac05 ]

This is a follow up of commit f8d858e607 ("xfrm: make user policy API
complete"). The goal is to align userland API to the internal structures.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 36d8cca5b4)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I65a493a79fbf4b42cc0c849748ff522ef0ed5568
2022-06-18 18:28:46 +00:00
Felix Fietkau 3ae9599990 UPSTREAM: net: fix dev_fill_forward_path with pppoe + bridge
[ Upstream commit cf2df74e202d81b09f09d84c2d8903e0e87e9274 ]

When calling dev_fill_forward_path on a pppoe device, the provided destination
address is invalid. In order for the bridge fdb lookup to succeed, the pppoe
code needs to update ctx->daddr to the correct value.
Fix this by storing the address inside struct net_device_path_ctx

Fixes: f6efc675c9 ("net: ppp: resolve forwarding path for bridge pppoe devices")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit f96b2e0672)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I08f671d1cf16862b024fc940c45c6887ac8cdd2c
2022-06-18 18:28:46 +00:00
Hao Luo 8f07caaddc UPSTREAM: bpf: Add MEM_RDONLY for helper args that are pointers to rdonly mem.
commit 216e3cd2f28dbbf1fe86848e0e29e6693b9f0a20 upstream.

Some helper functions may modify its arguments, for example,
bpf_d_path, bpf_get_stack etc. Previously, their argument types
were marked as ARG_PTR_TO_MEM, which is compatible with read-only
mem types, such as PTR_TO_RDONLY_BUF. Therefore it's legitimate,
but technically incorrect, to modify a read-only memory by passing
it into one of such helper functions.

This patch tags the bpf_args compatible with immutable memory with
MEM_RDONLY flag. The arguments that don't have this flag will be
only compatible with mutable memory types, preventing the helper
from modifying a read-only memory. The bpf_args that have
MEM_RDONLY are compatible with both mutable memory and immutable
memory.

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-9-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2a77c58726)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id62021f1dde9eefc3148c877f5c1a68519a4b77f
2022-06-18 18:28:45 +00:00
Hao Luo 1cd4928129 UPSTREAM: bpf: Introduce MEM_RDONLY flag
commit 20b2aff4bc15bda809f994761d5719827d66c0b4 upstream.

This patch introduce a flag MEM_RDONLY to tag a reg value
pointing to read-only memory. It makes the following changes:

1. PTR_TO_RDWR_BUF -> PTR_TO_BUF
2. PTR_TO_RDONLY_BUF -> PTR_TO_BUF | MEM_RDONLY

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-6-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b453361384)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic4fa4f9f5832c9d2b65ea0272367fbbb8007f24c
2022-06-18 18:28:44 +00:00
Hao Luo 13fc6550b0 UPSTREAM: bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL
commit c25b2ae136039ffa820c26138ed4a5e5f3ab3841 upstream.

We have introduced a new type to make bpf_reg composable, by
allocating bits in the type to represent flags.

One of the flags is PTR_MAYBE_NULL which indicates a pointer
may be NULL. This patch switches the qualified reg_types to
use this flag. The reg_types changed in this patch include:

1. PTR_TO_MAP_VALUE_OR_NULL
2. PTR_TO_SOCKET_OR_NULL
3. PTR_TO_SOCK_COMMON_OR_NULL
4. PTR_TO_TCP_SOCK_OR_NULL
5. PTR_TO_BTF_ID_OR_NULL
6. PTR_TO_MEM_OR_NULL
7. PTR_TO_RDONLY_BUF_OR_NULL
8. PTR_TO_RDWR_BUF_OR_NULL

[haoluo: backport notes
 There was a reg_type_may_be_null() in adjust_ptr_min_max_vals() in
 5.15.x, but didn't exist in the upstream commit. This backport
 converted that reg_type_may_be_null() to type_may_be_null() as well.]

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/r/20211217003152.48334-5-haoluo@google.com
Cc: stable@vger.kernel.org # 5.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8d38cde47a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iad81be90619024512c0fd7f23e7115aec60244a4
2022-06-18 18:28:44 +00:00
Liangliang Li e4e3aadd01 ANDROID: vendor_hooks: Add hooks to tcp/udp send/recv msg functions.
Add hook to tcp/udp to collect network info and do performance tuning.

Bug: 190523684

Change-Id: Id790a381d5ce6c35a747697510f14678ccf3ff2f
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit 81c8161bed77ae0da88c78ff822220ba1a2a7a8a)
2022-06-09 21:32:54 +00:00
Rameshkumar Sundaram f0e3d26c63 UPSTREAM: nl80211: Parse NL80211_ATTR_HE_BSS_COLOR as a part of nl80211_parse_beacon
NL80211_ATTR_HE_BSS_COLOR attribute can be included in both
NL80211_CMD_START_AP and NL80211_CMD_SET_BEACON commands.

Move he_bss_color from cfg80211_ap_settings to cfg80211_beacon_data
and parse NL80211_ATTR_HE_BSS_COLOR as a part of nl80211_parse_beacon()
to have bss color settings parsed for both start ap and set beacon
commands.
Add a new flag he_bss_color_valid to indicate whether
NL80211_ATTR_HE_BSS_COLOR attribute is included.

Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Link: https://lore.kernel.org/r/1649867295-7204-2-git-send-email-quic_ramess@quicinc.com
[fix build ...]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 233160029
(cherry picked from commit 3d48cb74816d8468f0235ce9a867a2d7b9832693)
Change-Id: Iceef7d7927fa3bbb49ced1583461a87b151f20e4
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-06-01 09:32:35 -07:00
Muna Sinada 20b85fc84c UPSTREAM: cfg80211: support disabling EHT mode
Allow userspace to disable EHT mode during association.

Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Link: https://lore.kernel.org/r/20220323224636.20211-1-quic_alokad@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 233160029
(cherry picked from commit 36f8423597000bd7d5e48b7b306e1d0958e72359)
Change-Id: I06d3c8895590df47980b4f3fce96a0f8d1292be2
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-06-01 09:32:35 -07:00
Dimitri John Ledkov 7a7dd66fa1 UPSTREAM: cfg80211: declare MODULE_FIRMWARE for regulatory.db
Add MODULE_FIRMWARE declarations for regulatory.db and
regulatory.db.p7s such that userspace tooling can discover and include
these files.

Cc: stable@vger.kernel.org
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Link: https://lore.kernel.org/r/20220414125004.267819-1-dimitri.ledkov@canonical.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 233160029
(cherry picked from commit 7bc7981eeebe1b8e603ad2ffc5e84f4df76920dd)
Change-Id: I475dab9c2759f3e9add66352acda7aa75a945f52
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-06-01 09:32:35 -07:00
Johannes Berg fea05e64a3 UPSTREAM: nl80211: rework internal_flags usage
Since internal_flags is only 8 bits, we can only have one
more internal flag. However, we can obviously never use all
of possible the combinations, in fact, we only use 14 of
them (including no flags).

Since we want more flags for MLO (multi-link operation) in
the future, refactor the code to use a flags selector, so
wrap all of the .internal_flags assignments in a IFLAGS()
macro which selects the combination according to the pre-
defined list of combinations.

When we need a new combination, we'll have to add it, but
again we will never use all possible combinations.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20220414140402.70ddf8af3eb0.I2cc38cb6a10bb4c3863ec9ee97edbcc70a07aa4b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 233160029
(cherry picked from commit 2182db91e0016ca2b451426290c3b368ba9f6fdc)
Change-Id: I6ca31b633ce0af9829d70a377906115d23d1c4ad
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-06-01 09:32:35 -07:00
Johannes Berg d58d5c6aaa UPSTREAM: nl80211: don't hold RTNL in color change request
It's not necessary to hold the RTNL across color change
requests, since all the inner locking needs only the
wiphy mutex which we already hold as well.

Fixes: 0d2ab3aea5 ("nl80211: add support for BSS coloring")
Link: https://lore.kernel.org/r/20220414140402.32e03e8c261b.I5e7dc6bc563a129b938c43298da6bb4e812400a5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 233160029
(cherry picked from commit 1b550a0bebfc0b69d6ec08fe6eb58953a8aec48a)
Change-Id: Ic03ef23eb9b1ff97b01a3fb8f227e84004a17d2d
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-06-01 09:32:34 -07:00
Johannes Berg b428445e8d UPSTREAM: cfg80211: remove cfg80211_get_chan_state()
We haven't used this function for years, since commit c781944b71
("cfg80211: Remove unused cfg80211_can_use_iftype_chan()") which
itself removed a function unused since commit 97dc94f1d9
("cfg80211: remove channel_switch combination check"), almost eight
years ago.

Also remove the now unused enum cfg80211_chan_mode and some struct
members that were only used for this function.

Link: https://lore.kernel.org/r/20220412220958.1a191dca19d7.Ide4448f02d0e2f1ca2992971421ffc1933a5370a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 233160029
(cherry picked from commit 34c9a0e71cbb316f360919353273b185c2780cd7)
Change-Id: I287a54e33da467c5b3a128a7ed6eaade37f456bf
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-06-01 09:32:34 -07:00
Greg Kroah-Hartman eda21069fa Revert "Revert "netfilter: nft_ct: fix use after free when attaching zone template""
This reverts commit 6910f0f08b.

It was originally reverted as it broke the abi but can now be safely
brought back.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I18b7c0231c31517e2108febe00b07b0e661617a7
2022-06-01 09:32:33 -07:00
Greg Kroah-Hartman 4b85648b91 Revert "Revert "netfilter: conntrack: avoid useless indirection during conntrack destruction""
This reverts commit 8b226103c9.

It was originally reverted as it broke the abi but can now be safely
brought back.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If91a2ea72060e1cadc14cdb18e5e8a6bfe54a594
2022-06-01 09:32:33 -07:00
Greg Kroah-Hartman 875f2eb55f Revert "Revert "netfilter: conntrack: convert to refcount_t api""
This reverts commit e80661dff2.

It was originally reverted as it broke the abi but can now be safely
brought back.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8cd3d50680e6493d7aa4e714e3b6f343bda2dc9d
2022-06-01 09:32:33 -07:00
Greg Kroah-Hartman 9306af3c47 Revert "Revert "tcp: ensure to use the most recently sent skb when filling the rate sample""
This reverts commit 5deab346ca.

It was originally reverted as it broke the abi but can now be safely
brought back.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1a084a80d2f0c669874468ad897c7d104016f1c6
2022-06-01 09:32:33 -07:00
Greg Kroah-Hartman 3efd03d0af Revert "Revert "ipv6: make ip6_rt_gc_expire an atomic_t""
This reverts commit 02428be2b4.

It was originally reverted as it broke the abi but can now be safely
brought back.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic084ca493d3e00c9768afd28322fdbfc012db66a
2022-06-01 09:32:33 -07:00
Maciej Żenczykowski 8efe85f936 FROMGIT: xfrm: do not set IPv4 DF flag when encapsulating IPv6 frames <= 1280 bytes.
One may want to have DF set on large packets to support discovering
path mtu and limiting the size of generated packets (hence not
setting the XFRM_STATE_NOPMTUDISC tunnel flag), while still
supporting networks that are incapable of carrying even minimal
sized IPv6 frames (post encapsulation).

Having IPv4 Don't Frag bit set on encapsulated IPv6 frames that
are not larger than the minimum IPv6 mtu of 1280 isn't useful,
because the resulting ICMP Fragmentation Required error isn't
actionable (even assuming you receive it) because IPv6 will not
drop it's path mtu below 1280 anyway.  While the IPv4 stack
could prefrag the packets post encap, this requires the ICMP
error to be successfully delivered and causes a loss of the
original IPv6 frame (thus requiring a retransmit and latency
hit).  Luckily with IPv4 if we simply don't set the DF flag,
we'll just make further fragmenting the packets some other
router's problems.

We'll still learn the correct IPv4 path mtu through encapsulation
of larger IPv6 frames.

I'm still not convinced this patch is entirely sufficient to make
everything happy... but I don't see how it could possibly
make things worse.

See also recent:
  4ff2980b6bd2 'xfrm: fix tunnel model fragmentation behavior'
and friends

Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Lina Wang <lina.wang@mediatek.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Maciej Zenczykowski <maze@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 6821ad8770340825f17962cf5ef64ebaffee7fd7 https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master)

Bug: 203183943
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie7701ebc63b1e2a974114538befd278154eb3bc6
2022-06-01 08:52:42 +00:00
Johannes Berg 925b0dbfe4 UPSTREAM: nl80211: show SSID for P2P_GO interfaces
There's no real reason not to send the SSID to userspace
when it requests information about P2P_GO, it is, in that
respect, exactly the same as AP interfaces. Fix that.

Fixes: 44905265bc ("nl80211: don't expose wdev->ssid for most interfaces")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20220318134656.14354ae223f0.Ia25e85a512281b92e1645d4160766a4b1a471597@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 233160029
(cherry picked from commit a75971bc2b8453630e9f85e0beaa4da8db8277a3)
Change-Id: Idfa7dcd16317073ce90081b7110bfc0c659898e5
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-05-26 01:57:48 +00:00
Greg Kroah-Hartman 910b540ffa This is the 5.15.41 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmKErdYACgkQONu9yGCS
 aT4LIg//bqU/qlVBJq3v3QCfN93SOXwECuPXi0e8p3aG/ptn1pzV0A5+rDD4TXeU
 mpw8oWSNQC0Wn8mag9poCvLFaSHuMIo2wPoPOwpRyb0BfhXCaWE4s1HbX49dNi2l
 9V76KC4JH69zaHtEmnBy83zzr4nyRG6q3bTd1hD3uJaSg6+2E+DfIK7MUSAyhyPU
 DSi2CSHgxZkBEJIVncCPPhz4HX7RJIav51EwAZlnqW6eX3osEe9Qh1b82qcatXIF
 rC/w74mQoRnghL0FRwQ5Z4mTEcgBI3lYoKJMkt8iZgOm9nBq1F62gXysKojmjDYc
 AvP97Jt+hF9hDFUfR2wW/sA/rsRhw1mx0LoFu96fc15Nxiyh8b/MFD+b3a2CqtN9
 szggwoezx90RbGOsc1zNhoX3VmZ2xMeVyAVg4RCscxXiO5FR1DqV4mUlbXoQx9ah
 I9+GYtc0vs9BP9pucK2kx7fzJ+eW93jIZVXHuh6mcspu7sdTBQam+ERH1gMIyCki
 OXcg0HCTLQi26MNMkrdX+RebwHxB7tbLXUXqYzQKEWjsLtCyv7LYmsRV+RZSyZ1p
 vqKs4gTjLPmcINebsT80mYZSH560lXkjl6Z0H5U23NQO8RG3QewrKZkHqwOn5zyQ
 aF5fnmVTVcMbT8BK3qCadr00Giz5usnw8R9am5EY1ELzo48207A=
 =35Fl
 -----END PGP SIGNATURE-----

Merge 5.15.41 into android13-5.15

Changes in 5.15.41
	batman-adv: Don't skb_split skbuffs with frag_list
	iwlwifi: iwl-dbg: Use del_timer_sync() before freeing
	hwmon: (tmp401) Add OF device ID table
	mac80211: Reset MBSSID parameters upon connection
	net: Fix features skip in for_each_netdev_feature()
	net: mscc: ocelot: fix last VCAP IS1/IS2 filter persisting in hardware when deleted
	net: mscc: ocelot: fix VCAP IS2 filters matching on both lookups
	net: mscc: ocelot: restrict tc-trap actions to VCAP IS2 lookup 0
	net: mscc: ocelot: avoid corrupting hardware counters when moving VCAP filters
	fbdev: simplefb: Cleanup fb_info in .fb_destroy rather than .remove
	fbdev: efifb: Cleanup fb_info in .fb_destroy rather than .remove
	fbdev: vesafb: Cleanup fb_info in .fb_destroy rather than .remove
	platform/surface: aggregator: Fix initialization order when compiling as builtin module
	ice: Fix race during aux device (un)plugging
	ice: fix PTP stale Tx timestamps cleanup
	ipv4: drop dst in multicast routing path
	drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name()
	netlink: do not reset transport header in netlink_recvmsg()
	net: chelsio: cxgb4: Avoid potential negative array offset
	fbdev: efifb: Fix a use-after-free due early fb_info cleanup
	sfc: Use swap() instead of open coding it
	net: sfc: fix memory leak due to ptp channel
	mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection
	nfs: fix broken handling of the softreval mount option
	ionic: fix missing pci_release_regions() on error in ionic_probe()
	dim: initialize all struct fields
	hwmon: (ltq-cputemp) restrict it to SOC_XWAY
	procfs: prevent unprivileged processes accessing fdinfo dir
	selftests: vm: Makefile: rename TARGETS to VMTARGETS
	arm64: vdso: fix makefile dependency on vdso.so
	virtio: fix virtio transitional ids
	s390/ctcm: fix variable dereferenced before check
	s390/ctcm: fix potential memory leak
	s390/lcs: fix variable dereferenced before check
	net/sched: act_pedit: really ensure the skb is writable
	net: ethernet: mediatek: ppe: fix wrong size passed to memset()
	net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral
	drm/vc4: hdmi: Fix build error for implicit function declaration
	net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down()
	net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending
	net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe()
	tls: Fix context leak on tls_device_down
	drm/vmwgfx: Fix fencing on SVGAv3
	gfs2: Fix filesystem block deallocation for short writes
	hwmon: (f71882fg) Fix negative temperature
	RDMA/irdma: Fix deadlock in irdma_cleanup_cm_core()
	iommu: arm-smmu: disable large page mappings for Nvidia arm-smmu
	ASoC: max98090: Reject invalid values in custom control put()
	ASoC: max98090: Generate notifications on changes for custom control
	ASoC: ops: Validate input values in snd_soc_put_volsw_range()
	s390: disable -Warray-bounds
	ASoC: SOF: Fix NULL pointer exception in sof_pci_probe callback
	net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
	net: sfp: Add tx-fault workaround for Huawei MA5671A SFP ONT
	secure_seq: use the 64 bits of the siphash for port offset calculation
	tcp: use different parts of the port_offset for index and offset
	tcp: resalt the secret every 10 seconds
	tcp: add small random increments to the source port
	tcp: dynamically allocate the perturb table used by source ports
	tcp: increase source port perturb table to 2^16
	tcp: drop the hash_32() part from the index calculation
	interconnect: Restore sync state by ignoring ipa-virt in provider count
	firmware_loader: use kernel credentials when reading firmware
	KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context()
	usb: xhci-mtk: fix fs isoc's transfer error
	x86/mm: Fix marking of unused sub-pmd ranges
	tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
	tty: n_gsm: fix buffer over-read in gsm_dlci_data()
	tty: n_gsm: fix mux activation issues in gsm_config()
	usb: cdc-wdm: fix reading stuck on device close
	usb: typec: tcpci: Don't skip cleanup in .remove() on error
	usb: typec: tcpci_mt6360: Update for BMC PHY setting
	USB: serial: pl2303: add device id for HP LM930 Display
	USB: serial: qcserial: add support for Sierra Wireless EM7590
	USB: serial: option: add Fibocom L610 modem
	USB: serial: option: add Fibocom MA510 modem
	slimbus: qcom: Fix IRQ check in qcom_slim_probe
	fsl_lpuart: Don't enable interrupts too early
	serial: 8250_mtk: Fix UART_EFR register address
	serial: 8250_mtk: Fix register address for XON/XOFF character
	ceph: fix setting of xattrs on async created inodes
	Revert "mm/memory-failure.c: skip huge_zero_page in memory_failure()"
	mm/huge_memory: do not overkill when splitting huge_zero_page
	drm/vmwgfx: Disable command buffers on svga3 without gbobjects
	drm/nouveau/tegra: Stop using iommu_present()
	i40e: i40e_main: fix a missing check on list iterator
	net: atlantic: always deep reset on pm op, fixing up my null deref regression
	net: phy: Fix race condition on link status change
	writeback: Avoid skipping inode writeback
	cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp()
	arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map
	net: phy: micrel: Do not use kszphy_suspend/resume for KSZ8061
	net: phy: micrel: Pass .probe for KS8737
	SUNRPC: Ensure that the gssproxy client can start in a connected state
	drm/vmwgfx: Initialize drm_mode_fb_cmd2
	Revert "drm/amd/pm: keep the BACO feature enabled for suspend"
	dma-buf: call dma_buf_stats_setup after dmabuf is in valid list
	mm/hwpoison: use pr_err() instead of dump_page() in get_any_page()
	SUNRPC: Ensure we flush any closed sockets before xs_xprt_free()
	ping: fix address binding wrt vrf
	usb: gadget: uvc: rename function to be more consistent
	usb: gadget: uvc: allow for application to cleanly shutdown
	Linux 5.15.41

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia65cdbbddf553237d6a3a38efb9bcb2fcc3990ec
2022-05-18 11:31:34 +02:00
Nicolas Dichtel 6a060190f2 ping: fix address binding wrt vrf
commit e1a7ac6f3ba6e157adcd0ca94d92a401f1943f56 upstream.

When ping_group_range is updated, 'ping' uses the DGRAM ICMP socket,
instead of an IP raw socket. In this case, 'ping' is unable to bind its
socket to a local address owned by a vrflite.

Before the patch:
$ sysctl -w net.ipv4.ping_group_range='0  2147483647'
$ ip link add blue type vrf table 10
$ ip link add foo type dummy
$ ip link set foo master blue
$ ip link set foo up
$ ip addr add 192.168.1.1/24 dev foo
$ ip addr add 2001::1/64 dev foo
$ ip vrf exec blue ping -c1 -I 192.168.1.1 192.168.1.2
ping: bind: Cannot assign requested address
$ ip vrf exec blue ping6 -c1 -I 2001::1 2001::2
ping6: bind icmp socket: Cannot assign requested address

CC: stable@vger.kernel.org
Fixes: 1b69c6d0ae ("net: Introduce L3 Master device abstraction")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-18 10:26:57 +02:00
Trond Myklebust 54f6834b28 SUNRPC: Ensure we flush any closed sockets before xs_xprt_free()
commit f00432063db1a0db484e85193eccc6845435b80e upstream.

We must ensure that all sockets are closed before we call xprt_free()
and release the reference to the net namespace. The problem is that
calling fput() will defer closing the socket until delayed_fput() gets
called.
Let's fix the situation by allowing rpciod and the transport teardown
code (which runs on the system wq) to call __fput_sync(), and directly
close the socket.

Reported-by: Felix Fu <foyjog@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: a73881c96d ("SUNRPC: Fix an Oops in udp_poll()")
Cc: stable@vger.kernel.org # 5.1.x: 3be232f11a3c: SUNRPC: Prevent immediate close+reconnect
Cc: stable@vger.kernel.org # 5.1.x: 89f42494f92f: SUNRPC: Don't call connect() more than once on a TCP socket
Cc: stable@vger.kernel.org # 5.1.x
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Meena Shanmugam <meenashanmugam@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-18 10:26:57 +02:00
Trond Myklebust e05949240b SUNRPC: Ensure that the gssproxy client can start in a connected state
commit fd13359f54ee854f00134abc6be32da94ec53dbf upstream.

Ensure that the gssproxy client connects to the server from the gssproxy
daemon process context so that the AF_LOCAL socket connection is done
using the correct path and namespaces.

Fixes: 1d658336b0 ("SUNRPC: Add RPC based upcall mechanism for RPCGSS auth")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-18 10:26:56 +02:00
Willy Tarreau f26c6f9404 tcp: drop the hash_32() part from the index calculation
[ Upstream commit e8161345ddbb66e449abde10d2fdce93f867eba9 ]

In commit 190cc82489 ("tcp: change source port randomizarion at
connect() time"), the table_perturb[] array was introduced and an
index was taken from the port_offset via hash_32(). But it turns
out that hash_32() performs a multiplication while the input here
comes from the output of SipHash in secure_seq, that is well
distributed enough to avoid the need for yet another hash.

Suggested-by: Amit Klein <aksecurity@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:53 +02:00
Willy Tarreau 952a238d77 tcp: increase source port perturb table to 2^16
[ Upstream commit 4c2c8f03a5ab7cb04ec64724d7d176d00bcc91e5 ]

Moshe Kol, Amit Klein, and Yossi Gilad reported being able to accurately
identify a client by forcing it to emit only 40 times more connections
than there are entries in the table_perturb[] table. The previous two
improvements consisting in resalting the secret every 10s and adding
randomness to each port selection only slightly improved the situation,
and the current value of 2^8 was too small as it's not very difficult
to make a client emit 10k connections in less than 10 seconds.

Thus we're increasing the perturb table from 2^8 to 2^16 so that the
same precision now requires 2.6M connections, which is more difficult in
this time frame and harder to hide as a background activity. The impact
is that the table now uses 256 kB instead of 1 kB, which could mostly
affect devices making frequent outgoing connections. However such
components usually target a small set of destinations (load balancers,
database clients, perf assessment tools), and in practice only a few
entries will be visited, like before.

A live test at 1 million connections per second showed no performance
difference from the previous value.

Reported-by: Moshe Kol <moshe.kol@mail.huji.ac.il>
Reported-by: Yossi Gilad <yossi.gilad@mail.huji.ac.il>
Reported-by: Amit Klein <aksecurity@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:53 +02:00
Willy Tarreau 4a3eefa399 tcp: dynamically allocate the perturb table used by source ports
[ Upstream commit e9261476184be1abd486c9434164b2acbe0ed6c2 ]

We'll need to further increase the size of this table and it's likely
that at some point its size will not be suitable anymore for a static
table. Let's allocate it on boot from inet_hashinfo2_init(), which is
called from tcp_init().

Cc: Moshe Kol <moshe.kol@mail.huji.ac.il>
Cc: Yossi Gilad <yossi.gilad@mail.huji.ac.il>
Cc: Amit Klein <aksecurity@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:53 +02:00
Willy Tarreau b763fce193 tcp: add small random increments to the source port
[ Upstream commit ca7af0402550f9a0b3316d5f1c30904e42ed257d ]

Here we're randomly adding between 0 and 7 random increments to the
selected source port in order to add some noise in the source port
selection that will make the next port less predictable.

With the default port range of 32768-60999 this means a worst case
reuse scenario of 14116/8=1764 connections between two consecutive
uses of the same port, with an average of 14116/4.5=3137. This code
was stressed at more than 800000 connections per second to a fixed
target with all connections closed by the client using RSTs (worst
condition) and only 2 connections failed among 13 billion, despite
the hash being reseeded every 10 seconds, indicating a perfectly
safe situation.

Cc: Moshe Kol <moshe.kol@mail.huji.ac.il>
Cc: Yossi Gilad <yossi.gilad@mail.huji.ac.il>
Cc: Amit Klein <aksecurity@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:53 +02:00
Eric Dumazet f41f6336bf tcp: resalt the secret every 10 seconds
[ Upstream commit 4dfa9b438ee34caca4e6a4e5e961641807367f6f ]

In order to limit the ability for an observer to recognize the source
ports sequence used to contact a set of destinations, we should
periodically shuffle the secret. 10 seconds looks effective enough
without causing particular issues.

Cc: Moshe Kol <moshe.kol@mail.huji.ac.il>
Cc: Yossi Gilad <yossi.gilad@mail.huji.ac.il>
Cc: Amit Klein <aksecurity@gmail.com>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:53 +02:00
Willy Tarreau ff01554d87 tcp: use different parts of the port_offset for index and offset
[ Upstream commit 9e9b70ae923baf2b5e8a0ea4fd0c8451801ac526 ]

Amit Klein suggests that we use different parts of port_offset for the
table's index and the port offset so that there is no direct relation
between them.

Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Moshe Kol <moshe.kol@mail.huji.ac.il>
Cc: Yossi Gilad <yossi.gilad@mail.huji.ac.il>
Cc: Amit Klein <aksecurity@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:53 +02:00
Willy Tarreau 1a8ee547da secure_seq: use the 64 bits of the siphash for port offset calculation
[ Upstream commit b2d057560b8107c633b39aabe517ff9d93f285e3 ]

SipHash replaced MD5 in secure_ipv{4,6}_port_ephemeral() via commit
7cd23e5300 ("secure_seq: use SipHash in place of MD5"), but the output
remained truncated to 32-bit only. In order to exploit more bits from the
hash, let's make the functions return the full 64-bit of siphash_3u32().
We also make sure the port offset calculation in __inet_hash_connect()
remains done on 32-bit to avoid the need for div_u64_rem() and an extra
cost on 32-bit systems.

Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Moshe Kol <moshe.kol@mail.huji.ac.il>
Cc: Yossi Gilad <yossi.gilad@mail.huji.ac.il>
Cc: Amit Klein <aksecurity@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:53 +02:00
Maxim Mikityanskiy 70098cc956 tls: Fix context leak on tls_device_down
[ Upstream commit 3740651bf7e200109dd42d5b2fb22226b26f960a ]

The commit cited below claims to fix a use-after-free condition after
tls_device_down. Apparently, the description wasn't fully accurate. The
context stayed alive, but ctx->netdev became NULL, and the offload was
torn down without a proper fallback, so a bug was present, but a
different kind of bug.

Due to misunderstanding of the issue, the original patch dropped the
refcount_dec_and_test line for the context to avoid the alleged
premature deallocation. That line has to be restored, because it matches
the refcount_inc_not_zero from the same function, otherwise the contexts
that survived tls_device_down are leaked.

This patch fixes the described issue by restoring refcount_dec_and_test.
After this change, there is no leak anymore, and the fallback to
software kTLS still works.

Fixes: c55dcdd435 ("net/tls: Fix use-after-free after the TLS device goes down and up")
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20220512091830.678684-1-maximmi@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:51 +02:00
Guangguan Wang 8d75d66ff1 net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending
[ Upstream commit f3c46e41b32b6266cf60b0985c61748f53bf1c61 ]

Non blocking sendmsg will return -EAGAIN when any signal pending
and no send space left, while non blocking recvmsg return -EINTR
when signal pending and no data received. This may makes confused.
As TCP returns -EAGAIN in the conditions described above. Align the
behavior of smc with TCP.

Fixes: 846e344eb7 ("net/smc: add receive timeout check")
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>
Acked-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/20220512030820.73848-1-guangguan.wang@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:51 +02:00
Paolo Abeni b773640d5b net/sched: act_pedit: really ensure the skb is writable
[ Upstream commit 8b796475fd7882663a870456466a4fb315cc1bd6 ]

Currently pedit tries to ensure that the accessed skb offset
is writable via skb_unclone(). The action potentially allows
touching any skb bytes, so it may end-up modifying shared data.

The above causes some sporadic MPTCP self-test failures, due to
this code:

	tc -n $ns2 filter add dev ns2eth$i egress \
		protocol ip prio 1000 \
		handle 42 fw \
		action pedit munge offset 148 u8 invert \
		pipe csum tcp \
		index 100

The above modifies a data byte outside the skb head and the skb is
a cloned one, carrying a TCP output packet.

This change addresses the issue by keeping track of a rough
over-estimate highest skb offset accessed by the action and ensuring
such offset is really writable.

Note that this may cause performance regressions in some scenarios,
but hopefully pedit is not in the critical path.

Fixes: db2c24175d ("act_pedit: access skb->data safely")
Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Tested-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://lore.kernel.org/r/1fcf78e6679d0a287dd61bb0f04730ce33b3255d.1652194627.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:50 +02:00
Eric Dumazet fa189827f0 netlink: do not reset transport header in netlink_recvmsg()
[ Upstream commit d5076fe4049cadef1f040eda4aaa001bb5424225 ]

netlink_recvmsg() does not need to change transport header.

If transport header was needed, it should have been reset
by the producer (netlink_dump()), not the consumer(s).

The following trace probably happened when multiple threads
were using MSG_PEEK.

BUG: KCSAN: data-race in netlink_recvmsg / netlink_recvmsg

write to 0xffff88811e9f15b2 of 2 bytes by task 32012 on cpu 1:
 skb_reset_transport_header include/linux/skbuff.h:2760 [inline]
 netlink_recvmsg+0x1de/0x790 net/netlink/af_netlink.c:1978
 sock_recvmsg_nosec net/socket.c:948 [inline]
 sock_recvmsg net/socket.c:966 [inline]
 __sys_recvfrom+0x204/0x2c0 net/socket.c:2097
 __do_sys_recvfrom net/socket.c:2115 [inline]
 __se_sys_recvfrom net/socket.c:2111 [inline]
 __x64_sys_recvfrom+0x74/0x90 net/socket.c:2111
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

write to 0xffff88811e9f15b2 of 2 bytes by task 32005 on cpu 0:
 skb_reset_transport_header include/linux/skbuff.h:2760 [inline]
 netlink_recvmsg+0x1de/0x790 net/netlink/af_netlink.c:1978
 ____sys_recvmsg+0x162/0x2f0
 ___sys_recvmsg net/socket.c:2674 [inline]
 __sys_recvmsg+0x209/0x3f0 net/socket.c:2704
 __do_sys_recvmsg net/socket.c:2714 [inline]
 __se_sys_recvmsg net/socket.c:2711 [inline]
 __x64_sys_recvmsg+0x42/0x50 net/socket.c:2711
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffff -> 0x0000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 32005 Comm: syz-executor.4 Not tainted 5.18.0-rc1-syzkaller-00328-ge1f700ebd6be-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Link: https://lore.kernel.org/r/20220505161946.2867638-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:49 +02:00
Lokesh Dhoundiyal 337530058e ipv4: drop dst in multicast routing path
[ Upstream commit 9e6c6d17d1d6a3f1515ce399f9a011629ec79aa0 ]

kmemleak reports the following when routing multicast traffic over an
ipsec tunnel.

Kmemleak output:
unreferenced object 0x8000000044bebb00 (size 256):
  comm "softirq", pid 0, jiffies 4294985356 (age 126.810s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 80 00 00 00 05 13 74 80  ..............t.
    80 00 00 00 04 9b bf f9 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000f83947e0>] __kmalloc+0x1e8/0x300
    [<00000000b7ed8dca>] metadata_dst_alloc+0x24/0x58
    [<0000000081d32c20>] __ipgre_rcv+0x100/0x2b8
    [<00000000824f6cf1>] gre_rcv+0x178/0x540
    [<00000000ccd4e162>] gre_rcv+0x7c/0xd8
    [<00000000c024b148>] ip_protocol_deliver_rcu+0x124/0x350
    [<000000006a483377>] ip_local_deliver_finish+0x54/0x68
    [<00000000d9271b3a>] ip_local_deliver+0x128/0x168
    [<00000000bd4968ae>] xfrm_trans_reinject+0xb8/0xf8
    [<0000000071672a19>] tasklet_action_common.isra.16+0xc4/0x1b0
    [<0000000062e9c336>] __do_softirq+0x1fc/0x3e0
    [<00000000013d7914>] irq_exit+0xc4/0xe0
    [<00000000a4d73e90>] plat_irq_dispatch+0x7c/0x108
    [<000000000751eb8e>] handle_int+0x16c/0x178
    [<000000001668023b>] _raw_spin_unlock_irqrestore+0x1c/0x28

The metadata dst is leaked when ip_route_input_mc() updates the dst for
the skb. Commit f38a9eb1f7 ("dst: Metadata destinations") correctly
handled dropping the dst in ip_route_input_slow() but missed the
multicast case which is handled by ip_route_input_mc(). Drop the dst in
ip_route_input_mc() avoiding the leak.

Fixes: f38a9eb1f7 ("dst: Metadata destinations")
Signed-off-by: Lokesh Dhoundiyal <lokesh.dhoundiyal@alliedtelesis.co.nz>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20220505020017.3111846-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:48 +02:00
Manikanta Pubbisetty afc080e42f mac80211: Reset MBSSID parameters upon connection
[ Upstream commit 86af062f40a73bf63321694e6bf637144f0383fe ]

Currently MBSSID parameters in struct ieee80211_bss_conf
are not reset upon connection. This could be problematic
with some drivers in a scenario where the device first
connects to a non-transmit BSS and then connects to a
transmit BSS of a Multi BSS AP. The MBSSID parameters
which are set after connecting to a non-transmit BSS will
not be reset and the same parameters will be passed on to
the driver during the subsequent connection to a transmit
BSS of a Multi BSS AP.

For example, firmware running on the ath11k device uses the
Multi BSS data for tracking the beacon of a non-transmit BSS
and reports the driver when there is a beacon miss. If we do
not reset the MBSSID parameters during the subsequent
connection to a transmit BSS, then the driver would have
wrong MBSSID data and FW would be looking for an incorrect
BSSID in the MBSSID beacon of a Multi BSS AP and reports
beacon loss leading to an unstable connection.

Reset the MBSSID parameters upon every connection to solve this
problem.

Fixes: 78ac51f815 ("mac80211: support multi-bssid")
Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
Link: https://lore.kernel.org/r/20220428052744.27040-1-quic_mpubbise@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:47 +02:00
Sven Eckelmann 8f37aad74f batman-adv: Don't skb_split skbuffs with frag_list
[ Upstream commit a063f2fba3fa633a599253b62561051ac185fa99 ]

The receiving interface might have used GRO to receive more fragments than
MAX_SKB_FRAGS fragments. In this case, these will not be stored in
skb_shinfo(skb)->frags but merged into the frag list.

batman-adv relies on the function skb_split to split packets up into
multiple smaller packets which are not larger than the MTU on the outgoing
interface. But this function cannot handle frag_list entries and is only
operating on skb_shinfo(skb)->frags. If it is still trying to split such an
skb and xmit'ing it on an interface without support for NETIF_F_FRAGLIST,
then validate_xmit_skb() will try to linearize it. But this fails due to
inconsistent information. And __pskb_pull_tail will trigger a BUG_ON after
skb_copy_bits() returns an error.

In case of entries in frag_list, just linearize the skb before operating on
it with skb_split().

Reported-by: Felix Kaechele <felix@kaechele.ca>
Fixes: c6c8fea297 ("net: Add batman-adv meshing protocol")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Tested-by: Felix Kaechele <felix@kaechele.ca>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:47 +02:00
Greg Kroah-Hartman 0bfa00b6ba Merge 5.15.40 into android13-5.15
Changes in 5.15.40
	x86/lib/atomic64_386_32: Rename things
	x86: Prepare asm files for straight-line-speculation
	x86: Prepare inline-asm for straight-line-speculation
	objtool: Add straight-line-speculation validation
	x86/alternative: Relax text_poke_bp() constraint
	kbuild: move objtool_args back to scripts/Makefile.build
	x86: Add straight-line-speculation mitigation
	tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy'
	kvm/emulate: Fix SETcc emulation function offsets with SLS
	crypto: x86/poly1305 - Fixup SLS
	objtool: Fix SLS validation for kcov tail-call replacement
	Bluetooth: Fix the creation of hdev->name
	rfkill: uapi: fix RFKILL_IOCTL_MAX_SIZE ioctl request definition
	udf: Avoid using stale lengthOfImpUse
	mm: fix missing cache flush for all tail pages of compound page
	mm: hugetlb: fix missing cache flush in copy_huge_page_from_user()
	mm: shmem: fix missing cache flush in shmem_mfill_atomic_pte()
	mm: userfaultfd: fix missing cache flush in mcopy_atomic_pte() and __mcopy_atomic()
	mm/hwpoison: fix error page recovered but reported "not recovered"
	mm/mlock: fix potential imbalanced rlimit ucounts adjustment
	mm: fix invalid page pointer returned with FOLL_PIN gups
	Linux 5.15.40

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib068d0412565187435c8aeeeb22b683b6aa3a9b1
2022-05-18 09:40:16 +02:00
Greg Kroah-Hartman 2bde857bee Merge 5.15.39 into android13-5.15
Changes in 5.15.39
	MIPS: Fix CP0 counter erratum detection for R4k CPUs
	parisc: Merge model and model name into one line in /proc/cpuinfo
	ALSA: hda/realtek: Add quirk for Yoga Duet 7 13ITL6 speakers
	ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
	mmc: sdhci-msm: Reset GCC_SDCC_BCR register for SDHC
	mmc: sunxi-mmc: Fix DMA descriptors allocated above 32 bits
	mmc: core: Set HS clock speed before sending HS CMD13
	gpiolib: of: fix bounds check for 'gpio-reserved-ranges'
	x86/fpu: Prevent FPU state corruption
	KVM: x86/svm: Account for family 17h event renumberings in amd_pmc_perf_hw_id
	iommu/vt-d: Calculate mask for non-aligned flushes
	iommu/arm-smmu-v3: Fix size calculation in arm_smmu_mm_invalidate_range()
	drm/amd/display: Avoid reading audio pattern past AUDIO_CHANNELS_COUNT
	drm/amdgpu: do not use passthrough mode in Xen dom0
	RISC-V: relocate DTB if it's outside memory region
	Revert "SUNRPC: attempt AF_LOCAL connect on setup"
	timekeeping: Mark NMI safe time accessors as notrace
	firewire: fix potential uaf in outbound_phy_packet_callback()
	firewire: remove check of list iterator against head past the loop body
	firewire: core: extend card->lock in fw_core_handle_bus_reset
	net: stmmac: disable Split Header (SPH) for Intel platforms
	genirq: Synchronize interrupt thread startup
	ASoC: da7219: Fix change notifications for tone generator frequency
	ASoC: wm8958: Fix change notifications for DSP controls
	ASoC: meson: Fix event generation for AUI ACODEC mux
	ASoC: meson: Fix event generation for G12A tohdmi mux
	ASoC: meson: Fix event generation for AUI CODEC mux
	s390/dasd: fix data corruption for ESE devices
	s390/dasd: prevent double format of tracks for ESE devices
	s390/dasd: Fix read for ESE with blksize < 4k
	s390/dasd: Fix read inconsistency for ESE DASD devices
	can: grcan: grcan_close(): fix deadlock
	can: isotp: remove re-binding of bound socket
	can: grcan: use ofdev->dev when allocating DMA memory
	can: grcan: grcan_probe(): fix broken system id check for errata workaround needs
	can: grcan: only use the NAPI poll budget for RX
	nfc: replace improper check device_is_registered() in netlink related functions
	nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
	NFC: netlink: fix sleep in atomic bug when firmware download timeout
	gpio: visconti: Fix fwnode of GPIO IRQ
	gpio: pca953x: fix irq_stat not updated when irq is disabled (irq_mask not set)
	hwmon: (adt7470) Fix warning on module removal
	hwmon: (pmbus) disable PEC if not enabled
	ASoC: dmaengine: Restore NULL prepare_slave_config() callback
	ASoC: soc-ops: fix error handling
	iommu/vt-d: Drop stop marker messages
	iommu/dart: check return value after calling platform_get_resource()
	net/mlx5e: Fix trust state reset in reload
	net/mlx5e: Don't match double-vlan packets if cvlan is not set
	net/mlx5e: CT: Fix queued up restore put() executing after relevant ft release
	net/mlx5e: Fix the calling of update_buffer_lossy() API
	net/mlx5: Avoid double clear or set of sync reset requested
	net/mlx5: Fix deadlock in sync reset flow
	selftests/seccomp: Don't call read() on TTY from background pgrp
	SUNRPC release the transport of a relocated task with an assigned transport
	RDMA/siw: Fix a condition race issue in MPA request processing
	RDMA/irdma: Flush iWARP QP if modified to ERR from RTR state
	RDMA/irdma: Reduce iWARP QP destroy time
	RDMA/irdma: Fix possible crash due to NULL netdev in notifier
	NFSv4: Don't invalidate inode attributes on delegation return
	net: ethernet: mediatek: add missing of_node_put() in mtk_sgmii_init()
	net: dsa: mt7530: add missing of_node_put() in mt7530_setup()
	net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux()
	net: mdio: Fix ENOMEM return value in BCM6368 mux bus controller
	net: cpsw: add missing of_node_put() in cpsw_probe_dt()
	net: igmp: respect RCU rules in ip_mc_source() and ip_mc_msfilter()
	net: emaclite: Add error handling for of_address_to_resource()
	selftests/net: so_txtime: fix parsing of start time stamp on 32 bit systems
	selftests/net: so_txtime: usage(): fix documentation of default clock
	drm/msm/dp: remove fail safe mode related code
	btrfs: do not BUG_ON() on failure to update inode when setting xattr
	hinic: fix bug of wq out of bound access
	mld: respect RCU rules in ip6_mc_source() and ip6_mc_msfilter()
	rxrpc: Enable IPv6 checksums on transport socket
	selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
	bnxt_en: Fix possible bnxt_open() failure caused by wrong RFS flag
	bnxt_en: Fix unnecessary dropping of RX packets
	selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer
	smsc911x: allow using IRQ0
	btrfs: force v2 space cache usage for subpage mount
	btrfs: always log symlinks in full mode
	drm/amdgpu: unify BO evicting method in amdgpu_ttm
	drm/amdgpu: explicitly check for s0ix when evicting resources
	drm/amdgpu: don't set s3 and s0ix at the same time
	drm/amdgpu: Ensure HDA function is suspended before ASIC reset
	gpio: mvebu: drop pwm base assignment
	kvm: x86/cpuid: Only provide CPUID leaf 0xA if host has architectural PMU
	fbdev: Make fb_release() return -ENODEV if fbdev was unregistered
	net/mlx5: Fix slab-out-of-bounds while reading resource dump menu
	net/mlx5e: Lag, Fix use-after-free in fib event handler
	net/mlx5e: Lag, Fix fib_info pointer assignment
	net/mlx5e: Lag, Don't skip fib events on current dst
	iommu/dart: Add missing module owner to ops structure
	kvm: selftests: do not use bitfields larger than 32-bits for PTEs
	KVM: selftests: Silence compiler warning in the kvm_page_table_test
	x86/kvm: Preserve BSP MSR_KVM_POLL_CONTROL across suspend/resume
	KVM: x86: Do not change ICR on write to APIC_SELF_IPI
	KVM: x86/mmu: avoid NULL-pointer dereference on page freeing bugs
	KVM: LAPIC: Enable timer posted-interrupt only when mwait/hlt is advertised
	selftest/vm: verify mmap addr in mremap_test
	selftest/vm: verify remap destination address in mremap_test
	mmc: rtsx: add 74 Clocks in power on flow
	Revert "parisc: Mark sched_clock unstable only if clocks are not syncronized"
	rcu: Fix callbacks processing time limit retaining cond_resched()
	rcu: Apply callbacks processing time limit only on softirq
	PCI: pci-bridge-emul: Add description for class_revision field
	PCI: pci-bridge-emul: Add definitions for missing capabilities registers
	PCI: aardvark: Add support for DEVCAP2, DEVCTL2, LNKCAP2 and LNKCTL2 registers on emulated bridge
	PCI: aardvark: Clear all MSIs at setup
	PCI: aardvark: Comment actions in driver remove method
	PCI: aardvark: Disable bus mastering when unbinding driver
	PCI: aardvark: Mask all interrupts when unbinding driver
	PCI: aardvark: Fix memory leak in driver unbind
	PCI: aardvark: Assert PERST# when unbinding driver
	PCI: aardvark: Disable link training when unbinding driver
	PCI: aardvark: Disable common PHY when unbinding driver
	PCI: aardvark: Replace custom PCIE_CORE_INT_* macros with PCI_INTERRUPT_*
	PCI: aardvark: Rewrite IRQ code to chained IRQ handler
	PCI: aardvark: Check return value of generic_handle_domain_irq() when processing INTx IRQ
	PCI: aardvark: Make MSI irq_chip structures static driver structures
	PCI: aardvark: Make msi_domain_info structure a static driver structure
	PCI: aardvark: Use dev_fwnode() instead of of_node_to_fwnode(dev->of_node)
	PCI: aardvark: Refactor unmasking summary MSI interrupt
	PCI: aardvark: Add support for masking MSI interrupts
	PCI: aardvark: Fix setting MSI address
	PCI: aardvark: Enable MSI-X support
	PCI: aardvark: Add support for ERR interrupt on emulated bridge
	PCI: aardvark: Optimize writing PCI_EXP_RTCTL_PMEIE and PCI_EXP_RTSTA_PME on emulated bridge
	PCI: aardvark: Add support for PME interrupts
	PCI: aardvark: Fix support for PME requester on emulated bridge
	PCI: aardvark: Use separate INTA interrupt for emulated root bridge
	PCI: aardvark: Remove irq_mask_ack() callback for INTx interrupts
	PCI: aardvark: Don't mask irq when mapping
	PCI: aardvark: Drop __maybe_unused from advk_pcie_disable_phy()
	PCI: aardvark: Update comment about link going down after link-up
	Linux 5.15.39

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic51d6d05a0d99156c6fd844786e984aff8e7386a
2022-05-18 09:38:58 +02:00
Greg Kroah-Hartman 5deab346ca Revert "tcp: ensure to use the most recently sent skb when filling the rate sample"
This reverts commit d632cba7de which is
commit b253a0680ceadc5d7b4acca7aa2d870326cad8ad upstream.

It breaks the abi and is not needed for Android systems, so revert it.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6c40e8900bcc80b03e3d5fb2c99c9e95615b81ff
2022-05-18 09:01:05 +02:00
Greg Kroah-Hartman 4154968fe8 Merge 5.15.38 into android13-5.15
Changes in 5.15.38
	usb: mtu3: fix USB 3.0 dual-role-switch from device to host
	USB: quirks: add a Realtek card reader
	USB: quirks: add STRING quirk for VCOM device
	USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS
	USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader
	USB: serial: option: add support for Cinterion MV32-WA/MV32-WB
	USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions
	usb: xhci: tegra:Fix PM usage reference leak of tegra_xusb_unpowergate_partitions
	xhci: Enable runtime PM on second Alderlake controller
	xhci: stop polling roothubs after shutdown
	xhci: increase usb U3 -> U0 link resume timeout from 100ms to 500ms
	iio: dac: ad5592r: Fix the missing return value.
	iio: dac: ad5446: Fix read_raw not returning set value
	iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
	iio: imu: inv_icm42600: Fix I2C init possible nack
	usb: misc: fix improper handling of refcount in uss720_probe()
	usb: core: Don't hold the device lock while sleeping in do_proc_control()
	usb: typec: ucsi: Fix reuse of completion structure
	usb: typec: ucsi: Fix role swapping
	usb: gadget: uvc: Fix crash when encoding data for usb request
	usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
	usb: dwc3: Try usb-role-switch first in dwc3_drd_init
	usb: dwc3: core: Fix tx/rx threshold settings
	usb: dwc3: core: Only handle soft-reset in DCTL
	usb: dwc3: gadget: Return proper request status
	usb: dwc3: pci: add support for the Intel Meteor Lake-P
	usb: cdns3: Fix issue for clear halt endpoint
	usb: phy: generic: Get the vbus supply
	serial: imx: fix overrun interrupts in DMA mode
	serial: amba-pl011: do not time out prematurely when draining tx fifo
	serial: 8250: Also set sticky MCR bits in console restoration
	serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device
	arch_topology: Do not set llc_sibling if llc_id is invalid
	ceph: fix possible NULL pointer dereference for req->r_session
	bus: mhi: host: pci_generic: Add missing poweroff() PM callback
	bus: mhi: host: pci_generic: Flush recovery worker during freeze
	arm64: dts: imx8mm-venice: fix spi2 pin configuration
	pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
	hex2bin: make the function hex_to_bin constant-time
	hex2bin: fix access beyond string end
	riscv: patch_text: Fixup last cpu should be master
	x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests
	iocost: don't reset the inuse weight of under-weighted debtors
	virtio_net: fix wrong buf address calculation when using xdp
	cpufreq: qcom-hw: fix the race between LMH worker and cpuhp
	cpufreq: qcom-cpufreq-hw: Fix throttle frequency value on EPSS platforms
	video: fbdev: udlfb: properly check endpoint type
	arm64: dts: meson: remove CPU opps below 1GHz for G12B boards
	arm64: dts: meson: remove CPU opps below 1GHz for SM1 boards
	iio:imu:bmi160: disable regulator in error path
	mtd: rawnand: fix ecc parameters for mt7622
	xsk: Fix l2fwd for copy mode + busy poll combo
	arm64: dts: imx8qm: Correct SCU clock controller's compatible property
	USB: Fix xhci event ring dequeue pointer ERDP update issue
	ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue
	arm64: dts: imx8mn: Fix SAI nodes
	arm64: dts: meson-sm1-bananapi-m5: fix wrong GPIO pin labeling for CON1
	phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
	phy: samsung: exynos5250-sata: fix missing device put in probe error paths
	ARM: OMAP2+: Fix refcount leak in omap_gic_of_init
	bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific
	ARM: dts: dra7: Fix suspend warning for vpe powerdomain
	phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks
	ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
	ARM: dts: at91: sama5d4_xplained: fix pinctrl phandle name
	ARM: dts: at91: fix pinctrl phandles
	phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe
	phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
	interconnect: qcom: sdx55: Drop IP0 interconnects
	ARM: dts: Fix mmc order for omap3-gta04
	ARM: dts: am3517-evm: Fix misc pinmuxing
	ARM: dts: logicpd-som-lv: Fix wrong pinmuxing on OMAP35
	ipvs: correctly print the memory size of ip_vs_conn_tab
	phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe()
	pinctrl: mediatek: moore: Fix build error
	mtd: rawnand: Fix return value check of wait_for_completion_timeout
	mtd: fix 'part' field data corruption in mtd_info
	pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI
	memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode
	net: dsa: Add missing of_node_put() in dsa_port_link_register_of
	netfilter: nft_set_rbtree: overlap detection with element re-addition after deletion
	bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook
	pinctrl: rockchip: fix RK3308 pinmux bits
	tcp: md5: incorrect tcp_header_len for incoming connections
	pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested
	tcp: ensure to use the most recently sent skb when filling the rate sample
	wireguard: device: check for metadata_dst with skb_valid_dst()
	sctp: check asoc strreset_chunk in sctp_generate_reconf_event
	ARM: dts: imx6ull-colibri: fix vqmmc regulator
	arm64: dts: imx8mn-ddr4-evk: Describe the 32.768 kHz PMIC clock
	pinctrl: pistachio: fix use of irq_of_parse_and_map()
	cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe
	net: hns3: clear inited state and stop client after failed to register netdev
	net: hns3: modify the return code of hclge_get_ring_chain_from_mbx
	net: hns3: add validity check for message data length
	net: hns3: add return value for mailbox handling in PF
	net/smc: sync err code when tcp connection was refused
	ip_gre: Make o_seqno start from 0 in native mode
	ip6_gre: Make o_seqno start from 0 in native mode
	ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
	tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT
	tcp: make sure treq->af_specific is initialized
	bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
	clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource()
	cpufreq: qcom-cpufreq-hw: Clear dcvs interrupts
	net: bcmgenet: hide status block before TX timestamping
	net: phy: marvell10g: fix return value on error
	net: dsa: mv88e6xxx: Fix port_hidden_wait to account for port_base_addr
	drm/sun4i: Remove obsolete references to PHYS_OFFSET
	net: dsa: lantiq_gswip: Don't set GSWIP_MII_CFG_RMII_CLK
	io_uring: check reserved fields for send/sendmsg
	io_uring: check reserved fields for recv/recvmsg
	netfilter: conntrack: fix udp offload timeout sysctl
	drm/amdkfd: Fix GWS queue count
	drm/amd/display: Fix memory leak in dcn21_clock_source_create
	tls: Skip tls_append_frag on zero copy size
	bnx2x: fix napi API usage sequence
	net: fec: add missing of_node_put() in fec_enet_init_stop_mode()
	gfs2: Prevent endless loops in gfs2_file_buffered_write
	gfs2: Minor retry logic cleanup
	gfs2: Make sure not to return short direct writes
	gfs2: No short reads or writes upon glock contention
	perf arm-spe: Fix addresses of synthesized SPE events
	ixgbe: ensure IPsec VF<->PF compatibility
	Revert "ibmvnic: Add ethtool private flag for driver-defined queue limits"
	tcp: fix F-RTO may not work correctly when receiving DSACK
	ASoC: Intel: soc-acpi: correct device endpoints for max98373
	ASoC: wm8731: Disable the regulator when probing fails
	ext4: fix bug_on in start_this_handle during umount filesystem
	arch: xtensa: platforms: Fix deadlock in rs_close()
	ksmbd: increment reference count of parent fp
	ksmbd: set fixed sector size to FS_SECTOR_SIZE_INFORMATION
	bonding: do not discard lowest hash bit for non layer3+4 hashing
	x86: __memcpy_flushcache: fix wrong alignment if size > 2^32
	cifs: destage any unwritten data to the server before calling copychunk_write
	drivers: net: hippi: Fix deadlock in rr_close()
	powerpc/perf: Fix 32bit compile
	selftest/vm: verify mmap addr in mremap_test
	selftest/vm: verify remap destination address in mremap_test
	Revert "ACPI: processor: idle: fix lockup regression on 32-bit ThinkPad T40"
	zonefs: Fix management of open zones
	zonefs: Clear inode information flags on inode creation
	kasan: prevent cpu_quarantine corruption when CPU offline and cache shrink occur at same time
	mtd: rawnand: qcom: fix memory corruption that causes panic
	netfilter: Update ip6_route_me_harder to consider L3 domain
	drm/i915: Check EDID for HDR static metadata when choosing blc
	drm/i915: Fix SEL_FETCH_PLANE_*(PIPE_B+) register addresses
	net: ethernet: stmmac: fix write to sgmii_adapter_base
	ACPI: processor: idle: Avoid falling back to C3 type C-states
	thermal: int340x: Fix attr.show callback prototype
	btrfs: fix leaked plug after failure syncing log on zoned filesystems
	ARM: dts: at91: sama7g5ek: enable pull-up on flexcom3 console lines
	ARM: dts: imx8mm-venice-gw{71xx,72xx,73xx}: fix OTG controller OC mode
	x86/cpu: Load microcode during restore_processor_state()
	perf symbol: Pass is_kallsyms to symbols__fixup_end()
	perf symbol: Update symbols__fixup_end()
	tty: n_gsm: fix restart handling via CLD command
	tty: n_gsm: fix decoupled mux resource
	tty: n_gsm: fix mux cleanup after unregister tty device
	tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2
	tty: n_gsm: fix malformed counter for out of frame data
	netfilter: nft_socket: only do sk lookups when indev is available
	tty: n_gsm: fix insufficient txframe size
	tty: n_gsm: fix wrong DLCI release order
	tty: n_gsm: fix missing explicit ldisc flush
	tty: n_gsm: fix wrong command retry handling
	tty: n_gsm: fix wrong command frame length field encoding
	tty: n_gsm: fix wrong signal octets encoding in MSC
	tty: n_gsm: fix missing tty wakeup in convergence layer type 2
	tty: n_gsm: fix reset fifo race condition
	tty: n_gsm: fix incorrect UA handling
	tty: n_gsm: fix software flow control handling
	perf symbol: Remove arch__symbols__fixup_end()
	eeprom: at25: Use DMA safe buffers
	objtool: Fix code relocs vs weak symbols
	objtool: Fix type of reloc::addend
	powerpc/64: Add UADDR64 relocation support
	Linux 5.15.38

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic5e398d47dd6240ecde38f635b3085fae7c3c0ab
2022-05-18 09:00:50 +02:00
Greg Kroah-Hartman ecda2085fd Revert 5.15.37 merge into android13-5.15
This reverts the merge of 5.15.37 into the android13-5.15
There are lots of ABI issues, and many of the commits are not needed in
the Android tree at this time.  Revert the merge (except for the
Makefile change), so that future merges will continue to work, and the
needed individual changes from this release will be manually added to
the tree at a later point in time.

Fixes: f7dace75d276 ("Merge 5.15.37 into android13-5.15")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0632858e5c0fb94fc14c0f4216997330eca260a7
2022-05-18 08:59:14 +02:00
Greg Kroah-Hartman ef5fed3c1e Merge 5.15.37 into android13-5.15
Changes in 5.15.37
	floppy: disable FDRAWCMD by default
	bpf: Introduce composable reg, ret and arg types.
	bpf: Replace ARG_XXX_OR_NULL with ARG_XXX | PTR_MAYBE_NULL
	bpf: Replace RET_XXX_OR_NULL with RET_XXX | PTR_MAYBE_NULL
	bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL
	bpf: Introduce MEM_RDONLY flag
	bpf: Convert PTR_TO_MEM_OR_NULL to composable types.
	bpf: Make per_cpu_ptr return rdonly PTR_TO_MEM.
	bpf: Add MEM_RDONLY for helper args that are pointers to rdonly mem.
	bpf/selftests: Test PTR_TO_RDONLY_MEM
	bpf: Fix crash due to out of bounds access into reg2btf_ids.
	spi: cadence-quadspi: fix write completion support
	ARM: dts: socfpga: change qspi to "intel,socfpga-qspi"
	mm: kfence: fix objcgs vector allocation
	gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}
	iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable
	iov_iter: Introduce fault_in_iov_iter_writeable
	gfs2: Add wrapper for iomap_file_buffered_write
	gfs2: Clean up function may_grant
	gfs2: Introduce flag for glock holder auto-demotion
	gfs2: Move the inode glock locking to gfs2_file_buffered_write
	gfs2: Eliminate ip->i_gh
	gfs2: Fix mmap + page fault deadlocks for buffered I/O
	iomap: Fix iomap_dio_rw return value for user copies
	iomap: Support partial direct I/O on user copy failures
	iomap: Add done_before argument to iomap_dio_rw
	gup: Introduce FOLL_NOFAULT flag to disable page faults
	iov_iter: Introduce nofault flag to disable page faults
	gfs2: Fix mmap + page fault deadlocks for direct I/O
	btrfs: fix deadlock due to page faults during direct IO reads and writes
	btrfs: fallback to blocking mode when doing async dio over multiple extents
	mm: gup: make fault_in_safe_writeable() use fixup_user_fault()
	selftests/bpf: Add test for reg2btf_ids out of bounds access
	Linux 5.15.37

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ica39b8856d6e3928a82f4e34f8b401f1a5cba5ee
2022-05-18 08:59:02 +02:00
Greg Kroah-Hartman e80661dff2 Revert "netfilter: conntrack: convert to refcount_t api"
This reverts commit bcba40bd36.

It breaks the abi and is not really needed for Android systems, so
revert it for now.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8768fa3c558d43cbe2005c151c494c9fd6146089
2022-05-18 08:57:12 +02:00
Greg Kroah-Hartman 8b226103c9 Revert "netfilter: conntrack: avoid useless indirection during conntrack destruction"
This reverts commit 67e4860eee.

It breaks the abi and is not really needed for Android systems, so
revert it for now.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia8363274cf64b68fdbf0653a4e520a5a5a35117f
2022-05-18 08:57:12 +02:00
Greg Kroah-Hartman 6910f0f08b Revert "netfilter: nft_ct: fix use after free when attaching zone template"
This reverts commit 2e25c46c6e.

It breaks the abi and is not really needed for Android systems, so
revert it for now.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I20e6d9e81124122c75289424b8411d85c9047c71
2022-05-18 08:57:12 +02:00
Greg Kroah-Hartman 02428be2b4 Revert "ipv6: make ip6_rt_gc_expire an atomic_t"
This reverts commit 652a540539.

It breaks the kernel abi so revert it for now.  We will add it back
later at the next kabi update.

Bug: 161946584
Fixes: 652a540539 ("ipv6: make ip6_rt_gc_expire an atomic_t")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibab89760234525cc5622cd60e61599784fd0f80a
2022-05-18 08:56:15 +02:00