- Jun 02, 2021
-
-
Michael Zhivich authored
mainline inclusion from mainline-v5.4-rc4 commit 63ec58b4 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I3T8ZP?from=project-issue CVE: NA -------------------------------- The introduction of clocksource_tsc_early broke the functionality of "tsc=reliable" and "tsc=nowatchdog" command line parameters, since clocksource_tsc_early is unconditionally registered with CLOCK_SOURCE_MUST_VERIFY and thus put on the watchdog list. This can cause the TSC to be declared unstable during boot: clocksource: timekeeping watchdog on CPU0: Marking clocksource 'tsc-early' as unstable because the skew is too large: clocksource: 'refined-jiffies' wd_now: fffb7018 wd_last: fffb6e9d mask: ffffffff clocksource: 'tsc-early' cs_now: 68a6a7070f6a0 cs_last: 68a69ab6f74d6 mask: ffffffffffffffff tsc: Marking TSC unstable due to clocksource watchdog The co...
-
- Jun 01, 2021
-
-
陈佳骏 authored
euleros inclusion category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Since we add poll_limit_ns in struct cpuidle_device, governor in struct cpuidle_driver which broken the kabi. So we wrapper to fix kabi broken. Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Reviewed-by:
Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Xiangyou Xie authored
hulk inclusion category: config bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA We enable haltpoll by default for the improvement of performance. X86 has been supported. Now, we will provide it on ARM. Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Reviewed-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Xiangyou Xie authored
hulk inclusion category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Add support for cpuidle-haltpoll driver for ARM. Allow arm to use the couidle-haltpoll driver. Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Reviewed-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Xiangyou Xie authored
hulk inclusion category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Currently, ARM does not support kvm_para* of KVM_GUEST. We provide some definitions of kvm_para* functions, although it is only a simple return. Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Reviewed-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Xiangyou Xie authored
hulk inclusion category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Use arch_cpu_idle() to replace default_idle() in default_enter_idle(). default_idle() is defined only in x86. Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Reviewed-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Xiangyou Xie authored
hulk inclusion category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA When it is to wake up a task in a remote cpu shared LLC , we can simply set need_resched flag, waking up a cpu that is in polling idle. This wakeup action does not require an IPI. But the premise is that it need to support _TIF_POLLING_NRFLAG Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Reviewed-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Xiangyou Xie authored
hulk inclusion category: config bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: #232 We enable haltpoll by default for the improvement of performance. Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Christian Borntraeger authored
mainline inclusion from mainline-5.2 commit cdd6ad3a category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA There are cases where halt polling is unwanted. For example when running KVM on an over committed LPAR we rather want to give back the CPU to neighbour LPARs instead of polling. Let us provide a callback that allows architectures to disable polling. Signed-off-by:
Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Yihao Wu authored
mainline inclusion from mainline-5.7 commit 4902f7fc category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Fix a spelling typo in cpuidle-haltpoll.c. Signed-off-by:
Yihao Wu <wuyihao@linux.alibaba.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Maciej S. Szmigiero authored
mainline inclusion from mainline-5.7 commit dd52551f category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Before commit ("cpuidle-haltpoll: Enable kvm guest polling when dedicated physical CPUs are available") the cpuidle-haltpoll driver could also be used in scenarios when the host does not advertise the KVM_HINTS_REALTIME hint. While the behavior introduced by the aforementioned commit makes sense as the default there are cases where the old behavior is desired, for example, when other kernel changes triggered by presence by this hint are unwanted, for some workloads where the latency benefit from polling overweights the loss from idle CPU capacity that otherwise would be available, or just when running under older Qemu versions that lack this hint. Let's provide a typical "force" module parameter that allows restoring the old behavior. Signed-off-by:
Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Wanpeng Li authored
mainline inclusion from mainline-5.4 commit 1328edca category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA The downside of guest side polling is that polling is performed even with other runnable tasks in the host. However, even if poll in kvm can aware whether or not other runnable tasks in the same pCPU, it can still incur extra overhead in over-subscribe scenario. Now we can just enable guest polling when dedicated pCPUs are available. Signed-off-by:
Wanpeng Li <wanpengli@tencent.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Joao Martins authored
mainline inclusion from mainline-5.4 commit 472f2636 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA cpuidle-haltpoll can be built as a module to allow optional late load. Given we are setting @owner to THIS_MODULE, cpuidle will attempt to grab a module reference every time a cpuidle_device is registered -- so essentially all online cpus get a reference. This prevents for the module to be unloaded later, which makes the module_exit callback entirely unused. Thus remove the @owner and allow module to be unloaded. Signed-off-by:
Joao Martins <joao.m.martins@oracle.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Joao Martins authored
mainline inclusion from mainline-5.4 commit 5cc59f59 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA When a user loads cpuidle-haltpoll on a non KVM guest the module will successfully load, even though idle driver registration didn't take place. We should instead return -ENODEV signaling the user that the driver can't be loaded, like other error paths in haltpoll_init(). An example of such error paths is when we return -EBUSY when attempting to register an idle driver when it had one already (e.g. intel_idle loads at boot and then we attempt to insert module cpuidle-haltpoll). Signed-off-by:
Joao Martins <joao.m.martins@oracle.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Joao Martins authored
mainline inclusion from mainline-5.4 commit 97d3eb9d category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA When cpus != maxcpus cpuidle-haltpoll will fail to register all vcpus past the online ones and thus fail to register the idle driver. This is because cpuidle_add_sysfs() will return with -ENODEV as a consequence from get_cpu_device() return no device for a non-existing CPU. Instead switch to cpuidle_register_driver() and manually register each of the present cpus through cpuhp_setup_state() callbacks and future ones that get onlined or offlined. This mimmics similar logic that intel_idle does. Signed-off-by:
Joao Martins <joao.m.martins@oracle.com> Signed-off-by:
Boris Ostrovsky <boris.ostrovsky@oracle.com> Reviewed-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by: Xiangyou Xie <xie...
-
Joao Martins authored
mainline inclusion from mainline-5.4 commit 73214408 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Right now, guest current governors have the following ratings: * ladder -> 10 * teo -> 19 * menu -> 20 * haltpoll -> 21 * ladder + nohz=off -> 25 haltpoll governor got introduced and it is now the default governor given its highest rating -- with ladder+nohz being the exception -- regardless of idle driver in the guest. An example of an undesirable case is x86 KVM guests with MWAIT which have intel_idle registered first, and consequently will have haltpoll be used as governor which would get limited to a poll state and state 1 and the other states wouldn't get used. To keep the previous defaults we decrease rating of governor to 9 (below current lowest rating) and thus rely on @governor switch on cpuidle_register_driver() to tie in haltpoll idle driver and governor together. Signed-off-by:
Joao Martins <joao.m.martins@oracle.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Joao Martins authored
mainline inclusion from mainline-5.4 commit cb5d8c45 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA The recently introduced haltpoll driver is largely only useful with haltpoll governor. To allow drivers to associate with a particular idle behaviour, add a @governor property to 'struct cpuidle_driver' and thus allow a cpuidle driver to switch to a *preferred* governor on idle driver registration. We save the previous governor, and when an idle driver is unregistered we switch back to that. The @governor can be overridden by cpuidle.governor= boot param or alternatively be ignored if the governor doesn't exist. Signed-off-by:
Joao Martins <joao.m.martins@oracle.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Rafael J. Wysocki authored
mainline inclusion from mainline-5.1 commit 22782b3f category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA After commit ("cpuidle: Add cpuidle.governor= command line parameter") new cpuidle governors are not added to the list of available governors, so governor selection via sysfs doesn't work as expected (even though it is rarely used anyway). Fix that by making cpuidle_register_governor() add new governors to cpuidle_governors again. Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Rafael J. Wysocki authored
mainline inclusion from mainline-5.0 commit 61cb5758 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Add cpuidle.governor= command line parameter to allow the default cpuidle governor to be replaced. That is useful, for example, if someone running a tickful kernel wants to use the menu governor on it. Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Marcelo Tosatti authored
mainline inclusion from mainline-5.4 commit a1c4423b category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA When performing guest side polling, it is not necessary to also perform host side polling. So disable host side polling, via the new MSR interface, when loading cpuidle-haltpoll driver. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Marcelo Tosatti authored
mainline inclusion from mainline-5.3 commit 2d5ba19b category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Add an MSRs which allows the guest to disable host polling (specifically the cpuidle-haltpoll, when performing polling in the guest, disables host side polling). Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Marcelo Tosatti authored
mainline inclusion from mainline-5.4 commit 2cffe9f6 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA The cpuidle_haltpoll governor, in conjunction with the haltpoll cpuidle driver, allows guest vcpus to poll for a specified amount of time before halting. This provides the following benefits to host side polling: 1) The POLL flag is set while polling is performed, which allows a remote vCPU to avoid sending an IPI (and the associated cost of handling the IPI) when performing a wakeup. 2) The VM-exit cost can be avoided. The downside of guest side polling is that polling is performed even with other runnable tasks in the host. Results comparing halt_poll_ns and server/client application where a small packet is ping-ponged: host --> 31.33 halt_poll_ns=300000 / no guest busy spin --> 33.40 (93.8%) halt_poll_ns=0 / guest_halt_poll_ns=300000 --> 32.73 (95.7%) For the SAP HANA benchmarks (where idle_spin is a parameter of the previous version of the patch, results should be the same): hpns == halt_poll_ns idle_spin=0/ idle_spin=800/ idle_spin=0/ hpns=200000 hpns=0 hpns=800000 DeleteC06T03 (100 thread) 1.76 1.71 (-3%) 1.78 (+1%) InsertC16T02 (100 thread) 2.14 2.07 (-3%) 2.18 (+1.8%) DeleteC00T01 (1 thread) 1.34 1.28 (-4.5%) 1.29 (-3.7%) UpdateC00T03 (1 thread) 4.72 4.18 (-12%) 4.53 (-5%) Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Marcelo Tosatti authored
mainline inclusion from mainline-5.4 commit 7d4daeed category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Since this field is shared by all governors, move it to cpuidle device structure. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Marcelo Tosatti authored
mainline inclusion from mainline-5.5 commit 36fcb429 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Commit 259231a0 ("cpuidle: add poll_limit_ns to cpuidle_device structure") changed, by mistake, the target residency from the first available sleep state to the last available sleep state (which should be longer). This might cause excessive polling. Fixes: 259231a0 ("cpuidle: add poll_limit_ns to cpuidle_device structure") Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Stephen Rothwell authored
mainline inclusion from mainline-5.4 commit 7dcddef6 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA An x86_64 allmodconfig build produces these errors: x86_64-linux-gnu-ld: kernel/sched/core.o: in function `cpuidle_poll_time': core.c:(.text+0x230): multiple definition of `cpuidle_poll_time'; arch/x86/= kernel/process.o:process.c:(.text+0xc0): first defined here (and more) Fixes: 259231a0 ("cpuidle: add poll_limit_ns to cpuidle_device structure") Signed-off-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Marcelo Tosatti authored
mainline inclusion from mainline-5.4 commit 259231a0 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Add a poll_limit_ns variable to cpuidle_device structure. Calculate and configure it in the new cpuidle_poll_time function, in case its zero. Individual governors are allowed to override this value. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Marcelo Tosatti authored
mainline inclusion from mainline-5.4 commit fa86ee90 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA Add a cpuidle driver that calls the architecture default_idle routine. To be used in conjunction with the haltpoll governor. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Doug Smythies authored
mainline inclusion from mainline-5.0 commit 1617971c category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA The default time is declared in units of microsecnds, but is used as nanoseconds, resulting in significant accounting errors for idle state 0 time when all idle states deeper than 0 are disabled. Under these unusual conditions, we don't really care about the poll time limit anyhow. Fixes: 800fb34a ("cpuidle: poll_state: Disregard disable idle states") Signed-off-by:
Doug Smythies <dsmythies@telus.net> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Rafael J. Wysocki authored
mainline inclusion from mainline-5.0 commit 800fb34a category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA When computing the limit of time to spend in the loop in poll_idle(), use the target residency of the first enabled idle state deeper than state 0 instead of always using the target residency of state 1. This helps when state 1 is disabled for diagnostics, for instance. Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Rafael J. Wysocki authored
mainline inclusion from mainline-4.20 commit 01bad1c6 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA If need_resched() returns "false", breaking out of the loop in poll_idle() will cause a new idle state to be selected, so in fact it usually doesn't make sense to spin in it longer than the target residency of the second state. [Note that the "polling" state is used only if there is at least one "real" state defined in addition to it, so the second state is always there.] On the other hand, breaking out of it early (say in case the next state is disabled) shouldn't hurt as it is polling anyway. For this reason, make the loop in poll_idle() break if the CPU has been spinning longer than the target residency of the second state (the "polling" state can only be state[0]). Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Rafael J. Wysocki authored
mainline inclusion from mainline-4.20 commit eb40a380 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA It is not necessary to update data->last_state_idx in menu_select() as it only is used in menu_update() which only runs when data->needs_update is set and that is set only when updating data->last_state_idx in menu_reflect(). Accordingly, drop the update of data->last_state_idx from menu_select() and get rid of the (now redundant) "out" label from it. No intentional behavior changes. Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Yubo Miao <miaoyubo@huawei.com> Signed-off-by:
Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by:
Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Daniel Borkmann authored
mainline inclusion from mainline-v5.13-rc4 commit a7036191277f9fa68d92f2071ddc38c09b1e5ee5 category: bugfix bugzilla: NA CVE: CVE-2021-33200 -------------------------------- In 801c6058d14a ("bpf: Fix leakage of uninitialized bpf stack under speculation") we replaced masking logic with direct loads of immediates if the register is a known constant. Given in this case we do not apply any masking, there is also no reason for the operation to be truncated under the speculative domain. Therefore, there is also zero reason for the verifier to branch-off and simulate this case, it only needs to do it for unknown but bounded scalars. As a side-effect, this also enables few test cases that were previously rejected due to simulation under zero truncation. Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Reviewed-by:
Piotr Krysiuk <piotras@gmail.com> Acked-by:
Alexei Starovoitov <ast@kernel.org> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.c...>
-
Daniel Borkmann authored
mainline inclusion from mainline-v5.13-rc4 commit bb01a1bba579b4b1c5566af24d95f1767859771e category: bugfix bugzilla: NA CVE: CVE-2021-33200 -------------------------------- Masking direction as indicated via mask_to_left is considered to be calculated once and then used to derive pointer limits. Thus, this needs to be placed into bpf_sanitize_info instead so we can pass it to sanitize_ptr_alu() call after the pointer move. Piotr noticed a corner case where the off reg causes masking direction change which then results in an incorrect final aux->alu_limit. Fixes: 7fedb63a8307 ("bpf: Tighten speculative pointer arithmetic mask") Reported-by:
Piotr Krysiuk <piotras@gmail.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Reviewed-by:
Piotr Krysiuk <piotras@gmail.com> Acked-by:
Alexei Starovoitov <ast@kernel.org> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Reviewed-by:
Kuohai Xu <xukuohai@huawei.com> Reviewed-by:
Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Daniel Borkmann authored
mainline inclusion from mainline-v5.13-rc4 commit 3d0220f6861d713213b015b582e9f21e5b28d2e0 category: bugfix bugzilla: NA CVE: CVE-2021-33200 -------------------------------- Add a container structure struct bpf_sanitize_info which holds the current aux info, and update call-sites to sanitize_ptr_alu() to pass it in. This is needed for passing in additional state later on. Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Reviewed-by:
Piotr Krysiuk <piotras@gmail.com> Acked-by:
Alexei Starovoitov <ast@kernel.org> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Reviewed-by:
Kuohai Xu <xukuohai@huawei.com> Reviewed-by:
Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
- May 31, 2021
-
-
Xingui Yang authored
mainline inclusion from mainline-v5.12-rc6 commit 234e6d2c18f5 category: bugfix bugzilla: NA CVE: NA On Hisilicon Kunpeng920, ESP is set to 1 by default for all ports of SATA controller. In some scenarios, some ports are not external SATA ports, and it cause disks connected to these ports to be identified as removable disks. So disable the SXS capability on the software side to prevent users from mistakenly considering non-removable disks as removable disks and performing related operations. Signed-off-by:
Xingui Yang <yangxingui@huawei.com> Signed-off-by:
Luo Jiaxing <luojiaxing@huawei.com> Reviewed-by:
John Garry <john.garry@huawei.com> Link: https://lore.kernel.org/r/1615544676-61926-1-git-send-email-luojiaxing@huawei.com Signed-off-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Yang Xingui <yangxingui@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Vasily Averin authored
mainline inclusion from mainline-v5.8-rc6 commit 7779b047 category: bugfix bugzilla: 39163 CVE: NA ------------------------------------------------- fuse_writepages() ignores some errors taken from fuse_writepages_fill() I believe it is a bug: if .writepages is called with WB_SYNC_ALL it should either guarantee that all data was successfully saved or return error. Fixes: 26d614df ("fuse: Implement writepages callback") Signed-off-by:
Vasily Averin <vvs@virtuozzo.com> Signed-off-by:
Miklos Szeredi <mszeredi@redhat.com> Signed-off-by:
Yu Kuai <yukuai3@huawei.com> Reviewed-by:
Zhang Yi <yi.zhang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Trond Myklebust authored
mainline inclusion from mainline-v5.7-rc1 commit 75da9858 category: bugfix bugzilla: NA CVE: NA -------------------------------- We must not return from nfs_d_automount() without holding 2 references to the mount record. Doing so, will trigger the BUG() in finish_automount(). Also ensure that we don't try to reschedule the automount timer with a negative or zero timeout value. Fixes: 22a1ae9a ("NFS: If nfs_mountpoint_expiry_timeout < 0, do not expire submounts") Cc: stable@vger.kernel.org # v5.5+ Signed-off-by:
Trond Myklebust <trond.myklebust@hammerspace.com> Conflicts: fs/nfs/namespace.c Signed-off-by:
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Reviewed-by:
Zhang Yi <yi.zhang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Trond Myklebust authored
mainline inclusion from mainline-v5.5-rc1 commit 22a1ae9a category: bugfix bugzilla: NA CVE: NA -------------------------------- If we set nfs_mountpoint_expiry_timeout to a negative value, then allow that to imply that we do not expire NFSv4 submounts. Signed-off-by:
Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by:
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Reviewed-by:
Zhang Yi <yi.zhang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Benjamin Coddington authored
mainline inclusion from mainline-v5.4-rc1 commit 581057c8 category: bugfix bugzilla: NA CVE: NA -------------------------------- This check has been hanging out since we used to have parallel paths to add dentry in nfs_create(), but that hasn't been the case for some years. Signed-off-by:
Benjamin Coddington <bcodding@redhat.com> Signed-off-by:
Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by:
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Reviewed-by:
Zhang Yi <yi.zhang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-
Benjamin Coddington authored
mainline inclusion from mainline-v5.4-rc1 commit 17fd6e45 category: bugfix bugzilla: NA CVE: NA -------------------------------- Signed-off-by:
Benjamin Coddington <bcodding@redhat.com> Signed-off-by:
Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by:
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Reviewed-by:
Zhang Yi <yi.zhang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
-