The control VQ specific information is stored in the dedicated struct
mlx5_control_vq. When the callback is updated through
mlx5_vdpa_set_vq_cb(), make sure to update the control VQ struct.
Fixes: 5262912ef3 ("vdpa/mlx5: Add support for control VQ and MAC setting")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220613075958.511064-1-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com)
(cherry picked from commit 40f2f3e941)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4ef42d0ff2f8b3e5156b54473ebc5ebb877c22d2
This patch makes get_vq_group and set_group_asid optional. This is
needed to unbreak the vDPA parent that doesn't support multiple
address spaces.
Cc: Gautam Dawar <gautam.dawar@xilinx.com>
Fixes: aaca8373c4 ("vhost-vdpa: support ASID based IOTLB API")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220609041901.2029-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 00d1f54647)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I83cce7173bc7ec6dd00479932d5515bfacb50fe1
We should use size of descriptor chain to test loop condition
in the indirect case. And another statistical count is also introduced
for indirect descriptors to avoid conflict with the statistical count
of direct descriptors.
Fixes: f87d0fbb57 ("vringh: host-side implementation of virtio rings.")
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Signed-off-by: Fam Zheng <fam.zheng@bytedance.com>
Message-Id: <20220505100910.137-1-xieyongji@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit dbd29e0752)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I989cc3d74401507f6b9c282971e60ecb21785895
These lines were supposed to be indented.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Message-Id: <Yp71IYMP+QfuCJ8t@kili>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eli Cohen <elic@nvidia.com>
Acked-by: Si-Wei Liu <si-wei.liu@oracle.com>
(cherry picked from commit f38b3c6a78)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I92310051004e413b6ffbf9f89e7e4ce939614fcf
Return success if we were able to delete a vlan. The current code
always returns failure.
Fixes: baf2ad3f6a ("vdpa/mlx5: Add RX MAC VLAN filter support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Message-Id: <Yp709f1g9NcMBCHg@kili>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eli Cohen <elic@nvidia.com>
Acked-by: Si-Wei Liu <si-wei.liu@oracle.com>
(cherry picked from commit f766c409fc)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibaa57311cd2e123688f6261dc09bb547dd82c504
Call virtio_device_ready() to make this driver work after commit
b4ec69d7e09 ("virtio: harden vring IRQ"), since the driver uses the
virtqueues in the probe function. (The virtio core sets the device
ready when probe returns.)
Fixes: 8b4ec69d7e ("virtio: harden vring IRQ")
Fixes: 68f5d3f3b6 ("um: add PCI over virtio emulation driver")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Message-Id: <20220610151203.3492541-1-vincent.whitchurch@axis.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
(cherry picked from commit eacea84459)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If175f1a6a10e3f53afa89b9ae3f98cd6e6f99823
Enable support for IPv6 multicast forwarding, required for devices with
border routing capabilities. Note this option will likely be unset after
making ipv6 a GKI module.
Bug: 233821827
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I0ffabbe21373ac23bc353abda51862eba0135972
Add the drivers/leds/rgb/leds-qcom-lpg.ko driver to the list of modules
that the db845c build needs as it is now upstream and actually builds.
Fixes: 24e2d05d1b ("leds: Add driver for Qualcomm LPG")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5bb6ffe688c5c9fe85313d1d7302d248789508ab
Commit 0710d0122a ("mm: Kconfig: reorganize misplaced mm options")
reorginized the mm config options a bit, so the gki_defconfig options
also need to be reordered so that the build succeeds.
Fixes: 0710d0122a ("mm: Kconfig: reorganize misplaced mm options")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic4228bc9498258e0d184daeac482c79253843b83
In commit 7374fa33dc ("init/Kconfig: remove USELIB syscall by
default") CONFIG_USELIB is disabled, so remove the "is not set" setting
in the x86 gki_defconfig file to resolve the build issue.
Fixes: 7374fa33dc ("init/Kconfig: remove USELIB syscall by default")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If7565bffb90b2efd913f08a8aeccbb11cc77ac17
This reverts commit 090a1da697.
It brings it back now that we have merged around the problem area.
Bug: 200082547
Bug: 214445388
Cc: Ramji Jiyani <ramjiyani@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iaa69221f341bf2face454ec0452efff2cbba9042
This reverts commit 5ffc4c2275.
It conflicts in bad ways with the module code changes in 5.19-rc1 so
revert it for now. If it is still needed, it can be added back later.
Bug: 200082547
Bug: 214445388
Cc: Ramji Jiyani <ramjiyani@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibf0b85c355cfc3e1a45c213a131a12c9e3061349
This reverts commit befc75e758.
It conflicts in bad ways with the module code changes in 5.19-rc1 so
revert it for now. If it is still needed, it can be added back in
later.
Bug: 200082547
Bug: 214445388
Cc: Ramji Jiyani <ramjiyani@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ice884d241ae153a75facc1ca409ea5c59653cde3
This reverts commit 5ebe162306.
It causes lots of conflicts in the 5.19-rc1 merge due to the rewrite and
movement of the module core code. If this is still needed, it can be
added back later.
Bug: 181639260
Cc: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I742e7ef56c2dd7a9b6c9c296dc9f96bced84bc7c
Add new vendor hook when set affinity to detect task status
for performance tuning.
Bug: 236775946
Change-Id: I407637c85e2ea93585877312f090981fee848979
Signed-off-by: Jing-Ting Wu <Jing-Ting.Wu@mediatek.com>
When building android-mainline with a version of clang that supports
CONFIG_RANDSTRUCT, there are errors about casts from randomized
structures to non-randomized structures:
fs/incfs/data_mgmt.c:240:10: error: casting from randomized structure pointer type 'struct dentry *' to 'struct data_file *'
return (struct data_file *)index_file_dentry;
^
fs/incfs/data_mgmt.c:257:12: error: casting from randomized structure pointer type 'struct file *' to 'struct data_file *'
result = (struct data_file *)bf;
^
2 errors generated.
As suggested by Kees on aosp/1995750, these casts should actually be
using the ERR_CAST macro, which is a more proper way to pass error
pointers around.
Change-Id: Iab73ac7503235f1147154a01a22ab8608e3daf8b
Fixes: 3f4938108a ("ANDROID: Incremental fs: Create mapped file")
Link: https://github.com/ClangBuiltLinux/linux/issues/1652
Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Commit 8ff978b8b2 ("ipv4/raw: support binding to nonlocal addresses")
introduced a helper function to fold duplicated validity checks of bind
addresses into inet_addr_valid_or_nonlocal(). However, this caused an
unintended regression in ping_check_bind_addr(), which previously would
reject binding to multicast and broadcast addresses, but now these are
both incorrectly allowed as reported in [1].
This patch restores the original check. A simple reordering is done to
improve readability and make it evident that multicast and broadcast
addresses should not be allowed. Also, add an early exit for INADDR_ANY
which replaces lost behavior added by commit 0ce779a9f5 ("net: Avoid
unnecessary inet_addr_type() call when addr is INADDR_ANY").
Furthermore, this patch introduces regression selftests to catch these
specific cases.
[1] https://lore.kernel.org/netdev/CANP3RGdkAcDyAZoT1h8Gtuu0saq+eOrrTiWbxnOs+5zn+cpyKg@mail.gmail.com/
Fixes: 8ff978b8b2 ("ipv4/raw: support binding to nonlocal addresses")
Cc: Miaohe Lin <linmiaohe@huawei.com>
Reported-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Riccardo Paolo Bestetti <pbl@bestov.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b4a028c4d0)
Bug: 235430656
Test: atest vts_kernel_net_tests
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I8ac173422e2a1aec1f69d7bca8253b045c80371e
Fix the arm64 build error which was caused by commit ae07562909 ("mm:
change huge_ptep_clear_flush() to return the original pte") interacting
with commit fb396bb459 ("arm64/hugetlb: Drop TLB flush from
get_clear_flush()"):
arch/arm64/mm/hugetlbpage.c: In function ‘huge_ptep_clear_flush’:
arch/arm64/mm/hugetlbpage.c:515:9: error: implicit declaration of function ‘get_clear_flush’; did you mean ‘ptep_clear_flush’? [-Werror=implicit-function-declaration]
515 | return get_clear_flush(vma->vm_mm, addr, ptep, pgsize, ncontig);
| ^~~~~~~~~~~~~~~
| ptep_clear_flush
Due to the new get_clear_contig() has dropped TLB flush, we should add
an explicit TLB flush in huge_ptep_clear_flush() to keep original
semantics when changing to use new get_clear_contig().
Fixes: fb396bb459 ("arm64/hugetlb: Drop TLB flush from get_clear_flush()").
Fixes: ae07562909 ("mm: change huge_ptep_clear_flush() to return the original pte")
Reported-and-tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit e68b823ab0)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I31fbc8728fbd3b108343b71e29f281c6d408b7f9
Commit 006477f40d ("kconfig: move the "Executable file formats" menu
to fs/Kconfig.binfmt") moved the Kconfig order around a bit, which
messed with the checking of the gki_defconfig files by the build system.
Also the ZSMALLOC=m requirement went away with commit 6140ae41ef
("zram: fix Kconfig dependency warning") and it is still enabled.
Fix all of these up by reordering some of the config options.
Fixes: 006477f40d ("kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt")
Fixes: 6140ae41ef ("zram: fix Kconfig dependency warning")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibd807dae4cc50999838f4471f4f144e6cdb41db1
This reverts commit 4dc2a5a8f6.
A non-zero return value from pfkey_broadcast() does not necessarily mean
an error occurred as this function returns -ESRCH when no registered
listener received the message. In particular, a call with
BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
zero so that this commit in fact prevents processing any PF_KEY message.
One visible effect is that racoon daemon fails to find encryption
algorithms like aes and refuses to start.
Excluding -ESRCH return value would fix this but it's not obvious that
we really want to bail out here and most other callers of
pfkey_broadcast() also ignore the return value. Also, as pointed out by
Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
should use netlink instead so that we should only disturb the code for
really important fixes.
v2: add a comment explaining why is the return value ignored
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 9c90c9b3e5)
Bug: 235430656
Test: TreeHugger, fixes failures in Android net-test wrt. pf_key.
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I173e37a840be187cb471a97b450b9fa06842497d
Steps on the way to 5.19-rc1
Resolves merge conflict in:
fs/proc/base.c
mm/util.c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I55d6d0cadb4dbd0f978a1e7d14444068bd050a7c