~vicamo/+git/ubuntu-kernel:bug-1893194/enable-vmd-aspm-8086-a0bc/groovy

Last commit made on 2020-08-31
Get this branch:
git clone -b bug-1893194/enable-vmd-aspm-8086-a0bc/groovy https://git.launchpad.net/~vicamo/+git/ubuntu-kernel
Only You-Sheng Yang can upload to this branch. If you are You-Sheng Yang please log in for upload directions.

Branch merges

Branch information

Name:
bug-1893194/enable-vmd-aspm-8086-a0bc/groovy
Repository:
lp:~vicamo/+git/ubuntu-kernel

Recent commits

b10c66d... by You-Sheng Yang

Bug 1893194: Enable VMD ASPM for 8086:a0bc

5edd14a... by You-Sheng Yang

UBUNTU: SAUCE: PCI/ASPM: VMD: add ASPM quirk for 8086:a0bc

BugLink: https://bugs.launchpad.net/bugs/1893194

One VMD equipped platform has another PCI bridge with PCI ID [8086:a0bc]
that is not already in Ubuntu sauced PCI_DEV_FLAGS_ENABLE_ASPM list.
Link Capability Register shows ASPM L1 supported, but has ASPM Disabled
in Link Control status:

10000:e0:1c.4 PCI bridge [0604]: Intel Corporation Device [8086:a0bc]
(rev 20) (prog-if 00 [Normal decode])
        ...
 Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
  ...
  LnkCap: Port #5, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 <16us
   ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
  LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
   ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-

This adds an additional device [8086:a0bc], a PCI bridge behind VMD
controller, to enable its ASPM.

Signed-off-by: You-Sheng Yang <email address hidden>

ec720d8... by Greg Kroah-Hartman <email address hidden>

Linux 5.8.5

BugLink: https://bugs.launchpad.net/bugs/1893237

Tested-by: Jon Hunter <email address hidden>
Tested-by: Guenter Roeck <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

fb9d87e... by jcmvbkbc

binfmt_flat: revert "binfmt_flat: don't offset the data start"

BugLink: https://bugs.launchpad.net/bugs/1893237

commit 2217b982624680d19a80ebb4600d05c8586c4f96 upstream.

binfmt_flat loader uses the gap between text and data to store data
segment pointers for the libraries. Even in the absence of shared
libraries it stores at least one pointer to the executable's own data
segment. Text and data can go back to back in the flat binary image and
without offsetting data segment last few instructions in the text
segment may get corrupted by the data segment pointer.

Fix it by reverting commit a2357223c50a ("binfmt_flat: don't offset the
data start").

Cc: <email address hidden>
Fixes: a2357223c50a ("binfmt_flat: don't offset the data start")
Signed-off-by: Max Filippov <email address hidden>
Signed-off-by: Greg Ungerer <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

b6b4d52... by Pavel Begunkov <email address hidden>

io_uring: fix missing ->mm on exit

BugLink: https://bugs.launchpad.net/bugs/1893237

Upstream commits:

8eb06d7e8dd85 ("io_uring: fix missing ->mm on exit")
cbcf72148da4a ("io_uring: return locked and pinned page accounting")

do_exit() first drops current->mm and then runs task_work, from where
io_sq_thread_acquire_mm() would try to set mm for a user dying process.

[ 208.004249] WARNING: CPU: 2 PID: 1854 at
 kernel/kthread.c:1238 kthread_use_mm+0x244/0x270
[ 208.004287] kthread_use_mm+0x244/0x270
[ 208.004288] io_sq_thread_acquire_mm.part.0+0x54/0x80
[ 208.004290] io_async_task_func+0x258/0x2ac
[ 208.004291] task_work_run+0xc8/0x210
[ 208.004294] do_exit+0x1b8/0x430
[ 208.004295] do_group_exit+0x44/0xac
[ 208.004296] get_signal+0x164/0x69c
[ 208.004298] do_signal+0x94/0x1d0
[ 208.004299] do_notify_resume+0x18c/0x340
[ 208.004300] work_pending+0x8/0x3d4

Reported-by: Roman Gershman <email address hidden>
Tested-by: Roman Gershman <email address hidden>
Signed-off-by: Pavel Begunkov <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

e5b5543... by Johannes Berg

netlink: fix state reallocation in policy export

BugLink: https://bugs.launchpad.net/bugs/1893237

[ Upstream commit d1fb55592909ea249af70170c7a52e637009564d ]

Evidently, when I did this previously, we didn't have more than
10 policies and didn't run into the reallocation path, because
it's missing a memset() for the unused policies. Fix that.

Fixes: d07dcf9aadd6 ("netlink: add infrastructure to expose policies to userspace")
Signed-off-by: Johannes Berg <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

a740463... by Maxim Mikityanskiy <email address hidden>

ethtool: Don't omit the netlink reply if no features were changed

BugLink: https://bugs.launchpad.net/bugs/1893237

[ Upstream commit f01204ec8be7ea5e8f0230a7d4200e338d563bde ]

The legacy ethtool userspace tool shows an error when no features could
be changed. It's useful to have a netlink reply to be able to show this
error when __netdev_update_features wasn't called, for example:

1. ethtool -k eth0
   large-receive-offload: off
2. ethtool -K eth0 rx-fcs on
3. ethtool -K eth0 lro on
   Could not change any device features
   rx-lro: off [requested on]
4. ethtool -K eth0 lro on
   # The output should be the same, but without this patch the kernel
   # doesn't send the reply, and ethtool is unable to detect the error.

This commit makes ethtool-netlink always return a reply when requested,
and it still avoids unnecessary calls to __netdev_update_features if the
wanted features haven't changed.

Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
Signed-off-by: Maxim Mikityanskiy <email address hidden>
Reviewed-by: Michal Kubecek <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

2749f7e... by Maxim Mikityanskiy <email address hidden>

ethtool: Account for hw_features in netlink interface

BugLink: https://bugs.launchpad.net/bugs/1893237

[ Upstream commit 2847bfed888fbb8bf4c8e8067fd6127538c2c700 ]

ethtool-netlink ignores dev->hw_features and may confuse the drivers by
asking them to enable features not in the hw_features bitmask. For
example:

1. ethtool -k eth0
   tls-hw-tx-offload: off [fixed]
2. ethtool -K eth0 tls-hw-tx-offload on
   tls-hw-tx-offload: on
3. ethtool -k eth0
   tls-hw-tx-offload: on [fixed]

Fitler out dev->hw_features from req_wanted to fix it and to resemble
the legacy ethtool behavior.

Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
Signed-off-by: Maxim Mikityanskiy <email address hidden>
Reviewed-by: Michal Kubecek <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

0274e10... by Maxim Mikityanskiy <email address hidden>

ethtool: Fix preserving of wanted feature bits in netlink interface

BugLink: https://bugs.launchpad.net/bugs/1893237

[ Upstream commit 840110a4eae190dcbb9907d68216d5d1d9f25839 ]

Currently, ethtool-netlink calculates new wanted bits as:
(req_wanted & req_mask) | (old_active & ~req_mask)

It completely discards the old wanted bits, so they are forgotten with
the next ethtool command. Sample steps to reproduce:

1. ethtool -k eth0
   tx-tcp-segmentation: on # TSO is on from the beginning
2. ethtool -K eth0 tx off
   tx-tcp-segmentation: off [not requested]
3. ethtool -k eth0
   tx-tcp-segmentation: off [requested on]
4. ethtool -K eth0 rx off # Some change unrelated to TSO
5. ethtool -k eth0
   tx-tcp-segmentation: off # "Wanted on" is forgotten

This commit fixes it by changing the formula to:
(req_wanted & req_mask) | (old_wanted & ~req_mask),
where old_active was replaced by old_wanted to account for the wanted
bits.

The shortcut condition for the case where nothing was changed now
compares wanted bitmasks, instead of wanted to active.

Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
Signed-off-by: Maxim Mikityanskiy <email address hidden>
Reviewed-by: Michal Kubecek <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

fa91d52... by Shay Agroskin <email address hidden>

net: ena: Make missed_tx stat incremental

BugLink: https://bugs.launchpad.net/bugs/1893237

[ Upstream commit ccd143e5150f24b9ba15145c7221b61dd9e41021 ]

Most statistics in ena driver are incremented, meaning that a stat's
value is a sum of all increases done to it since driver/queue
initialization.

This patch makes all statistics this way, effectively making missed_tx
statistic incremental.
Also added a comment regarding rx_drops and tx_drops to make it
clearer how these counters are calculated.

Fixes: 11095fdb712b ("net: ena: add statistics for missed tx packets")
Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>