Commit graph

883,404 commits

Author SHA1 Message Date
Florian Westphal
df1cc4066f UPSTREAM: net: fix fraglist segmentation reference count leak
Xin Long says:
 On udp rx path udp_rcv_segment() may do segment where the frag skbs
 will get the header copied from the head skb in skb_segment_list()
 by calling __copy_skb_header(), which could overwrite the frag skbs'
 extensions by __skb_ext_copy() and cause a leak.

 This issue was found after loading esp_offload where a sec path ext
 is set in the skb.

Fix this by discarding head state of the fraglist skb before replacing
its contents.

Fixes: 3a1296a38d0cf62 ("net: Support GRO/GSO fraglist chaining.")
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Reported-by: Xiumei Mu <xmu@redhat.com>
Tested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cf673ed0e057a2dd68d930c6d7e30d53c70c5789)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iba886d897485ddddb2f1f67347b65fbba4d3e119
2020-11-14 16:55:56 +01:00
Maciej Żenczykowski
223c666145 UPSTREAM: ipv6: ndisc: RFC-ietf-6man-ra-pref64-09 is now published as RFC8781
See:
  https://www.rfc-editor.org/authors/rfc8781.txt

Cc: Erik Kline <ek@google.com>
Cc: Jen Linkova <furry@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Michael Haro <mharo@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Fixes: c24a77edc9a7 ("ipv6: ndisc: add support for 'PREF64' dns64 prefix identifier")
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9175d3f38816835b0801bacbf4f6aff1a1672b71)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9ac8f0e2d500846e4a545434583bda3f671e00bb
2020-11-14 16:55:48 +01:00
Nicolas Saenz Julienne
b01c286473 UPSTREAM: of: property: Fix create device links for all child-supplier dependencies
Upon adding a new device from a DT node, we scan its properties and its
children's properties in order to create a consumer/supplier
relationship between the device and the property provider.

That said, it's possible for some of the node's children to be disabled,
which will create links that'll never be fulfilled.

To get around this, use the for_each_available_child_of_node() function
instead of for_each_available_node() when iterating over the node's
children.

Fixes: d4387cd11741 ("of: property: Create device links for all child-supplier depencencies")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit ed3655729182a59b9bef1b564c6fc2dcbbbe954e)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I729c42bb3ddc8ecff1e5e097a439d672faea1f89
2020-11-14 16:55:37 +01:00
Nicolas Saenz Julienne
6ac5a61989 UPSTREAM: of: property: Do not link to disabled devices
When creating a consumer/supplier relationship between two devices,
make sure the supplier node is actually active. Otherwise this will
create a link relationship that will never be fulfilled. This, in the
worst case scenario, will hang the system during boot.

Note that, in practice, the fact that a device-tree represented
consumer/supplier relationship isn't fulfilled will not prevent devices
from successfully probing.

Fixes: a3e1d1a7f5fc ("of: property: Add functional dependency link from DT bindings")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit 7456427af9def0fec5508dd8b861556038ee96a8)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I43d1405a81b00f360a514ff67487f0b375215ee3
2020-11-14 16:55:32 +01:00
Adrian Hunter
2bef330246 UPSTREAM: mmc: sdhci: Fix SDHCI_QUIRK_BROKEN_CQE
Previous to commit 511ce378e16f07 ("mmc: Add MMC host software queue
support"), removing MMC_CAP2_CQE was enough to disable command queuing, but
now the cqe_ops must also be NULL otherwise ->cqe_enable() will be
called. Fix SDHCI_QUIRK_BROKEN_CQE to do that.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Fixes: 511ce378e16f07 ("mmc: Add MMC host software queue support")
Link: https://lore.kernel.org/r/20200518120939.1399-1-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 2b17b8d7cc65d333a48c6d32ee44fc489cecb7d9)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibadc2a45340e9c783f836401910b44123a49f02f
2020-11-14 16:55:25 +01:00
Vinod Koul
1bd9ca0eb9 UPSTREAM: usb: renesas-xhci: include correct header for get_unaligned_le16()
get_unaligned_le16() is defined in linux/unaligned/access_ok.h header
but it uses symbols which may not be available, leading to build
failures on ia64. Using asm/unaligned.h seem to be the right thing
and used in other drivers.

This fixes below error reported by kbuild test robot

In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:8:28: error: redefinition of 'get_unaligned_le16'
8 | static __always_inline u16 get_unaligned_le16(const void *p)
|                            ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:5,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:67,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/le_struct.h:7:19: note: previous definition of 'get_unaligned_le16' was here
7 | static inline u16 get_unaligned_le16(const void *p)
|                   ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
include/linux/unaligned/access_ok.h:13:28: error: redefinition of 'get_unaligned_le32'
13 | static __always_inline u32 get_unaligned_le32(const void *p)
|                            ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:5,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:67,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/le_struct.h:12:19: note: previous definition of 'get_unaligned_le32' was here

Fixes: 8bd5741e3145 ("usb: renesas-xhci: Add the renesas xhci driver")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200516162516.385149-1-vkoul@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 357abc1d6b832bdb6a7d27ed258f6d2be27d096d)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I30d9b8d71db8ca8143f22f461666f1deeef2a58b
2020-11-14 16:55:17 +01:00
Jason A. Donenfeld
cd63b9b3ef UPSTREAM: wil6210: account for napi_gro_receive never returning GRO_DROP
The napi_gro_receive function no longer returns GRO_DROP ever, making
handling GRO_DROP dead code. This commit removes that dead code.
Further, it's not even clear that device drivers have any business in
taking action after passing off received packets; that's arguably out of
their hands. In this case, too, the non-gro path didn't bother checking
the return value. Plus, this had some clunky debugging functions that
duplicated code from elsewhere and was generally pretty messy. So, this
commit cleans that all up too.

Fixes: 6570bc79c0df ("net: core: use listified Rx for GRO_NORMAL in napi_gro_receive()")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 045790b7bc66a75070c112a61558c639cef2263e)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6fa5a5c7a7b123e192e02e5dc671041454ad2df8
2020-11-14 16:43:17 +01:00
Luca Coelho
f1ed2a97d3 UPSTREAM: nl80211: fix memory leak when parsing NL80211_ATTR_HE_BSS_COLOR
If there is an error when parsing the NL80211_ATTR_HE_BSS_COLOR
attribute, we return immediately without freeing param.acl.  Fit it by
using goto out instead of returning immediately.

Fixes: 5c5e52d1bb96 ("nl80211: add handling for BSS color")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200626124931.7ad2a3eb894f.I60905fb70bd20389a3b170db515a07275e31845e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 60a0121f8fa64b0f4297aa6fef8207500483a874)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1b25c92cf781e73aba43e4b344358c6f458ae50e
2020-11-14 16:43:07 +01:00
Tiezhu Yang
8aff1e0e2a UPSTREAM: thermal/drivers/sprd: Fix return value of sprd_thm_probe()
When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.

Fixes: 554fdbaf19b1 ("thermal: sprd: Add Spreadtrum thermal driver support")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/1590371941-25430-1-git-send-email-yangtiezhu@loongson.cn
(cherry picked from commit b4147917ad4ff2c755e01a7ca296b14030d2d507)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5ba1ea5bf4846edb0c0990557bbd00ce81bdc15f
2020-11-14 16:29:47 +01:00
Eric Biggers
23b53e4b2a UPSTREAM: fscrypt: restrict IV_INO_LBLK_* to AES-256-XTS
IV_INO_LBLK_* exist only because of hardware limitations, and currently
the only known use case for them involves AES-256-XTS.  Therefore, for
now only allow them in combination with AES-256-XTS.  This way we don't
have to worry about them being combined with other encryption modes.

(To be clear, combining IV_INO_LBLK_* with other encryption modes
*should* work just fine.  It's just not being tested, so we can't be
100% sure it works.  So with no known use case, it's best to disallow it
for now, just like we don't allow other weird combinations like
AES-256-XTS contents encryption with Adiantum filenames encryption.)

This can be relaxed later if a use case for other combinations arises.

Fixes: b103fb7653ff ("fscrypt: add support for IV_INO_LBLK_64 policies")
Fixes: e3b1078bedd3 ("fscrypt: add support for IV_INO_LBLK_32 policies")
Link: https://lore.kernel.org/r/20200721181012.39308-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit f000223c981a7c75f6f3ab7288f0be7b571c3644)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9b28a1d2394a8a70d020be3a4f8661ac5987a78d
2020-11-14 16:29:45 +01:00
Eric Biggers
5eb84aafc7 UPSTREAM: fscrypt: use smp_load_acquire() for fscrypt_prepared_key
Normally smp_store_release() or cmpxchg_release() is paired with
smp_load_acquire().  Sometimes smp_load_acquire() can be replaced with
the more lightweight READ_ONCE().  However, for this to be safe, all the
published memory must only be accessed in a way that involves the
pointer itself.  This may not be the case if allocating the object also
involves initializing a static or global variable, for example.

fscrypt_prepared_key includes a pointer to a crypto_skcipher object,
which is internal to and is allocated by the crypto subsystem.  By using
READ_ONCE() for it, we're relying on internal implementation details of
the crypto subsystem.

Remove this fragile assumption by using smp_load_acquire() instead.

(Note: I haven't seen any real-world problems here.  This change is just
fixing the code to be guaranteed correct and less fragile.)

Fixes: 5fee36095cda ("fscrypt: add inline encryption support")
Cc: Satya Tangirala <satyat@google.com>
Link: https://lore.kernel.org/r/20200721225920.114347-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit 97c6327f7192d7312eabc033b26a41ad6816496c)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I03b3e854e44734206112554dfc38cfe899127cfa
2020-11-14 16:29:43 +01:00
Tiezhu Yang
3fcaa86a3d UPSTREAM: nvmem: sprd: Fix return value of sprd_efuse_probe()
When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.

Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200722100705.7772-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bcd14bb7a68520bf88e45e91d354e43535624f82)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6121d3ca4cb636bb4088a3baab6da554984a8dd0
2020-11-14 16:29:41 +01:00
Rajkumar Manoharan
05f0c99de8 UPSTREAM: mac80211: fix warning in 6 GHz IE addition in mesh mode
The commit 24a2042cb22f ("mac80211: add HE 6 GHz Band Capability
element") failed to check device capability before adding HE 6 GHz
capability element. Below warning is reported in 11ac device in mesh.
Fix that by checking device capability at HE 6 GHz cap IE addition
in mesh beacon and association request.

WARNING: CPU: 1 PID: 1897 at net/mac80211/util.c:2878
ieee80211_ie_build_he_6ghz_cap+0x149/0x150 [mac80211]
[ 3138.720358] Call Trace:
[ 3138.720361]  ieee80211_mesh_build_beacon+0x462/0x530 [mac80211]
[ 3138.720363]  ieee80211_start_mesh+0xa8/0xf0 [mac80211]
[ 3138.720365]  __cfg80211_join_mesh+0x122/0x3e0 [cfg80211]
[ 3138.720368]  nl80211_join_mesh+0x3d3/0x510 [cfg80211]

Fixes: 24a2042cb22f ("mac80211: add HE 6 GHz Band Capability element")
Reported-by: Markus Theil <markus.theil@tu-ilmenau.de>
Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
Link: https://lore.kernel.org/r/1593656424-18240-1-git-send-email-rmanohar@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 65ad3ef9fced4062dfd74e2f89443fb5ce184321)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I482ae69d99fcf58b3c08fef4561673b656d32995
2020-11-14 16:29:38 +01:00
Adrian Hunter
67d571fe31 UPSTREAM: scsi: ufs: Fix interrupt error message for shared interrupts
The interrupt might be shared, in which case it is not an error for the
interrupt handler to be called when the interrupt status is zero, so don't
print the message unless there was enabled interrupt status.

Link: https://lore.kernel.org/r/20200811133936.19171-1-adrian.hunter@intel.com
Fixes: 9333d7757348 ("scsi: ufs: Fix irq return code")
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 6337f58cec030b34ced435b3d9d7d29d63c96e36)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I60f61f9453edae05b796afa7a37e59bf8ace32e1
2020-11-14 16:29:33 +01:00
Lukasz Luba
91c21bea59 UPSTREAM: sched/fair: Fix wrong negative conversion in find_energy_efficient_cpu()
In find_energy_efficient_cpu() 'cpu_cap' could be less that 'util'.
It might be because of RT, DL (so higher sched class than CFS), irq or
thermal pressure signal, which reduce the capacity value.
In such situation the result of 'cpu_cap - util' might be negative but
stored in the unsigned long. Then it might be compared with other unsigned
long when uclamp_rq_util_with() reduced the 'util' such that is passes the
fits_capacity() check.

Prevent this situation and make the arithmetic more safe.

Fixes: 1d42509e475cd ("sched/fair: Make EAS wakeup placement consider uclamp restrictions")
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lkml.kernel.org/r/20200810083004.26420-1-lukasz.luba@arm.com
(cherry picked from commit da0777d35f47892f359c3f73ea155870bb595700)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib3e22c155eb031854cfb4428494c1c4da57692b1
2020-11-14 16:20:56 +01:00
Saravana Kannan
5eee799bec UPSTREAM: driver core: Fix device_pm_lock() locking for device links
This commit fixes two issues:

1. The lockdep warning reported by Dong Aisheng <dongas86@gmail.com> [1].

It is a warning about a cycle (dpm_list_mtx --> kn->active#3 --> fw_lock)
that was introduced when device-link devices were added to expose device
link information in sysfs.

The patch that "introduced" this cycle can't be reverted because it's fixes
a real SRCU issue and also ensures that the device-link device is deleted
as soon as the device-link is deleted. This is important to avoid sysfs
name collisions if the device-link is create again immediately (this can
happen a lot with deferred probing).

2. Inconsistency in grabbing device_pm_lock() during device link deletion

Some device link deletion code paths grab device_pm_lock(), while others
don't.  The device_pm_lock() is grabbed during device_link_add() because it
checks if the supplier is in the dpm_list and also reorders the dpm_list.
However, when a device link is deleted, it does not do either of those and
therefore device_pm_lock() is not necessary. Dropping the device_pm_lock()
in all the device link deletion paths removes the inconsistency in locking.

Thanks to Stephen Boyd for helping me understand the lockdep splat.

Fixes: 843e600b8a2b ("driver core: Fix sleeping in invalid context during device link deletion")
[1] - https://lore.kernel.org/lkml/CAA+hA=S4eAreb7vo69LAXSk2t5=DEKNxHaiY1wSpk4xTp9urLg@mail.gmail.com/
Reported-by: Dong Aisheng <dongas86@gmail.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20200901184445.1736658-1-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6b57b15abe11aa334ebf726e02c0deaf123ba040)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I714523d92bbfbad145df2794c481cd0b697d7d16
2020-11-14 16:20:48 +01:00
Eric Biggers
8502859d46 UPSTREAM: fscrypt: restrict IV_INO_LBLK_32 to ino_bits <= 32
When an encryption policy has the IV_INO_LBLK_32 flag set, the IV
generation method involves hashing the inode number.  This is different
from fscrypt's other IV generation methods, where the inode number is
either not used at all or is included directly in the IVs.

Therefore, in principle IV_INO_LBLK_32 can work with any length inode
number.  However, currently fscrypt gets the inode number from
inode::i_ino, which is 'unsigned long'.  So currently the implementation
limit is actually 32 bits (like IV_INO_LBLK_64), since longer inode
numbers will have been truncated by the VFS on 32-bit platforms.

Fix fscrypt_supported_v2_policy() to enforce the correct limit.

This doesn't actually matter currently, since only ext4 and f2fs support
IV_INO_LBLK_32, and they both only support 32-bit inode numbers.  But we
might as well fix it in case it matters in the future.

Ideally inode::i_ino would instead be made 64-bit, but for now it's not
needed.  (Note, this limit does *not* prevent filesystems with 64-bit
inode numbers from adding fscrypt support, since IV_INO_LBLK_* support
is optional and is useful only on certain hardware.)

Fixes: e3b1078bedd3 ("fscrypt: add support for IV_INO_LBLK_32 policies")
Reported-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20200824203841.1707847-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit 5e895bd4d5233cb054447d0491d4e63c8496d419)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie4abfef403dfacf790baa667a37febf591c7e3ca
2020-11-14 16:20:41 +01:00
Stanley Chu
4a5e996245 UPSTREAM: scsi: ufs: ufs-mediatek: Eliminate error message for unbound mphy
Some MediaTek platforms does not have to bind MPHY so users shall not see
any unnecessary logs. Simply remove logs for this case.

Link: https://lore.kernel.org/r/20200908064507.30774-2-stanley.chu@mediatek.com
Fixes: fc4983018fea ("scsi: ufs-mediatek: Allow unbound mphy")
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 30a90782c105fe498df74161392aa143796b6886)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I01f51f1532bf1826692b22b5650acd25a63f3698
2020-11-14 16:20:34 +01:00
Stanley Chu
c8f9209864 UPSTREAM: scsi: ufs: ufs-mediatek: Fix HOST_PA_TACTIVATE quirk
Simply add HOST_PA_TACTIVATE quirk back since it was incorrectly removed
before.

Link: https://lore.kernel.org/r/20200908064507.30774-3-stanley.chu@mediatek.com
Fixes: 47d054580a75 ("scsi: ufs-mediatek: fix HOST_PA_TACTIVATE quirk for Samsung UFS Devices")
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit a3e40b80dc951057033dce86f0e675b2b822b513)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id1f55fa74d0d393974b9f152d3289cd3ac4e3298
2020-11-14 16:09:35 +01:00
Johannes Berg
174953dd82 UPSTREAM: cfg80211: fix 6 GHz channel conversion
We shouldn't accept any channels bigger than 233, fix that.

Reported-by: Amar <asinghal@codeaurora.org>
Fixes: d1a1646c0de7 ("cfg80211: adapt to new channelization of the 6GHz band")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200917115222.312ba6f1d461.I3a8c8fbcc3cc019814fd9cd0aced7eb591626136@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit c0de8776af6543e10d1a5c8969679fd9f6b66fa9)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I83a88dce9a0c78f949abd792c824ed6f923ee809
2020-11-14 16:09:30 +01:00
Chanho Park
5c1738a8f0 ANDROID: GKI: update symbol list for exynosauto soc
This patch updates the GKI symbol list for Exynosauto SoC. This is an
initial version of symbol list for Android Automotive Native.

Leaf changes summary: 74 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 72 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

72 Added functions:

  [A] 'function int __bitmap_and(unsigned long int*, const unsigned long int*, const unsigned long int*, unsigned int)'
  [A] 'function void __drm_atomic_helper_plane_reset(drm_plane*, drm_plane_state*)'
  [A] 'function int __phy_modify(phy_device*, u32, u16, u16)'
  [A] 'function int bitmap_find_free_region(unsigned long int*, unsigned int, int)'
  [A] 'function void bitmap_release_region(unsigned long int*, unsigned int, int)'
  [A] 'function void display_timings_release(display_timings*)'
  [A] 'function void dql_completed(dql*, unsigned int)'
  [A] 'function void dql_reset(dql*)'
  [A] 'function int drm_atomic_helper_async_check(drm_device*, drm_atomic_state*)'
  [A] 'function void drm_atomic_helper_disable_planes_on_crtc(drm_crtc_state*, bool)'
  [A] 'function void drm_atomic_helper_fake_vblank(drm_atomic_state*)'
  [A] 'function int drm_atomic_normalize_zpos(drm_device*, drm_atomic_state*)'
  [A] 'function int drm_connector_set_path_property(drm_connector*, const char*)'
  [A] 'function u8 drm_dp_dsc_sink_line_buf_depth(const u8*)'
  [A] 'function u8 drm_dp_dsc_sink_max_slice_count(const u8*, bool)'
  [A] 'function int drm_dsc_compute_rc_parameters(drm_dsc_config*)'
  [A] 'function void drm_dsc_pps_payload_pack(drm_dsc_picture_parameter_set*, const drm_dsc_config*)'
  [A] 'function void drm_framebuffer_cleanup(drm_framebuffer*)'
  [A] 'function int drm_helper_connector_dpms(drm_connector*, int)'
  [A] 'function int drm_mode_config_helper_resume(drm_device*)'
  [A] 'function int drm_mode_config_helper_suspend(drm_device*)'
  [A] 'function int drm_property_add_enum(drm_property*, long long unsigned int, const char*)'
  [A] 'function void drm_property_destroy(drm_device*, drm_property*)'
  [A] 'function fwnode_handle* fwnode_get_named_child_node(const fwnode_handle*, const char*)'
  [A] 'function gpio_desc* fwnode_get_named_gpiod(fwnode_handle*, const char*, int, gpiod_flags, const char*)'
  [A] 'function int fwnode_property_get_reference_args(const fwnode_handle*, const char*, const char*, unsigned int, unsigned int, fwnode_reference_args*)'
  [A] 'function int genphy_loopback(phy_device*, bool)'
  [A] 'function int genphy_restart_aneg(phy_device*)'
  [A] 'function int genphy_setup_forced(phy_device*)'
  [A] 'function int genphy_soft_reset(phy_device*)'
  [A] 'function int genphy_update_link(phy_device*)'
  [A] 'function void gpiod_put(gpio_desc*)'
  [A] 'function phy_device* mdiobus_get_phy(mii_bus*, int)'
  [A] 'function void netdev_alert(const net_device*, const char*, ...)'
  [A] 'function display_timings* of_get_display_timings(const device_node*)'
  [A] 'function int of_get_phy_mode(device_node*)'
  [A] 'function int of_graph_get_endpoint_count(const device_node*)'
  [A] 'function device_node* of_graph_get_port_by_id(device_node*, u32)'
  [A] 'function device_node* of_graph_get_remote_port(const device_node*)'
  [A] 'function phy_device* of_phy_attach(net_device*, device_node*, u32, phy_interface_t)'
  [A] 'function void of_phy_deregister_fixed_link(device_node*)'
  [A] 'function bool of_phy_is_fixed_link(device_node*)'
  [A] 'function int of_phy_register_fixed_link(device_node*)'
  [A] 'function int of_platform_device_destroy(device*, void*)'
  [A] 'function int pcie_set_mps(pci_dev*, int)'
  [A] 'function int phy_attach_direct(net_device*, phy_device*, u32, phy_interface_t)'
  [A] 'function void phy_attached_info(phy_device*)'
  [A] 'function int phy_create_lookup(phy*, const char*, const char*)'
  [A] 'function void phy_detach(phy_device*)'
  [A] 'function const char* phy_duplex_to_str(unsigned int)'
  [A] 'function void phy_ethtool_get_wol(phy_device*, ethtool_wolinfo*)'
  [A] 'function int phy_get_eee_err(phy_device*)'
  [A] 'function int phy_init_eee(phy_device*, bool)'
  [A] 'function const phy_setting* phy_lookup_setting(int, int, const unsigned long int*, bool)'
  [A] 'function void phy_mac_interrupt(phy_device*)'
  [A] 'function int phy_modify(phy_device*, unsigned int, unsigned short int, unsigned short int)'
  [A] 'function int phy_modify_paged(phy_device*, int, u32, u16, u16)'
  [A] 'function int phy_read_paged(phy_device*, int, u32)'
  [A] 'function void phy_remove_lookup(phy*, const char*, const char*)'
  [A] 'function void phy_request_interrupt(phy_device*)'
  [A] 'function int phy_restart_aneg(phy_device*)'
  [A] 'function int phy_resume(phy_device*)'
  [A] 'function int phy_select_page(phy_device*, int)'
  [A] 'function void phy_set_asym_pause(phy_device*, bool, bool)'
  [A] 'function const char* phy_speed_to_str(int)'
  [A] 'function int phy_start_aneg(phy_device*)'
  [A] 'function int phy_suspend(phy_device*)'
  [A] 'function int phy_write_paged(phy_device*, int, u32, u16)'
  [A] 'function int swphy_read_reg(int, const fixed_phy_status*)'
  [A] 'function int ufshcd_config_pwr_mode(ufs_hba*, ufs_pa_layer_attr*)'
  [A] 'function void videomode_from_timing(const display_timing*, videomode*)'
  [A] 'function int videomode_from_timings(const display_timings*, videomode*, unsigned int)'

2 Added variables:

  [A] 'const drm_private_state_funcs drm_dp_mst_topology_state_funcs'
  [A] 'unsigned long int phy_gbit_fibre_features[2]'

Bug: 172885440
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Change-Id: Id1154cc855fb633f22acbf89f59a89dad07ed15f
2020-11-13 13:51:35 +00:00
Jeehong Kim
9898521cef ANDROID: ABI: update allowed list for galaxy
Update Galaxy list of symbols with ones that are already in the .xml
file to manage symbols by used our modules

Bug: 173174399

Signed-off-by: Jeehong Kim <jhez.kim@samsung.com>
Change-Id: I0b26dff0c0075ba74fbbb3948f4e71c636f3a6cb
2020-11-13 16:17:59 +09:00
Chanho Park
0b4009b30f ANDROID: GKI: initial upload list for exynosauto soc
This patch adds to upload initial symbol list for Exynosauto SoC.
To find what has updated from GKI symbol easily, this list does not
include full list of symbol. So, nothing has added to GKI ABI symbols.

Bug: 172885440
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Change-Id: I41cc355687a5ba859ad601b8f1efdad13e52f20f
2020-11-12 17:32:06 +09:00
Narendra Muppalla
3364218040 ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function int drm_connector_set_tile_property(drm_connector*)'
  [A] 'function drm_tile_group* drm_mode_create_tile_group(drm_device*, char*)'
  [A] 'function drm_tile_group* drm_mode_get_tile_group(drm_device*, char*)'

Bug: 171996270
Signed-off-by: Govinda Rao K S <gkarikur@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Change-Id: Ia647561b76932a6fb6bd1f81a563cc95adca9b01
2020-11-11 17:05:18 -08:00
Neeraj Soni
dc2d5a0ace ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 3 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added function:

  [A] 'function void keyslot_manager_set_max_dun_bytes(keyslot_manager*, unsigned int)'
  [B] 'function void keyslot_manager_reprogram_all_keys(keyslot_manager*)'
  [C] 'function void keyslot_manager_destroy(keyslot_manager*)'

Bug: 172917070
Change-Id: I8efd18e0bd0d1884634c7358656e4045de039e57
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2020-11-11 14:27:52 +05:30
Maulik Shah
f889ae2a8c ANDROID: ABI: Update allowed list for QCOM
Add the following symbols to QCOM allowed-list:
-- __irq_set_handler
-- irq_set_handler_data

Bug: 172879351
Change-Id: I6869b60b4893a3f9447d0fb6e7977e0685477386
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2020-11-10 12:01:05 +05:30
Mayank Grover
4e7a62687a ANDROID: modules: cfi cleanup for module load failure
Cleanup cfi shadow for failure in module loading,
to avoid causing warnings.

Bug: 172542186
Change-Id: I1de7ffa7d884c8e46891b8bbc8196ec0d2cef0d6
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
2020-11-06 10:09:05 +05:30
Alistair Delva
6f6b3fb470 ANDROID: Temporarily disable XFRM_USER_COMPAT filtering
Before 5.10-rc1, the upstream kernel blocked any compat calls into XFRM
code with EOPNOTSUPP, however Android kernels had been patching this
check out and made userspace match the 64-bit kernel netlink format
instead.

When the new XFRM_USER_COMPAT feature landed, it added a similar check
in two places which returns EOPNOTSUPP only if the XFRM_USER_COMPAT
feature is disabled, however that is currently always the case for
Android kernels and we do not want to filter these callers.

While we work to remove the userspace compatibility mess, disable the
filtering of compat calls when XFRM_USER_COMPAT is disabled. If the
XFRM_USER_COMPAT feature is enabled, nothing changes.

Bug: 163141236
Bug: 172541864
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ifbea109070650dfcb4f93a3cc692c18a8d11ab44
2020-11-05 21:08:28 +00:00
Akash Asthana
d587555020 ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 1 artifact changed (550 filtered out)
Changed leaf types summary: 0 (398 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed (142 filtered out), 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed (10 filtered out), 0 Added variable

1 Added function:

  [A] 'function device_node* of_get_next_parent(device_node*)'

Bug: 172412533
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
Change-Id: Ibd916f38d871469e56888ff3903f0a1bc388b52b
Signed-off-by: Todd Kjos <tkjos@google.com>
2020-11-05 20:04:07 +00:00
Mayank Grover
f7387c317d ANDROID: ABI: update allowed list for QCOM
Leaf changes summary: 1 artifact changed (550 filtered out)
Changed leaf types summary: 0 (398 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed (142 filtered out), 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed (10 filtered out), 0 Added variable

1 Added function:

  [A] 'function u64 pm_runtime_autosuspend_expiration(device*)'

Bug: 172305298
Change-Id: I4c80ce161c8a593a1df97923d6b37b052a26c8a3
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
2020-11-05 17:02:15 +05:30
Todd Kjos
d8d40e5b14 ANDROID: fix kernelci build-break due to stop_ipi hook
Fix build-break for non GKI builds caused by using the
_rcuidle() variant of a vendor hook.

Fixes: bad091cc4b ("ANDROID: vendor_hooks: Add vendor hooks for
getting printk messages")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I0dffaf7e0df198a63578818f7c155671efe382b5
2020-11-04 13:23:08 -08:00
Borislav Petkov
de84825a22 BACKPORT: rcu/tree: Export rcu_idle_{enter,exit} to modules
Fix this link error:

  ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined!
  ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined!

when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light
of ARM needing those soon too, they should simply be exported.

Link: https://lore.kernel.org/linux-pm/20200921103741.GC5901@zn.tnic/
Bug: 172034763
Change-Id: I26d516d11edbce673f52df6474f6695c5a1e2b07
(cherry picked from commit 3ad1c8ef083bef96ec922688966484be1039e6b5)
Fixes: 1fecfdbb7acc ("ACPI: processor: Take over RCU-idle for C3-BM idle")
Reported-by: Sven Joachim <svenjoac@gmx.de>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Paul E. McKenney <paulmckrcu@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Cheng Jui Wang <cheng-jui.wang@mediatek.com>
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
2020-11-04 01:02:40 +00:00
Chenggang Wang
c47964c5dd ANDROID: GKI: Add some symbols to symbol list
Leaf changes summary: 7 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 7 Added
functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added
variable

7 Added functions:
  [A] 'function int class_for_each_device(class*, device*, void*, int
(device*, void*)*)'
  [A] 'function void device_set_of_node_from_dev(device*, const device*)'
  [A] 'function void devm_led_classdev_unregister(device*,
led_classdev*)'
  [A] 'function void pinctrl_gpio_free(unsigned int)'
  [A] 'function void sha_init(unsigned int*)'
  [A] 'function void sha_transform(unsigned int*, const char*, unsigned
int*)'
  [A] 'function int typec_partner_set_identity(typec_partner*)'

Bug: 172305305
Change-Id: I88de74a1eaa097392f7a29f3cf4c8cc55115c968
Signed-off-by: Chenggang Wang <wangchenggang@vivo.com>
2020-11-03 20:45:33 +00:00
Cheng Jui Wang
ee9ce093d6 ANDROID: arm64: smp: fix Lockdep warning: RCU used illegally from idle CPU.
This problem will happened if handle_IPI is called from idle CPU.
Use trace_android_vh_ipi_stop_rcuidle() to fix this issue

Bug: 171683158
Change-Id: Ic49fc1ddc19a54415dec3f28b68f42fa258ffeea
Signed-off-by: Cheng Jui Wang <cheng-jui.wang@mediatek.com>
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
2020-11-03 11:08:15 +08:00
Todd Kjos
7a0b784363 ANDROID: Fix build-break caused by android_rvh_nf_conn_alloc hook
The new android_rvh_nf_conn_alloc hook was not declared properly
so kernelci builds break if !CONFIG_ANDROID_VENDOR_HOOKS.

Fixes: 01435b2e91 ("ANDROID: GKI: net: add vendor hooks
for 'struct nf_conn' lifecycle")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I1208dc440836687a9c5621323ff1cf5a5bec862b
2020-11-02 23:40:43 +00:00
Alistair Delva
23277e6506 ANDROID: GKI: Enable DEBUG_INFO_DWARF4
This is useful for debuggers, and is already the default for clang
(incidentally). Make sure it is on for all users/compilers.

Bug: 160841764
Change-Id: Ibb9a0c6900728d4cce3eccb57fb4c38268a89f24
Signed-off-by: Alistair Delva <adelva@google.com>
2020-11-02 19:24:27 +00:00
Sami Tolvanen
d0dc5d8586 ANDROID: cfi: ensure RCU is watching in __cfi_slowpath
Indirect calls can happen when RCU is not watching, so we need to wake
it up again for the CFI shadow and __module_address. As these calls can
happen anywhere, use rcu_nmi_enter() similarly to kernel_text_address(),
and switch to rcu_read_lock_sched() for shadow access.

Bug: 169017431
Change-Id: Iebb857df898e644b4952a62d86fa5ff9852b5711
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2020-11-02 18:55:52 +00:00
Daniel Vetter
77bc008d89 UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller
slab does this already, and I want to use this in a memory allocation
tracker in drm for stuff that's tied to the lifetime of a drm_device,
not the underlying struct device. Kinda like devres, but for drm.

Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-2-daniel.vetter@ffwll.ch
(cherry picked from commit fd7cb5753ef49964ea9db5121c3fc9a4ec21ed8e)
Bug: 163141236
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I10790befc779311a5f2ee441e4d073e51a5a7a62
2020-11-02 16:12:00 +00:00
Dmitry Safonov
a7982ced0c BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
Provide compat_xfrm_userpolicy_info translation for xfrm setsocketopt().
Reallocate buffer and put the missing padding for 64-bit message.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 96392ee5a13b992563cfe07d23ee30d333b89126)
[adelva: Edited around removed compat check in Android kernels]
Bug: 163141236
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I32a6495cd92fa13c956fca88aa5d80716155b8ae
2020-11-02 15:48:58 +00:00
Dmitry Safonov
6a2b428110 UPSTREAM: xfrm/compat: Add 32=>64-bit messages translator
Provide the user-to-kernel translator under XFRM_USER_COMPAT, that
creates for 32-bit xfrm-user message a 64-bit translation.
The translation is afterwards reused by xfrm_user code just as if
userspace had sent 64-bit message.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 5106f4a8acff480e244300bc5097c0ad7048c3a2)
Bug: 163141236
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: If15999b86e4704b75307fbcc3d7f0c8d8bc89e7a
2020-11-02 15:48:50 +00:00
Dmitry Safonov
da1cd0d7ab UPSTREAM: xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
Currently nlmsg_unicast() is used by functions that dump structures that
can be different in size for compat tasks, see dump_one_state() and
dump_one_policy().

The following nlmsg_unicast() users exist today in xfrm:

         Function                          |    Message can be different
                                           |       in size on compat
-------------------------------------------|------------------------------
    xfrm_get_spdinfo()                     |               N
    xfrm_get_sadinfo()                     |               N
    xfrm_get_sa()                          |               Y
    xfrm_alloc_userspi()                   |               Y
    xfrm_get_policy()                      |               Y
    xfrm_get_ae()                          |               N

Besides, dump_one_state() and dump_one_policy() can be used by filtered
netlink dump for XFRM_MSG_GETSA, XFRM_MSG_GETPOLICY.

Just as for xfrm multicast, allocate frag_list for compat skb journey
down to recvmsg() which will give user the desired skb according to
syscall bitness.

Signed-off-by: Dmitry Safonov <dima@arista.com>

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 5f3eea6b7e8f58cf5c8a9d4b9679dc19e9e67ba3)
Bug: 163141236
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Id1a606ddd9d7dfe73a448eeb252b1bfd8dbd2fcb
2020-11-02 15:48:41 +00:00
Dmitry Safonov
1d5f89e524 UPSTREAM: xfrm/compat: Add 64=>32-bit messages translator
Provide the kernel-to-user translator under XFRM_USER_COMPAT, that
creates for 64-bit xfrm-user message a 32-bit translation and puts it
in skb's frag_list. net/compat.c layer provides MSG_CMSG_COMPAT to
decide if the message should be taken from skb or frag_list.
(used by wext-core which has also an ABI difference)

Kernel sends 64-bit xfrm messages to the userspace for:
- multicast (monitor events)
- netlink dumps

Wire up the translator to xfrm_nlmsg_multicast().

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 5461fc0c8d9f23956b99f5907f69726a293ccb67)
Bug: 163141236
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Id8b59587d60feb9b9f0ce96be9d140d694573fe3
2020-11-02 15:48:33 +00:00
Dmitry Safonov
1fa8e68398 BACKPORT: xfrm: Provide API to register translator module
Add a skeleton for xfrm_compat module and provide API to register it in
xfrm_state.ko. struct xfrm_translator will have function pointers to
translate messages received from 32-bit userspace or to be sent to it
from 64-bit kernel.
module_get()/module_put() are used instead of rcu_read_lock() as the
module will vmalloc() memory for translation.
The new API is registered with xfrm_state module, not with xfrm_user as
the former needs translator for user_policy set by setsockopt() and
xfrm_user already uses functions from xfrm_state.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit c9e7c76d70fa50582ca96759829c93d0dd024662)
[adelva: Edited around some context changes]
Bug: 163141236
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ic825c6a0367fa192cc3f7af6b7d2682ef8f9d58b
2020-11-02 15:48:23 +00:00
Jeehong Kim
a10e83bb35 ANDROID: ABI: update allowed list for galaxy
Leaf changes summary: 10 artifacts changed
 Changed leaf types summary: 0 leaf type changed
 Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 9 Added functions
 Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

 9 Added functions:

   [A] 'function char* kstrdup_quotable(const char*, gfp_t)'
   [A] 'function void netdev_state_change(net_device*)'
   [A] 'function int param_get_uint(char*, const kernel_param*)'
   [A] 'function int public_key_verify_signature(const public_key*, const public_key_signature*)'
   [A] 'function void tty_encode_baud_rate(tty_struct*, speed_t, speed_t)'
   [A] 'function int tty_termios_hw_change(const ktermios*, const ktermios*)'
   [A] 'function void usbnet_cdc_unbind(usbnet*, usb_interface*)'
   [A] 'function void usbnet_device_suggests_idle(usbnet*)'
   [A] 'function int usbnet_generic_cdc_bind(usbnet*, usb_interface*)'

 1 Added variable:

   [A] 'const ipv6_stub* ipv6_stub'

Bug: 171954519

Signed-off-by: Jeehong Kim <jhez.kim@samsung.com>
Change-Id: I9066e222d3e30a9434d36c22e4e77159bd57a347
2020-11-02 16:55:00 +09:00
Greg Kroah-Hartman
ea5b4af68f ANDROID: Update the KMI_GENERATION after KMI changes on October 31
The KMI was changed by several patches on October 31.  Update the
generation number to notify all tools of this.

Bug: 161946584
Cc: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5d96ec5e4fe3ead9aedf19bdedf731b3ee28746a
2020-10-31 12:37:57 +01:00
Greg Kroah-Hartman
40799f06ce ANDROID: Input: bump SW_MAX up to 0x3f
Bump the userspace-facing value of SW_MAX from 0x10 to 0x3f, allowing
out-of-tree input drivers to use the increased space to send input codes
to userspace safely.

Note, there are no new reserved input code values, so any out-of-tree
numbers are not guaranteed to ever remain stable over time, but this
allows those drivers to work properly before they get merged upstream to
claim a reserved number.

Be aware that if you use this increased numberspace, your values will
change going forward to new Android and kernel versions, you have been
warned.

This gives us the free-space for 0x2f new values, which should be enough
for a few years grace-period :)

This changes the CRC of a number of functions, but no variable sizes
have changed:

Leaf changes summary: 36 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 36 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

36 functions with some sub-type change:

  [C] 'function cec_adapter* cec_allocate_adapter(const cec_adap_ops*, void*, const char*, u32, u8)' at cec-core.c:253:1 has some sub-type changes:
  [C] 'function void cec_delete_adapter(cec_adapter*)' at cec-core.c:431:1 has some sub-type changes:
  [C] 'function void cec_received_msg_ts(cec_adapter*, cec_msg*, ktime_t)' at cec-adap.c:1036:1 has some sub-type changes:
  [C] 'function int cec_register_adapter(cec_adapter*, device*)' at cec-core.c:342:1 has some sub-type changes:
  [C] 'function void cec_s_phys_addr(cec_adapter*, unsigned short int, bool)' at cec.h:279:1 has some sub-type changes:
  [C] 'function void cec_s_phys_addr_from_edid(cec_adapter*, const edid*)' at cec-adap.c:1616:1 has some sub-type changes:
  [C] 'function void cec_transmit_attempt_done_ts(cec_adapter*, u8, ktime_t)' at cec-adap.c:688:1 has some sub-type changes:
  [C] 'function void cec_transmit_done_ts(cec_adapter*, u8, u8, u8, u8, u8, ktime_t)' at cec-adap.c:591:1 has some sub-type changes:
  [C] 'function void cec_unregister_adapter(cec_adapter*)' at cec-core.c:412:1 has some sub-type changes:
  [C] 'function input_dev* devm_input_allocate_device(device*)' at input.h:352:1 has some sub-type changes:
  [C] 'function void input_alloc_absinfo(input_dev*)' at input.h:466:1 has some sub-type changes:
  [C] 'function input_dev* input_allocate_device()' at input.h:351:1 has some sub-type changes:
  [C] 'function void input_close_device(input_handle*)' at input.h:404:1 has some sub-type changes:
  [C] 'function void input_event(input_dev*, unsigned int, unsigned int, int)' at input.h:411:1 has some sub-type changes:
  [C] 'function int input_ff_create(input_dev*, unsigned int)' at input.h:555:1 has some sub-type changes:
  [C] 'function int input_ff_create_memless(input_dev*, void*, int (input_dev*, void*, ff_effect*)*)' at input.h:564:1 has some sub-type changes:
  [C] 'function void input_ff_destroy(input_dev*)' at input.h:556:1 has some sub-type changes:
  [C] 'function void input_free_device(input_dev*)' at input.h:353:1 has some sub-type changes:
  [C] 'function void input_mt_destroy_slots(input_dev*)' at mt.h:78:1 has some sub-type changes:
  [C] 'function int input_mt_get_slot_by_key(input_dev*, int)' at mt.h:122:1 has some sub-type changes:
  [C] 'function int input_mt_init_slots(input_dev*, unsigned int, unsigned int)' at mt.h:76:1 has some sub-type changes:
  [C] 'function void input_mt_report_pointer_emulation(input_dev*, bool)' at mt.h:104:1 has some sub-type changes:
  [C] 'function bool input_mt_report_slot_state(input_dev*, unsigned int, bool)' at mt.h💯1 has some sub-type changes:
  [C] 'function void input_mt_sync_frame(input_dev*)' at mt.h:107:1 has some sub-type changes:
  [C] 'function int input_open_device(input_handle*)' at input.h:403:1 has some sub-type changes:
  [C] 'function int input_register_device(input_dev*)' at input.h:376:1 has some sub-type changes:
  [C] 'function int input_register_handle(input_handle*)' at input.h:397:1 has some sub-type changes:
  [C] 'function int input_register_handler(input_handler*)' at input.h:387:1 has some sub-type changes:
  [C] 'function void input_set_abs_params(input_dev*, unsigned int, int, int, int, int)' at input.h:467:1 has some sub-type changes:
  [C] 'function void input_set_capability(input_dev*, unsigned int, unsigned int)' at input.h:449:1 has some sub-type changes:
  [C] 'function void input_unregister_device(input_dev*)' at input.h:377:1 has some sub-type changes:
  [C] 'function void input_unregister_handle(input_handle*)' at input.h:398:1 has some sub-type changes:
  [C] 'function void input_unregister_handler(input_handler*)' at input.h:388:1 has some sub-type changes:
  [C] 'function int snd_jack_new(snd_card*, const char*, int, snd_jack**, bool, bool)' at jack.c:198:1 has some sub-type changes:
  [C] 'function void snd_jack_report(snd_jack*, int)' at jack.c:340:1 has some sub-type changes:
  [C] 'function int snd_jack_set_key(snd_jack*, snd_jack_types, int)' at jack.c:317:1 has some sub-type changes:

Bug: 170534200
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I28c8b49ac37f42d3ff89554e18fe042a44f5704a
2020-10-31 12:21:18 +01:00
Greg Kroah-Hartman
d1f4f1327d ANDROID: GKI: ABI update for Oct 31 KABI break
Leaf changes summary: 3380 artifacts changed (154 filtered out)
Changed leaf types summary: 282 (120 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 3052 Changed (32 filtered out), 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 46 Changed (2 filtered out), 0 Added variable

3052 functions with some sub-type change:
46 Changed variables:
'struct dentry_operations at dcache.h:139:1' changed:
  type size hasn't changed
  1 data member insertion:
    'void (const path*, path*)* dentry_operations::d_canonical_path', at offset 832 (in bits) at dcache.h:154:1
  there are data member changes:
    'u64 dentry_operations::android_kabi_reserved1' offset changed from 832 to 896 (in bits) (by +64 bits)
    'u64 dentry_operations::android_kabi_reserved2' offset changed from 896 to 960 (in bits) (by +64 bits)
    'u64 dentry_operations::android_kabi_reserved3' offset changed from 960 to 1024 (in bits) (by +64 bits)
    'u64 dentry_operations::android_kabi_reserved4' offset changed from 1024 to 1088 (in bits) (by +64 bits)
  3330 impacted interfaces

'struct inet_connection_sock at inet_connection_sock.h:87:1' changed (indirectly):
  type size changed from 11840 to 11904 (in bits)
  there are data member changes:
    type 'struct inet_sock' of 'inet_connection_sock::icsk_inet' changed:
      type size changed from 8320 to 8384 (in bits)
      there are data member changes:
        type 'struct sock' of 'inet_sock::sk' changed:
          type size changed from 6656 to 6720 (in bits)
          1 data member insertion:
            'u64 sock::android_vendor_data1', at offset 6656 (in bits) at sock.h:526:1
          422 impacted interfaces
        'ipv6_pinfo* inet_sock::pinet6' offset changed from 6656 to 6720 (in bits) (by +64 bits)
        '__be32 inet_sock::inet_saddr' offset changed from 6720 to 6784 (in bits) (by +64 bits)
        '__s16 inet_sock::uc_ttl' offset changed from 6752 to 6816 (in bits) (by +64 bits)
        '__u16 inet_sock::cmsg_flags' offset changed from 6768 to 6832 (in bits) (by +64 bits)
        '__be16 inet_sock::inet_sport' offset changed from 6784 to 6848 (in bits) (by +64 bits)
        '__u16 inet_sock::inet_id' offset changed from 6800 to 6864 (in bits) (by +64 bits)
        'ip_options_rcu* inet_sock::inet_opt' offset changed from 6848 to 6912 (in bits) (by +64 bits)
        'int inet_sock::rx_dst_ifindex' offset changed from 6912 to 6976 (in bits) (by +64 bits)
        '__u8 inet_sock::tos' offset changed from 6944 to 7008 (in bits) (by +64 bits)
        '__u8 inet_sock::min_ttl' offset changed from 6952 to 7016 (in bits) (by +64 bits)
        '__u8 inet_sock::mc_ttl' offset changed from 6960 to 7024 (in bits) (by +64 bits)
        '__u8 inet_sock::pmtudisc' offset changed from 6968 to 7032 (in bits) (by +64 bits)
        '__u8 inet_sock::nodefrag' offset changed from 6976 to 7040 (in bits) (by +64 bits)
        '__u8 inet_sock::rcv_tos' offset changed from 6992 to 7056 (in bits) (by +64 bits)
        '__u8 inet_sock::convert_csum' offset changed from 7000 to 7064 (in bits) (by +64 bits)
        'int inet_sock::uc_index' offset changed from 7008 to 7072 (in bits) (by +64 bits)
        'int inet_sock::mc_index' offset changed from 7040 to 7104 (in bits) (by +64 bits)
        '__be32 inet_sock::mc_addr' offset changed from 7072 to 7136 (in bits) (by +64 bits)
        'ip_mc_socklist* inet_sock::mc_list' offset changed from 7104 to 7168 (in bits) (by +64 bits)
        'inet_cork_full inet_sock::cork' offset changed from 7168 to 7232 (in bits) (by +64 bits)
      2 impacted interfaces
    'request_sock_queue inet_connection_sock::icsk_accept_queue' offset changed from 8320 to 8384 (in bits) (by +64 bits)
    'inet_bind_bucket* inet_connection_sock::icsk_bind_hash' offset changed from 8960 to 9024 (in bits) (by +64 bits)
    'unsigned long int inet_connection_sock::icsk_timeout' offset changed from 9024 to 9088 (in bits) (by +64 bits)
    'timer_list inet_connection_sock::icsk_retransmit_timer' offset changed from 9088 to 9152 (in bits) (by +64 bits)
    'timer_list inet_connection_sock::icsk_delack_timer' offset changed from 9536 to 9600 (in bits) (by +64 bits)
    '__u32 inet_connection_sock::icsk_rto' offset changed from 9984 to 10048 (in bits) (by +64 bits)
    '__u32 inet_connection_sock::icsk_pmtu_cookie' offset changed from 10016 to 10080 (in bits) (by +64 bits)
    'const tcp_congestion_ops* inet_connection_sock::icsk_ca_ops' offset changed from 10048 to 10112 (in bits) (by +64 bits)
    'const inet_connection_sock_af_ops* inet_connection_sock::icsk_af_ops' offset changed from 10112 to 10176 (in bits) (by +64 bits)
    'const tcp_ulp_ops* inet_connection_sock::icsk_ulp_ops' offset changed from 10176 to 10240 (in bits) (by +64 bits)
    'void* inet_connection_sock::icsk_ulp_data' offset changed from 10240 to 10304 (in bits) (by +64 bits)
    'void (sock*, typedef u32)* inet_connection_sock::icsk_clean_acked' offset changed from 10304 to 10368 (in bits) (by +64 bits)
    'hlist_node inet_connection_sock::icsk_listen_portaddr_node' offset changed from 10368 to 10432 (in bits) (by +64 bits)
    'unsigned int (sock*, typedef u32)* inet_connection_sock::icsk_sync_mss' offset changed from 10496 to 10560 (in bits) (by +64 bits)
    '__u8 inet_connection_sock::icsk_ca_dst_locked' offset changed from 10560 to 10624 (in bits) (by +64 bits)
    '__u8 inet_connection_sock::icsk_retransmits' offset changed from 10568 to 10632 (in bits) (by +64 bits)
    '__u8 inet_connection_sock::icsk_pending' offset changed from 10576 to 10640 (in bits) (by +64 bits)
    '__u8 inet_connection_sock::icsk_backoff' offset changed from 10584 to 10648 (in bits) (by +64 bits)
    '__u8 inet_connection_sock::icsk_syn_retries' offset changed from 10592 to 10656 (in bits) (by +64 bits)
    '__u8 inet_connection_sock::icsk_probes_out' offset changed from 10600 to 10664 (in bits) (by +64 bits)
    '__u16 inet_connection_sock::icsk_ext_hdr_len' offset changed from 10608 to 10672 (in bits) (by +64 bits)
    'struct {__u8 pending; __u8 quick; __u8 pingpong; __u8 blocked; __u32 ato; unsigned long int timeout; __u32 lrcvtime; __u16 last_seg_size; __u16 rcv_mss;} inet_connection_sock::icsk_ack' offset changed from 10624 to 10688 (in bits) (by +64 bits)
    'struct {int enabled; int search_high; int search_low; int probe_size; u32 probe_timestamp;} inet_connection_sock::icsk_mtup' offset changed from 10816 to 10880 (in bits) (by +64 bits)
    'u32 inet_connection_sock::icsk_user_timeout' offset changed from 10976 to 11040 (in bits) (by +64 bits)
    'u64 inet_connection_sock::icsk_ca_priv[13]' offset changed from 11008 to 11072 (in bits) (by +64 bits)
  2 impacted interfaces

'struct module at module.h:354:1' changed:
  type size hasn't changed
  1 data member insertion:
    'bool module::using_gplonly_symbols', at offset 2688 (in bits) at module.h:385:1
  there are data member changes:
    anonymous data member union {module_kabi_preserve_1 m1; struct {u64 android_kabi_reserved1;} __UNIQUE_ID_android_kabi_hide201; union {};} at offset 6848 (in bits) became data member 'u64 module::android_kabi_reserved1'
    'bool module::sig_ok' offset changed from 2688 to 2696 (in bits) (by +8 bits)
    'bool module::async_probe_requested' offset changed from 2696 to 2704 (in bits) (by +8 bits)
  3330 impacted interfaces

'struct nf_conn at nf_conntrack.h:58:1' changed:
  type size changed from 2048 to 2240 (in bits)
  3 data member insertions:
    'u64 nf_conn::android_kabi_reserved1', at offset 2048 (in bits) at nf_conntrack.h:111:1
    'u64 nf_conn::android_kabi_reserved2', at offset 2112 (in bits) at nf_conntrack.h:112:1
    'u64 nf_conn::android_vendor_data1', at offset 2176 (in bits) at nf_conntrack.h:114:1
  422 impacted interfaces

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iec13bb17711b4337d6810b6eac45f755497c6ed8
2020-10-31 09:36:21 +01:00
Greg Kroah-Hartman
95dc566101 ANDROID: GKI: add Android ABI padding to struct nf_conn
Try to mitigate potential future driver core api changes by adding
padding to struct nf_conn;

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib18a9a929d351c66556f1f27b217cbf22b733a10
2020-10-31 09:30:20 +01:00
Greg Kroah-Hartman
0709341102 ANDROID: GKI: add vendor padding variable in struct skb_shared_info
Some vendors want to add things to 'struct skb_shared_info', so give
them an array to place their data.

Bug: 171013716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifaa5942550794b747e9624124c785a0bc85dfe17
2020-10-31 09:30:20 +01:00
Greg Kroah-Hartman
01435b2e91 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: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I67a9be129150690f8c1961accf7d5cdf0d5d50cc
2020-10-30 10:02:26 +01:00