release 6.15.2 (preliminary)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 5ac90c5aed97728c8f4f64c02d75334c84a801ef Mon Sep 17 00:00:00 2001
|
||||
From bf57be2df6a113afba465bea635444764a7d0f11 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Thu, 19 May 2022 14:40:07 +0200
|
||||
Subject: drivers/firmware: skip simpledrm if nvidia-drm.modeset=1 is set
|
||||
@@ -74,7 +74,7 @@ Cherry-picked-for: https://gitlab.archlinux.org/archlinux/packaging/packages/lin
|
||||
static struct platform_device *pd;
|
||||
static DEFINE_MUTEX(disable_lock);
|
||||
static bool disabled;
|
||||
@@ -164,7 +180,7 @@ static __init int sysfb_init(void)
|
||||
@@ -165,7 +181,7 @@ static __init int sysfb_init(void)
|
||||
|
||||
/* try to create a simple-framebuffer device */
|
||||
compatible = sysfb_parse_mode(si, &mode);
|
||||
|
@@ -1,191 +0,0 @@
|
||||
From 1d8e5829e40e6547e10a5f479e2a6fea0d412132 Mon Sep 17 00:00:00 2001
|
||||
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
Date: Wed, 30 Apr 2025 15:07:03 -0400
|
||||
Subject: Bluetooth: hci_event: Fix not using key encryption size when its
|
||||
known
|
||||
|
||||
This fixes the regression introduced by 50c1241e6a8a ("Bluetooth: l2cap:
|
||||
Check encryption key size on incoming connection") introduced a check for
|
||||
l2cap_check_enc_key_size which checks for hcon->enc_key_size which may
|
||||
not be initialized if HCI_OP_READ_ENC_KEY_SIZE is still pending.
|
||||
|
||||
If the key encryption size is known, due previously reading it using
|
||||
HCI_OP_READ_ENC_KEY_SIZE, then store it as part of link_key/smp_ltk
|
||||
structures so the next time the encryption is changed their values are
|
||||
used as conn->enc_key_size thus avoiding the racing against
|
||||
HCI_OP_READ_ENC_KEY_SIZE.
|
||||
|
||||
Now that the enc_size is stored as part of key the information the code
|
||||
then attempts to check that there is no downgrade of security if
|
||||
HCI_OP_READ_ENC_KEY_SIZE returns a value smaller than what has been
|
||||
previously stored.
|
||||
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=220061
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=220063
|
||||
Fixes: 522e9ed157e3 ("Bluetooth: l2cap: Check encryption key size on incoming connection")
|
||||
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
Cherry-picked-for: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/137
|
||||
---
|
||||
include/net/bluetooth/hci_core.h | 1 +
|
||||
net/bluetooth/hci_conn.c | 24 +++++++++++
|
||||
net/bluetooth/hci_event.c | 73 ++++++++++++++++++--------------
|
||||
3 files changed, 67 insertions(+), 31 deletions(-)
|
||||
|
||||
--- a/include/net/bluetooth/hci_core.h
|
||||
+++ b/include/net/bluetooth/hci_core.h
|
||||
@@ -1778,6 +1778,7 @@ struct hci_conn_params *hci_pend_le_acti
|
||||
void hci_uuids_clear(struct hci_dev *hdev);
|
||||
|
||||
void hci_link_keys_clear(struct hci_dev *hdev);
|
||||
+u8 *hci_conn_key_enc_size(struct hci_conn *conn);
|
||||
struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr);
|
||||
struct link_key *hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn,
|
||||
bdaddr_t *bdaddr, u8 *val, u8 type,
|
||||
--- a/net/bluetooth/hci_conn.c
|
||||
+++ b/net/bluetooth/hci_conn.c
|
||||
@@ -2897,3 +2897,27 @@ int hci_abort_conn(struct hci_conn *conn
|
||||
*/
|
||||
return hci_cmd_sync_run_once(hdev, abort_conn_sync, conn, NULL);
|
||||
}
|
||||
+
|
||||
+u8 *hci_conn_key_enc_size(struct hci_conn *conn)
|
||||
+{
|
||||
+ if (conn->type == ACL_LINK) {
|
||||
+ struct link_key *key;
|
||||
+
|
||||
+ key = hci_find_link_key(conn->hdev, &conn->dst);
|
||||
+ if (!key)
|
||||
+ return NULL;
|
||||
+
|
||||
+ return &key->pin_len;
|
||||
+ } else if (conn->type == LE_LINK) {
|
||||
+ struct smp_ltk *ltk;
|
||||
+
|
||||
+ ltk = hci_find_ltk(conn->hdev, &conn->dst, conn->dst_type,
|
||||
+ conn->role);
|
||||
+ if (!ltk)
|
||||
+ return NULL;
|
||||
+
|
||||
+ return <k->enc_size;
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
--- a/net/bluetooth/hci_event.c
|
||||
+++ b/net/bluetooth/hci_event.c
|
||||
@@ -739,10 +739,17 @@ static u8 hci_cc_read_enc_key_size(struc
|
||||
handle);
|
||||
conn->enc_key_size = 0;
|
||||
} else {
|
||||
+ u8 *key_enc_size = hci_conn_key_enc_size(conn);
|
||||
+
|
||||
conn->enc_key_size = rp->key_size;
|
||||
status = 0;
|
||||
|
||||
- if (conn->enc_key_size < hdev->min_enc_key_size) {
|
||||
+ /* Attempt to check if the key size is too small or if it has
|
||||
+ * been downgraded from the last time it was stored as part of
|
||||
+ * the link_key.
|
||||
+ */
|
||||
+ if (conn->enc_key_size < hdev->min_enc_key_size ||
|
||||
+ (key_enc_size && conn->enc_key_size < *key_enc_size)) {
|
||||
/* As slave role, the conn->state has been set to
|
||||
* BT_CONNECTED and l2cap conn req might not be received
|
||||
* yet, at this moment the l2cap layer almost does
|
||||
@@ -755,6 +762,10 @@ static u8 hci_cc_read_enc_key_size(struc
|
||||
clear_bit(HCI_CONN_ENCRYPT, &conn->flags);
|
||||
clear_bit(HCI_CONN_AES_CCM, &conn->flags);
|
||||
}
|
||||
+
|
||||
+ /* Update the key encryption size with the connection one */
|
||||
+ if (key_enc_size && *key_enc_size != conn->enc_key_size)
|
||||
+ *key_enc_size = conn->enc_key_size;
|
||||
}
|
||||
|
||||
hci_encrypt_cfm(conn, status);
|
||||
@@ -3065,6 +3076,34 @@ static void hci_inquiry_result_evt(struc
|
||||
hci_dev_unlock(hdev);
|
||||
}
|
||||
|
||||
+static int hci_read_enc_key_size(struct hci_dev *hdev, struct hci_conn *conn)
|
||||
+{
|
||||
+ struct hci_cp_read_enc_key_size cp;
|
||||
+ u8 *key_enc_size = hci_conn_key_enc_size(conn);
|
||||
+
|
||||
+ if (!read_key_size_capable(hdev)) {
|
||||
+ conn->enc_key_size = HCI_LINK_KEY_SIZE;
|
||||
+ return -EOPNOTSUPP;
|
||||
+ }
|
||||
+
|
||||
+ bt_dev_dbg(hdev, "hcon %p", conn);
|
||||
+
|
||||
+ memset(&cp, 0, sizeof(cp));
|
||||
+ cp.handle = cpu_to_le16(conn->handle);
|
||||
+
|
||||
+ /* If the key enc_size is already known, use it as conn->enc_key_size,
|
||||
+ * otherwise use hdev->min_enc_key_size so the likes of
|
||||
+ * l2cap_check_enc_key_size don't fail while waiting for
|
||||
+ * HCI_OP_READ_ENC_KEY_SIZE response.
|
||||
+ */
|
||||
+ if (key_enc_size && *key_enc_size)
|
||||
+ conn->enc_key_size = *key_enc_size;
|
||||
+ else
|
||||
+ conn->enc_key_size = hdev->min_enc_key_size;
|
||||
+
|
||||
+ return hci_send_cmd(hdev, HCI_OP_READ_ENC_KEY_SIZE, sizeof(cp), &cp);
|
||||
+}
|
||||
+
|
||||
static void hci_conn_complete_evt(struct hci_dev *hdev, void *data,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
@@ -3157,23 +3196,11 @@ static void hci_conn_complete_evt(struct
|
||||
if (ev->encr_mode == 1 && !test_bit(HCI_CONN_ENCRYPT, &conn->flags) &&
|
||||
ev->link_type == ACL_LINK) {
|
||||
struct link_key *key;
|
||||
- struct hci_cp_read_enc_key_size cp;
|
||||
|
||||
key = hci_find_link_key(hdev, &ev->bdaddr);
|
||||
if (key) {
|
||||
set_bit(HCI_CONN_ENCRYPT, &conn->flags);
|
||||
-
|
||||
- if (!read_key_size_capable(hdev)) {
|
||||
- conn->enc_key_size = HCI_LINK_KEY_SIZE;
|
||||
- } else {
|
||||
- cp.handle = cpu_to_le16(conn->handle);
|
||||
- if (hci_send_cmd(hdev, HCI_OP_READ_ENC_KEY_SIZE,
|
||||
- sizeof(cp), &cp)) {
|
||||
- bt_dev_err(hdev, "sending read key size failed");
|
||||
- conn->enc_key_size = HCI_LINK_KEY_SIZE;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
+ hci_read_enc_key_size(hdev, conn);
|
||||
hci_encrypt_cfm(conn, ev->status);
|
||||
}
|
||||
}
|
||||
@@ -3612,24 +3639,8 @@ static void hci_encrypt_change_evt(struc
|
||||
|
||||
/* Try reading the encryption key size for encrypted ACL links */
|
||||
if (!ev->status && ev->encrypt && conn->type == ACL_LINK) {
|
||||
- struct hci_cp_read_enc_key_size cp;
|
||||
-
|
||||
- /* Only send HCI_Read_Encryption_Key_Size if the
|
||||
- * controller really supports it. If it doesn't, assume
|
||||
- * the default size (16).
|
||||
- */
|
||||
- if (!read_key_size_capable(hdev)) {
|
||||
- conn->enc_key_size = HCI_LINK_KEY_SIZE;
|
||||
+ if (hci_read_enc_key_size(hdev, conn))
|
||||
goto notify;
|
||||
- }
|
||||
-
|
||||
- cp.handle = cpu_to_le16(conn->handle);
|
||||
- if (hci_send_cmd(hdev, HCI_OP_READ_ENC_KEY_SIZE,
|
||||
- sizeof(cp), &cp)) {
|
||||
- bt_dev_err(hdev, "sending read key size failed");
|
||||
- conn->enc_key_size = HCI_LINK_KEY_SIZE;
|
||||
- goto notify;
|
||||
- }
|
||||
|
||||
goto unlock;
|
||||
}
|
471
debian/patches/patchset-zen/fixes/0002-x86-cpu-Help-users-notice-when-running-old-Intel-mic.patch
vendored
Normal file
471
debian/patches/patchset-zen/fixes/0002-x86-cpu-Help-users-notice-when-running-old-Intel-mic.patch
vendored
Normal file
@@ -0,0 +1,471 @@
|
||||
From a66b7c34e1f618194d288d1b1982af805d5be57f Mon Sep 17 00:00:00 2001
|
||||
From: Dave Hansen <dave.hansen@linux.intel.com>
|
||||
Date: Tue, 22 Apr 2025 08:32:47 +0200
|
||||
Subject: x86/cpu: Help users notice when running old Intel microcode
|
||||
|
||||
Old microcode is bad for users and for kernel developers.
|
||||
|
||||
For users, it exposes them to known fixed security and/or functional
|
||||
issues. These obviously rarely result in instant dumpster fires in
|
||||
every environment. But it is as important to keep your microcode up
|
||||
to date as it is to keep your kernel up to date.
|
||||
|
||||
Old microcode also makes kernels harder to debug. A developer looking
|
||||
at an oops need to consider kernel bugs, known CPU issues and unknown
|
||||
CPU issues as possible causes. If they know the microcode is up to
|
||||
date, they can mostly eliminate known CPU issues as the cause.
|
||||
|
||||
Make it easier to tell if CPU microcode is out of date. Add a list
|
||||
of released microcode. If the loaded microcode is older than the
|
||||
release, tell users in a place that folks can find it:
|
||||
|
||||
/sys/devices/system/cpu/vulnerabilities/old_microcode
|
||||
|
||||
Tell kernel kernel developers about it with the existing taint
|
||||
flag:
|
||||
|
||||
TAINT_CPU_OUT_OF_SPEC
|
||||
|
||||
== Discussion ==
|
||||
|
||||
When a user reports a potential kernel issue, it is very common
|
||||
to ask them to reproduce the issue on mainline. Running mainline,
|
||||
they will (independently from the distro) acquire a more up-to-date
|
||||
microcode version list. If their microcode is old, they will
|
||||
get a warning about the taint and kernel developers can take that
|
||||
into consideration when debugging.
|
||||
|
||||
Just like any other entry in "vulnerabilities/", users are free to
|
||||
make their own assessment of their exposure.
|
||||
|
||||
== Microcode Revision Discussion ==
|
||||
|
||||
The microcode versions in the table were generated from the Intel
|
||||
microcode git repo:
|
||||
|
||||
8ac9378a8487 ("microcode-20241112 Release")
|
||||
|
||||
which as of this writing lags behind the latest microcode-20250211.
|
||||
|
||||
It can be argued that the versions that the kernel picks to call "old"
|
||||
should be a revision or two old. Which specific version is picked is
|
||||
less important to me than picking *a* version and enforcing it.
|
||||
|
||||
This repository contains only microcode versions that Intel has deemed
|
||||
to be OS-loadable. It is quite possible that the BIOS has loaded a
|
||||
newer microcode than the latest in this repo. If this happens, the
|
||||
system is considered to have new microcode, not old.
|
||||
|
||||
Specifically, the sysfs file and taint flag answer the question:
|
||||
|
||||
Is the CPU running on the latest OS-loadable microcode,
|
||||
or something even later that the BIOS loaded?
|
||||
|
||||
In other words, Intel never publishes an authoritative list of CPUs
|
||||
and latest microcode revisions. Until it does, this is the best that
|
||||
Linux can do.
|
||||
|
||||
Also note that the "intel-ucode-defs.h" file is simple, ugly and
|
||||
has lots of magic numbers. That's on purpose and should allow a
|
||||
single file to be shared across lots of stable kernel regardless of if
|
||||
they have the new "VFM" infrastructure or not. It was generated with
|
||||
a dumb script.
|
||||
|
||||
== FAQ ==
|
||||
|
||||
Q: Does this tell me if my system is secure or insecure?
|
||||
A: No. It only tells you if your microcode was old when the
|
||||
system booted.
|
||||
|
||||
Q: Should the kernel warn if the microcode list itself is too old?
|
||||
A: No. New kernels will get new microcode lists, both mainline
|
||||
and stable. The only way to have an old list is to be running
|
||||
an old kernel in which case you have bigger problems.
|
||||
|
||||
Q: Is this for security or functional issues?
|
||||
A: Both.
|
||||
|
||||
Q: If a given microcode update only has functional problems but
|
||||
no security issues, will it be considered old?
|
||||
A: Yes. All microcode image versions within a microcode release
|
||||
are treated identically. Intel appears to make security
|
||||
updates without disclosing them in the release notes. Thus,
|
||||
all updates are considered to be security-relevant.
|
||||
|
||||
Q: Who runs old microcode?
|
||||
A: Anybody with an old distro. This happens all the time inside
|
||||
of Intel where there are lots of weird systems in labs that
|
||||
might not be getting regular distro updates and might also
|
||||
be running rather exotic microcode images.
|
||||
|
||||
Q: If I update my microcode after booting will it stop saying
|
||||
"Vulnerable"?
|
||||
A: No. Just like all the other vulnerabilies, you need to
|
||||
reboot before the kernel will reassess your vulnerability.
|
||||
|
||||
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
|
||||
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
||||
Cc: "Ahmed S. Darwish" <darwi@linutronix.de>
|
||||
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||
Cc: Andy Lutomirski <luto@kernel.org>
|
||||
Cc: Brian Gerst <brgerst@gmail.com>
|
||||
Cc: John Ogness <john.ogness@linutronix.de>
|
||||
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
Cc: Juergen Gross <jgross@suse.com>
|
||||
Cc: H. Peter Anvin <hpa@zytor.com>
|
||||
Cc: Kees Cook <keescook@chromium.org>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Link: https://lore.kernel.org/all/20250421195659.CF426C07%40davehans-spike.ostc.intel.com
|
||||
---
|
||||
.../ABI/testing/sysfs-devices-system-cpu | 1 +
|
||||
Documentation/admin-guide/hw-vuln/index.rst | 1 +
|
||||
.../admin-guide/hw-vuln/old_microcode.rst | 21 +++
|
||||
arch/x86/include/asm/cpufeatures.h | 6 +-
|
||||
arch/x86/kernel/cpu/bugs.c | 16 ++
|
||||
arch/x86/kernel/cpu/common.c | 42 +++++
|
||||
.../kernel/cpu/microcode/intel-ucode-defs.h | 150 ++++++++++++++++++
|
||||
drivers/base/cpu.c | 3 +
|
||||
include/linux/cpu.h | 2 +
|
||||
9 files changed, 240 insertions(+), 2 deletions(-)
|
||||
create mode 100644 Documentation/admin-guide/hw-vuln/old_microcode.rst
|
||||
create mode 100644 arch/x86/kernel/cpu/microcode/intel-ucode-defs.h
|
||||
|
||||
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
|
||||
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
|
||||
@@ -517,6 +517,7 @@ What: /sys/devices/system/cpu/vulnerabi
|
||||
/sys/devices/system/cpu/vulnerabilities/mds
|
||||
/sys/devices/system/cpu/vulnerabilities/meltdown
|
||||
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
|
||||
+ /sys/devices/system/cpu/vulnerabilities/old_microcode
|
||||
/sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling
|
||||
/sys/devices/system/cpu/vulnerabilities/retbleed
|
||||
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
|
||||
--- a/Documentation/admin-guide/hw-vuln/index.rst
|
||||
+++ b/Documentation/admin-guide/hw-vuln/index.rst
|
||||
@@ -23,4 +23,5 @@ are configurable at compile, boot or run
|
||||
gather_data_sampling
|
||||
reg-file-data-sampling
|
||||
rsb
|
||||
+ old_microcode
|
||||
indirect-target-selection
|
||||
--- /dev/null
|
||||
+++ b/Documentation/admin-guide/hw-vuln/old_microcode.rst
|
||||
@@ -0,0 +1,21 @@
|
||||
+.. SPDX-License-Identifier: GPL-2.0
|
||||
+
|
||||
+=============
|
||||
+Old Microcode
|
||||
+=============
|
||||
+
|
||||
+The kernel keeps a table of released microcode. Systems that had
|
||||
+microcode older than this at boot will say "Vulnerable". This means
|
||||
+that the system was vulnerable to some known CPU issue. It could be
|
||||
+security or functional, the kernel does not know or care.
|
||||
+
|
||||
+You should update the CPU microcode to mitigate any exposure. This is
|
||||
+usually accomplished by updating the files in
|
||||
+/lib/firmware/intel-ucode/ via normal distribution updates. Intel also
|
||||
+distributes these files in a github repo:
|
||||
+
|
||||
+ https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git
|
||||
+
|
||||
+Just like all the other hardware vulnerabilities, exposure is
|
||||
+determined at boot. Runtime microcode updates do not change the status
|
||||
+of this vulnerability.
|
||||
--- a/arch/x86/include/asm/cpufeatures.h
|
||||
+++ b/arch/x86/include/asm/cpufeatures.h
|
||||
@@ -534,6 +534,8 @@
|
||||
#define X86_BUG_BHI X86_BUG(1*32 + 3) /* "bhi" CPU is affected by Branch History Injection */
|
||||
#define X86_BUG_IBPB_NO_RET X86_BUG(1*32 + 4) /* "ibpb_no_ret" IBPB omits return target predictions */
|
||||
#define X86_BUG_SPECTRE_V2_USER X86_BUG(1*32 + 5) /* "spectre_v2_user" CPU is affected by Spectre variant 2 attack between user processes */
|
||||
-#define X86_BUG_ITS X86_BUG(1*32 + 6) /* "its" CPU is affected by Indirect Target Selection */
|
||||
-#define X86_BUG_ITS_NATIVE_ONLY X86_BUG(1*32 + 7) /* "its_native_only" CPU is affected by ITS, VMX is not affected */
|
||||
+#define X86_BUG_OLD_MICROCODE X86_BUG(1*32 + 6) /* "old_microcode" CPU has old microcode, it is surely vulnerable to something */
|
||||
+#define X86_BUG_ITS X86_BUG(1*32 + 7) /* "its" CPU is affected by Indirect Target Selection */
|
||||
+#define X86_BUG_ITS_NATIVE_ONLY X86_BUG(1*32 + 8) /* "its_native_only" CPU is affected by ITS, VMX is not affected */
|
||||
+
|
||||
#endif /* _ASM_X86_CPUFEATURES_H */
|
||||
--- a/arch/x86/kernel/cpu/bugs.c
|
||||
+++ b/arch/x86/kernel/cpu/bugs.c
|
||||
@@ -2954,6 +2954,14 @@ static ssize_t its_show_state(char *buf)
|
||||
return sysfs_emit(buf, "%s\n", its_strings[its_mitigation]);
|
||||
}
|
||||
|
||||
+static ssize_t old_microcode_show_state(char *buf)
|
||||
+{
|
||||
+ if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
|
||||
+ return sysfs_emit(buf, "Unknown: running under hypervisor");
|
||||
+
|
||||
+ return sysfs_emit(buf, "Vulnerable\n");
|
||||
+}
|
||||
+
|
||||
static char *stibp_state(void)
|
||||
{
|
||||
if (spectre_v2_in_eibrs_mode(spectre_v2_enabled) &&
|
||||
@@ -3136,6 +3144,9 @@ static ssize_t cpu_show_common(struct de
|
||||
case X86_BUG_RFDS:
|
||||
return rfds_show_state(buf);
|
||||
|
||||
+ case X86_BUG_OLD_MICROCODE:
|
||||
+ return old_microcode_show_state(buf);
|
||||
+
|
||||
case X86_BUG_ITS:
|
||||
return its_show_state(buf);
|
||||
|
||||
@@ -3219,6 +3230,11 @@ ssize_t cpu_show_reg_file_data_sampling(
|
||||
return cpu_show_common(dev, attr, buf, X86_BUG_RFDS);
|
||||
}
|
||||
|
||||
+ssize_t cpu_show_old_microcode(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ return cpu_show_common(dev, attr, buf, X86_BUG_OLD_MICROCODE);
|
||||
+}
|
||||
+
|
||||
ssize_t cpu_show_indirect_target_selection(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return cpu_show_common(dev, attr, buf, X86_BUG_ITS);
|
||||
--- a/arch/x86/kernel/cpu/common.c
|
||||
+++ b/arch/x86/kernel/cpu/common.c
|
||||
@@ -1351,10 +1351,52 @@ static bool __init vulnerable_to_its(u64
|
||||
return false;
|
||||
}
|
||||
|
||||
+static struct x86_cpu_id cpu_latest_microcode[] = {
|
||||
+#include "microcode/intel-ucode-defs.h"
|
||||
+ {}
|
||||
+};
|
||||
+
|
||||
+static bool __init cpu_has_old_microcode(void)
|
||||
+{
|
||||
+ const struct x86_cpu_id *m = x86_match_cpu(cpu_latest_microcode);
|
||||
+
|
||||
+ /* Give unknown CPUs a pass: */
|
||||
+ if (!m) {
|
||||
+ /* Intel CPUs should be in the list. Warn if not: */
|
||||
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
|
||||
+ pr_info("x86/CPU: Model not found in latest microcode list\n");
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Hosts usually lie to guests with a super high microcode
|
||||
+ * version. Just ignore what hosts tell guests:
|
||||
+ */
|
||||
+ if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
|
||||
+ return false;
|
||||
+
|
||||
+ /* Consider all debug microcode to be old: */
|
||||
+ if (boot_cpu_data.microcode & BIT(31))
|
||||
+ return true;
|
||||
+
|
||||
+ /* Give new microcode a pass: */
|
||||
+ if (boot_cpu_data.microcode >= m->driver_data)
|
||||
+ return false;
|
||||
+
|
||||
+ /* Uh oh, too old: */
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)
|
||||
{
|
||||
u64 x86_arch_cap_msr = x86_read_arch_cap_msr();
|
||||
|
||||
+ if (cpu_has_old_microcode()) {
|
||||
+ pr_warn("x86/CPU: Running old microcode\n");
|
||||
+ setup_force_cpu_bug(X86_BUG_OLD_MICROCODE);
|
||||
+ add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
|
||||
+ }
|
||||
+
|
||||
/* Set ITLB_MULTIHIT bug if cpu is not in the whitelist and not mitigated */
|
||||
if (!cpu_matches(cpu_vuln_whitelist, NO_ITLB_MULTIHIT) &&
|
||||
!(x86_arch_cap_msr & ARCH_CAP_PSCHANGE_MC_NO))
|
||||
--- /dev/null
|
||||
+++ b/arch/x86/kernel/cpu/microcode/intel-ucode-defs.h
|
||||
@@ -0,0 +1,150 @@
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x03, .steppings = 0x0004, .driver_data = 0x2 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x05, .steppings = 0x0001, .driver_data = 0x45 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x05, .steppings = 0x0002, .driver_data = 0x40 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x05, .steppings = 0x0004, .driver_data = 0x2c },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x05, .steppings = 0x0008, .driver_data = 0x10 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x06, .steppings = 0x0001, .driver_data = 0xa },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x06, .steppings = 0x0020, .driver_data = 0x3 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x06, .steppings = 0x0400, .driver_data = 0xd },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x06, .steppings = 0x2000, .driver_data = 0x7 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x07, .steppings = 0x0002, .driver_data = 0x14 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x07, .steppings = 0x0004, .driver_data = 0x38 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x07, .steppings = 0x0008, .driver_data = 0x2e },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x08, .steppings = 0x0002, .driver_data = 0x11 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x08, .steppings = 0x0008, .driver_data = 0x8 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x08, .steppings = 0x0040, .driver_data = 0xc },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x08, .steppings = 0x0400, .driver_data = 0x5 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x09, .steppings = 0x0020, .driver_data = 0x47 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0a, .steppings = 0x0001, .driver_data = 0x3 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0a, .steppings = 0x0002, .driver_data = 0x1 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0b, .steppings = 0x0002, .driver_data = 0x1d },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0b, .steppings = 0x0010, .driver_data = 0x2 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0d, .steppings = 0x0040, .driver_data = 0x18 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0e, .steppings = 0x0100, .driver_data = 0x39 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0e, .steppings = 0x1000, .driver_data = 0x59 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0f, .steppings = 0x0004, .driver_data = 0x5d },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0f, .steppings = 0x0040, .driver_data = 0xd2 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0f, .steppings = 0x0080, .driver_data = 0x6b },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0f, .steppings = 0x0400, .driver_data = 0x95 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0f, .steppings = 0x0800, .driver_data = 0xbc },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x0f, .steppings = 0x2000, .driver_data = 0xa4 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x16, .steppings = 0x0002, .driver_data = 0x44 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x17, .steppings = 0x0040, .driver_data = 0x60f },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x17, .steppings = 0x0080, .driver_data = 0x70a },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x17, .steppings = 0x0400, .driver_data = 0xa0b },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x1a, .steppings = 0x0010, .driver_data = 0x12 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x1a, .steppings = 0x0020, .driver_data = 0x1d },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x1c, .steppings = 0x0004, .driver_data = 0x219 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x1c, .steppings = 0x0400, .driver_data = 0x107 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x1d, .steppings = 0x0002, .driver_data = 0x29 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x1e, .steppings = 0x0020, .driver_data = 0xa },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x25, .steppings = 0x0004, .driver_data = 0x11 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x25, .steppings = 0x0020, .driver_data = 0x7 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x26, .steppings = 0x0002, .driver_data = 0x105 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x2a, .steppings = 0x0080, .driver_data = 0x2f },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x2c, .steppings = 0x0004, .driver_data = 0x1f },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x2d, .steppings = 0x0040, .driver_data = 0x621 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x2d, .steppings = 0x0080, .driver_data = 0x71a },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x2e, .steppings = 0x0040, .driver_data = 0xd },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x2f, .steppings = 0x0004, .driver_data = 0x3b },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x37, .steppings = 0x0100, .driver_data = 0x838 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x37, .steppings = 0x0200, .driver_data = 0x90d },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x3a, .steppings = 0x0200, .driver_data = 0x21 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x3c, .steppings = 0x0008, .driver_data = 0x28 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x3d, .steppings = 0x0010, .driver_data = 0x2f },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x3e, .steppings = 0x0010, .driver_data = 0x42e },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x3e, .steppings = 0x0040, .driver_data = 0x600 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x3e, .steppings = 0x0080, .driver_data = 0x715 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x3f, .steppings = 0x0004, .driver_data = 0x49 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x3f, .steppings = 0x0010, .driver_data = 0x1a },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x45, .steppings = 0x0002, .driver_data = 0x26 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x46, .steppings = 0x0002, .driver_data = 0x1c },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x47, .steppings = 0x0002, .driver_data = 0x22 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x4c, .steppings = 0x0008, .driver_data = 0x368 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x4c, .steppings = 0x0010, .driver_data = 0x411 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x4d, .steppings = 0x0100, .driver_data = 0x12d },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x4e, .steppings = 0x0008, .driver_data = 0xf0 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x55, .steppings = 0x0008, .driver_data = 0x1000191 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x55, .steppings = 0x0010, .driver_data = 0x2007006 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x55, .steppings = 0x0020, .driver_data = 0x3000010 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x55, .steppings = 0x0040, .driver_data = 0x4003605 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x55, .steppings = 0x0080, .driver_data = 0x5003707 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x55, .steppings = 0x0800, .driver_data = 0x7002904 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x56, .steppings = 0x0004, .driver_data = 0x1c },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x56, .steppings = 0x0008, .driver_data = 0x700001c },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x56, .steppings = 0x0010, .driver_data = 0xf00001a },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x56, .steppings = 0x0020, .driver_data = 0xe000015 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x5c, .steppings = 0x0004, .driver_data = 0x14 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x5c, .steppings = 0x0200, .driver_data = 0x48 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x5c, .steppings = 0x0400, .driver_data = 0x28 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x5e, .steppings = 0x0008, .driver_data = 0xf0 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x5f, .steppings = 0x0002, .driver_data = 0x3e },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x66, .steppings = 0x0008, .driver_data = 0x2a },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x6a, .steppings = 0x0020, .driver_data = 0xc0002f0 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x6a, .steppings = 0x0040, .driver_data = 0xd0003e7 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x6c, .steppings = 0x0002, .driver_data = 0x10002b0 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x7a, .steppings = 0x0002, .driver_data = 0x42 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x7a, .steppings = 0x0100, .driver_data = 0x24 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x7e, .steppings = 0x0020, .driver_data = 0xc6 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8a, .steppings = 0x0002, .driver_data = 0x33 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8c, .steppings = 0x0002, .driver_data = 0xb8 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8c, .steppings = 0x0004, .driver_data = 0x38 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8d, .steppings = 0x0002, .driver_data = 0x52 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8e, .steppings = 0x0200, .driver_data = 0xf6 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8e, .steppings = 0x0400, .driver_data = 0xf6 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8e, .steppings = 0x0800, .driver_data = 0xf6 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8e, .steppings = 0x1000, .driver_data = 0xfc },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8f, .steppings = 0x0100, .driver_data = 0x2c000390 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8f, .steppings = 0x0080, .driver_data = 0x2b000603 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8f, .steppings = 0x0040, .driver_data = 0x2c000390 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8f, .steppings = 0x0020, .driver_data = 0x2c000390 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x8f, .steppings = 0x0010, .driver_data = 0x2c000390 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x96, .steppings = 0x0002, .driver_data = 0x1a },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x97, .steppings = 0x0004, .driver_data = 0x37 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x97, .steppings = 0x0020, .driver_data = 0x37 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xbf, .steppings = 0x0004, .driver_data = 0x37 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xbf, .steppings = 0x0020, .driver_data = 0x37 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x9a, .steppings = 0x0008, .driver_data = 0x435 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x9a, .steppings = 0x0010, .driver_data = 0x435 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x9c, .steppings = 0x0001, .driver_data = 0x24000026 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x9e, .steppings = 0x0200, .driver_data = 0xf8 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x9e, .steppings = 0x0400, .driver_data = 0xf8 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x9e, .steppings = 0x0800, .driver_data = 0xf6 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x9e, .steppings = 0x1000, .driver_data = 0xf8 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0x9e, .steppings = 0x2000, .driver_data = 0x100 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xa5, .steppings = 0x0004, .driver_data = 0xfc },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xa5, .steppings = 0x0008, .driver_data = 0xfc },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xa5, .steppings = 0x0020, .driver_data = 0xfc },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xa6, .steppings = 0x0001, .driver_data = 0xfe },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xa6, .steppings = 0x0002, .driver_data = 0xfc },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xa7, .steppings = 0x0002, .driver_data = 0x62 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xaa, .steppings = 0x0010, .driver_data = 0x20 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xb7, .steppings = 0x0002, .driver_data = 0x12b },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xba, .steppings = 0x0004, .driver_data = 0x4123 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xba, .steppings = 0x0008, .driver_data = 0x4123 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xba, .steppings = 0x0100, .driver_data = 0x4123 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xbe, .steppings = 0x0001, .driver_data = 0x1a },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xcf, .steppings = 0x0004, .driver_data = 0x21000283 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0x6, .model = 0xcf, .steppings = 0x0002, .driver_data = 0x21000283 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x00, .steppings = 0x0080, .driver_data = 0x12 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x00, .steppings = 0x0400, .driver_data = 0x15 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x01, .steppings = 0x0004, .driver_data = 0x2e },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x02, .steppings = 0x0010, .driver_data = 0x21 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x02, .steppings = 0x0020, .driver_data = 0x2c },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x02, .steppings = 0x0040, .driver_data = 0x10 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x02, .steppings = 0x0080, .driver_data = 0x39 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x02, .steppings = 0x0200, .driver_data = 0x2f },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x03, .steppings = 0x0004, .driver_data = 0xa },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x03, .steppings = 0x0008, .driver_data = 0xc },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x03, .steppings = 0x0010, .driver_data = 0x17 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x04, .steppings = 0x0002, .driver_data = 0x17 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x04, .steppings = 0x0008, .driver_data = 0x5 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x04, .steppings = 0x0010, .driver_data = 0x6 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x04, .steppings = 0x0080, .driver_data = 0x3 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x04, .steppings = 0x0100, .driver_data = 0xe },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x04, .steppings = 0x0200, .driver_data = 0x3 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x04, .steppings = 0x0400, .driver_data = 0x4 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x06, .steppings = 0x0004, .driver_data = 0xf },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x06, .steppings = 0x0010, .driver_data = 0x4 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x06, .steppings = 0x0020, .driver_data = 0x8 },
|
||||
+{ .flags = X86_CPU_ID_FLAG_ENTRY_VALID, .vendor = X86_VENDOR_INTEL, .family = 0xf, .model = 0x06, .steppings = 0x0100, .driver_data = 0x9 },
|
||||
--- a/drivers/base/cpu.c
|
||||
+++ b/drivers/base/cpu.c
|
||||
@@ -600,6 +600,7 @@ CPU_SHOW_VULN_FALLBACK(spec_rstack_overf
|
||||
CPU_SHOW_VULN_FALLBACK(gds);
|
||||
CPU_SHOW_VULN_FALLBACK(reg_file_data_sampling);
|
||||
CPU_SHOW_VULN_FALLBACK(ghostwrite);
|
||||
+CPU_SHOW_VULN_FALLBACK(old_microcode);
|
||||
CPU_SHOW_VULN_FALLBACK(indirect_target_selection);
|
||||
|
||||
static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL);
|
||||
@@ -617,6 +618,7 @@ static DEVICE_ATTR(spec_rstack_overflow,
|
||||
static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL);
|
||||
static DEVICE_ATTR(reg_file_data_sampling, 0444, cpu_show_reg_file_data_sampling, NULL);
|
||||
static DEVICE_ATTR(ghostwrite, 0444, cpu_show_ghostwrite, NULL);
|
||||
+static DEVICE_ATTR(old_microcode, 0444, cpu_show_old_microcode, NULL);
|
||||
static DEVICE_ATTR(indirect_target_selection, 0444, cpu_show_indirect_target_selection, NULL);
|
||||
|
||||
static struct attribute *cpu_root_vulnerabilities_attrs[] = {
|
||||
@@ -635,6 +637,7 @@ static struct attribute *cpu_root_vulner
|
||||
&dev_attr_gather_data_sampling.attr,
|
||||
&dev_attr_reg_file_data_sampling.attr,
|
||||
&dev_attr_ghostwrite.attr,
|
||||
+ &dev_attr_old_microcode.attr,
|
||||
&dev_attr_indirect_target_selection.attr,
|
||||
NULL
|
||||
};
|
||||
--- a/include/linux/cpu.h
|
||||
+++ b/include/linux/cpu.h
|
||||
@@ -78,6 +78,8 @@ extern ssize_t cpu_show_gds(struct devic
|
||||
extern ssize_t cpu_show_reg_file_data_sampling(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
extern ssize_t cpu_show_ghostwrite(struct device *dev, struct device_attribute *attr, char *buf);
|
||||
+extern ssize_t cpu_show_old_microcode(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf);
|
||||
extern ssize_t cpu_show_indirect_target_selection(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
|
@@ -1,398 +0,0 @@
|
||||
From 4ad0ae3b81cd90c0729df9ac5f1ff21f4dad6130 Mon Sep 17 00:00:00 2001
|
||||
From: Oleksandr Natalenko <oleksandr@natalenko.name>
|
||||
Date: Mon, 30 Sep 2024 08:58:38 +0200
|
||||
Subject: mm: expose per-process KSM control via syscalls
|
||||
|
||||
d7597f59d1d3 added a new API to enable per-process KSM control. It
|
||||
however uses prctl, which doesn't allow controlling KSM from outside of
|
||||
the current process.
|
||||
|
||||
Hence, expose this API via 3 syscalls: process_ksm_enable,
|
||||
process_ksm_disable and process_ksm_status. Given sufficient privileges,
|
||||
auto-KSM can be enable by another process.
|
||||
|
||||
Since these syscalls are not in the upstream kernel, also expose their
|
||||
numbers under /sys/kernel/process_ksm so that userspace tooling like
|
||||
uksmd knows how to use them.
|
||||
|
||||
Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
|
||||
---
|
||||
arch/alpha/kernel/syscalls/syscall.tbl | 3 +
|
||||
arch/arm/tools/syscall.tbl | 3 +
|
||||
arch/m68k/kernel/syscalls/syscall.tbl | 3 +
|
||||
arch/microblaze/kernel/syscalls/syscall.tbl | 3 +
|
||||
arch/mips/kernel/syscalls/syscall_n32.tbl | 3 +
|
||||
arch/mips/kernel/syscalls/syscall_n64.tbl | 3 +
|
||||
arch/mips/kernel/syscalls/syscall_o32.tbl | 3 +
|
||||
arch/parisc/kernel/syscalls/syscall.tbl | 3 +
|
||||
arch/powerpc/kernel/syscalls/syscall.tbl | 3 +
|
||||
arch/s390/kernel/syscalls/syscall.tbl | 3 +
|
||||
arch/sh/kernel/syscalls/syscall.tbl | 3 +
|
||||
arch/sparc/kernel/syscalls/syscall.tbl | 3 +
|
||||
arch/x86/entry/syscalls/syscall_32.tbl | 3 +
|
||||
arch/x86/entry/syscalls/syscall_64.tbl | 3 +
|
||||
arch/xtensa/kernel/syscalls/syscall.tbl | 3 +
|
||||
include/linux/syscalls.h | 3 +
|
||||
include/uapi/asm-generic/unistd.h | 9 +-
|
||||
kernel/sys.c | 138 ++++++++++++++++++
|
||||
kernel/sys_ni.c | 3 +
|
||||
scripts/syscall.tbl | 3 +
|
||||
.../arch/powerpc/entry/syscalls/syscall.tbl | 3 +
|
||||
.../perf/arch/s390/entry/syscalls/syscall.tbl | 3 +
|
||||
22 files changed, 206 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/alpha/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/alpha/kernel/syscalls/syscall.tbl
|
||||
@@ -506,3 +506,6 @@
|
||||
574 common getxattrat sys_getxattrat
|
||||
575 common listxattrat sys_listxattrat
|
||||
576 common removexattrat sys_removexattrat
|
||||
+577 common process_ksm_enable sys_process_ksm_enable
|
||||
+578 common process_ksm_disable sys_process_ksm_disable
|
||||
+579 common process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/arm/tools/syscall.tbl
|
||||
+++ b/arch/arm/tools/syscall.tbl
|
||||
@@ -481,3 +481,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/m68k/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/m68k/kernel/syscalls/syscall.tbl
|
||||
@@ -466,3 +466,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/microblaze/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/microblaze/kernel/syscalls/syscall.tbl
|
||||
@@ -472,3 +472,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/mips/kernel/syscalls/syscall_n32.tbl
|
||||
+++ b/arch/mips/kernel/syscalls/syscall_n32.tbl
|
||||
@@ -405,3 +405,6 @@
|
||||
464 n32 getxattrat sys_getxattrat
|
||||
465 n32 listxattrat sys_listxattrat
|
||||
466 n32 removexattrat sys_removexattrat
|
||||
+467 n32 process_ksm_enable sys_process_ksm_enable
|
||||
+468 n32 process_ksm_disable sys_process_ksm_disable
|
||||
+469 n32 process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/mips/kernel/syscalls/syscall_n64.tbl
|
||||
+++ b/arch/mips/kernel/syscalls/syscall_n64.tbl
|
||||
@@ -381,3 +381,6 @@
|
||||
464 n64 getxattrat sys_getxattrat
|
||||
465 n64 listxattrat sys_listxattrat
|
||||
466 n64 removexattrat sys_removexattrat
|
||||
+467 n64 process_ksm_enable sys_process_ksm_enable
|
||||
+468 n64 process_ksm_disable sys_process_ksm_disable
|
||||
+469 n64 process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/mips/kernel/syscalls/syscall_o32.tbl
|
||||
+++ b/arch/mips/kernel/syscalls/syscall_o32.tbl
|
||||
@@ -454,3 +454,6 @@
|
||||
464 o32 getxattrat sys_getxattrat
|
||||
465 o32 listxattrat sys_listxattrat
|
||||
466 o32 removexattrat sys_removexattrat
|
||||
+467 o32 process_ksm_enable sys_process_ksm_enable
|
||||
+468 o32 process_ksm_disable sys_process_ksm_disable
|
||||
+469 o32 process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/parisc/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
|
||||
@@ -465,3 +465,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/powerpc/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/powerpc/kernel/syscalls/syscall.tbl
|
||||
@@ -557,3 +557,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/s390/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/s390/kernel/syscalls/syscall.tbl
|
||||
@@ -469,3 +469,6 @@
|
||||
464 common getxattrat sys_getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/sh/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/sh/kernel/syscalls/syscall.tbl
|
||||
@@ -470,3 +470,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/sparc/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/sparc/kernel/syscalls/syscall.tbl
|
||||
@@ -512,3 +512,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/x86/entry/syscalls/syscall_32.tbl
|
||||
+++ b/arch/x86/entry/syscalls/syscall_32.tbl
|
||||
@@ -472,3 +472,6 @@
|
||||
464 i386 getxattrat sys_getxattrat
|
||||
465 i386 listxattrat sys_listxattrat
|
||||
466 i386 removexattrat sys_removexattrat
|
||||
+467 i386 process_ksm_enable sys_process_ksm_enable
|
||||
+468 i386 process_ksm_disable sys_process_ksm_disable
|
||||
+469 i386 process_ksm_status sys_process_ksm_status
|
||||
--- a/arch/x86/entry/syscalls/syscall_64.tbl
|
||||
+++ b/arch/x86/entry/syscalls/syscall_64.tbl
|
||||
@@ -390,6 +390,9 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
|
||||
#
|
||||
# Due to a historical design error, certain syscalls are numbered differently
|
||||
--- a/arch/xtensa/kernel/syscalls/syscall.tbl
|
||||
+++ b/arch/xtensa/kernel/syscalls/syscall.tbl
|
||||
@@ -437,3 +437,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/include/linux/syscalls.h
|
||||
+++ b/include/linux/syscalls.h
|
||||
@@ -831,6 +831,9 @@ asmlinkage long sys_madvise(unsigned lon
|
||||
asmlinkage long sys_process_madvise(int pidfd, const struct iovec __user *vec,
|
||||
size_t vlen, int behavior, unsigned int flags);
|
||||
asmlinkage long sys_process_mrelease(int pidfd, unsigned int flags);
|
||||
+asmlinkage long sys_process_ksm_enable(int pidfd, unsigned int flags);
|
||||
+asmlinkage long sys_process_ksm_disable(int pidfd, unsigned int flags);
|
||||
+asmlinkage long sys_process_ksm_status(int pidfd, unsigned int flags);
|
||||
asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
|
||||
unsigned long prot, unsigned long pgoff,
|
||||
unsigned long flags);
|
||||
--- a/include/uapi/asm-generic/unistd.h
|
||||
+++ b/include/uapi/asm-generic/unistd.h
|
||||
@@ -850,8 +850,15 @@ __SYSCALL(__NR_listxattrat, sys_listxatt
|
||||
#define __NR_removexattrat 466
|
||||
__SYSCALL(__NR_removexattrat, sys_removexattrat)
|
||||
|
||||
+#define __NR_process_ksm_enable 467
|
||||
+__SYSCALL(__NR_process_ksm_enable, sys_process_ksm_enable)
|
||||
+#define __NR_process_ksm_disable 468
|
||||
+__SYSCALL(__NR_process_ksm_disable, sys_process_ksm_disable)
|
||||
+#define __NR_process_ksm_status 469
|
||||
+__SYSCALL(__NR_process_ksm_status, sys_process_ksm_status)
|
||||
+
|
||||
#undef __NR_syscalls
|
||||
-#define __NR_syscalls 467
|
||||
+#define __NR_syscalls 470
|
||||
|
||||
/*
|
||||
* 32 bit systems traditionally used different
|
||||
--- a/kernel/sys.c
|
||||
+++ b/kernel/sys.c
|
||||
@@ -2819,6 +2819,144 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
|
||||
return error;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_KSM
|
||||
+enum pkc_action {
|
||||
+ PKSM_ENABLE = 0,
|
||||
+ PKSM_DISABLE,
|
||||
+ PKSM_STATUS,
|
||||
+};
|
||||
+
|
||||
+static long do_process_ksm_control(int pidfd, enum pkc_action action)
|
||||
+{
|
||||
+ long ret;
|
||||
+ struct task_struct *task;
|
||||
+ struct mm_struct *mm;
|
||||
+ unsigned int f_flags;
|
||||
+
|
||||
+ task = pidfd_get_task(pidfd, &f_flags);
|
||||
+ if (IS_ERR(task)) {
|
||||
+ ret = PTR_ERR(task);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* Require PTRACE_MODE_READ to avoid leaking ASLR metadata. */
|
||||
+ mm = mm_access(task, PTRACE_MODE_READ_FSCREDS);
|
||||
+ if (IS_ERR_OR_NULL(mm)) {
|
||||
+ ret = IS_ERR(mm) ? PTR_ERR(mm) : -ESRCH;
|
||||
+ goto release_task;
|
||||
+ }
|
||||
+
|
||||
+ /* Require CAP_SYS_NICE for influencing process performance. */
|
||||
+ if (!capable(CAP_SYS_NICE)) {
|
||||
+ ret = -EPERM;
|
||||
+ goto release_mm;
|
||||
+ }
|
||||
+
|
||||
+ if (mmap_write_lock_killable(mm)) {
|
||||
+ ret = -EINTR;
|
||||
+ goto release_mm;
|
||||
+ }
|
||||
+
|
||||
+ switch (action) {
|
||||
+ case PKSM_ENABLE:
|
||||
+ ret = ksm_enable_merge_any(mm);
|
||||
+ break;
|
||||
+ case PKSM_DISABLE:
|
||||
+ ret = ksm_disable_merge_any(mm);
|
||||
+ break;
|
||||
+ case PKSM_STATUS:
|
||||
+ ret = !!test_bit(MMF_VM_MERGE_ANY, &mm->flags);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ mmap_write_unlock(mm);
|
||||
+
|
||||
+release_mm:
|
||||
+ mmput(mm);
|
||||
+release_task:
|
||||
+ put_task_struct(task);
|
||||
+out:
|
||||
+ return ret;
|
||||
+}
|
||||
+#endif /* CONFIG_KSM */
|
||||
+
|
||||
+SYSCALL_DEFINE2(process_ksm_enable, int, pidfd, unsigned int, flags)
|
||||
+{
|
||||
+#ifdef CONFIG_KSM
|
||||
+ if (flags != 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return do_process_ksm_control(pidfd, PKSM_ENABLE);
|
||||
+#else /* CONFIG_KSM */
|
||||
+ return -ENOSYS;
|
||||
+#endif /* CONFIG_KSM */
|
||||
+}
|
||||
+
|
||||
+SYSCALL_DEFINE2(process_ksm_disable, int, pidfd, unsigned int, flags)
|
||||
+{
|
||||
+#ifdef CONFIG_KSM
|
||||
+ if (flags != 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return do_process_ksm_control(pidfd, PKSM_DISABLE);
|
||||
+#else /* CONFIG_KSM */
|
||||
+ return -ENOSYS;
|
||||
+#endif /* CONFIG_KSM */
|
||||
+}
|
||||
+
|
||||
+SYSCALL_DEFINE2(process_ksm_status, int, pidfd, unsigned int, flags)
|
||||
+{
|
||||
+#ifdef CONFIG_KSM
|
||||
+ if (flags != 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return do_process_ksm_control(pidfd, PKSM_STATUS);
|
||||
+#else /* CONFIG_KSM */
|
||||
+ return -ENOSYS;
|
||||
+#endif /* CONFIG_KSM */
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_KSM
|
||||
+static ssize_t process_ksm_enable_show(struct kobject *kobj,
|
||||
+ struct kobj_attribute *attr, char *buf)
|
||||
+{
|
||||
+ return sprintf(buf, "%u\n", __NR_process_ksm_enable);
|
||||
+}
|
||||
+static struct kobj_attribute process_ksm_enable_attr = __ATTR_RO(process_ksm_enable);
|
||||
+
|
||||
+static ssize_t process_ksm_disable_show(struct kobject *kobj,
|
||||
+ struct kobj_attribute *attr, char *buf)
|
||||
+{
|
||||
+ return sprintf(buf, "%u\n", __NR_process_ksm_disable);
|
||||
+}
|
||||
+static struct kobj_attribute process_ksm_disable_attr = __ATTR_RO(process_ksm_disable);
|
||||
+
|
||||
+static ssize_t process_ksm_status_show(struct kobject *kobj,
|
||||
+ struct kobj_attribute *attr, char *buf)
|
||||
+{
|
||||
+ return sprintf(buf, "%u\n", __NR_process_ksm_status);
|
||||
+}
|
||||
+static struct kobj_attribute process_ksm_status_attr = __ATTR_RO(process_ksm_status);
|
||||
+
|
||||
+static struct attribute *process_ksm_sysfs_attrs[] = {
|
||||
+ &process_ksm_enable_attr.attr,
|
||||
+ &process_ksm_disable_attr.attr,
|
||||
+ &process_ksm_status_attr.attr,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static const struct attribute_group process_ksm_sysfs_attr_group = {
|
||||
+ .attrs = process_ksm_sysfs_attrs,
|
||||
+ .name = "process_ksm",
|
||||
+};
|
||||
+
|
||||
+static int __init process_ksm_sysfs_init(void)
|
||||
+{
|
||||
+ return sysfs_create_group(kernel_kobj, &process_ksm_sysfs_attr_group);
|
||||
+}
|
||||
+subsys_initcall(process_ksm_sysfs_init);
|
||||
+#endif /* CONFIG_KSM */
|
||||
+
|
||||
SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep,
|
||||
struct getcpu_cache __user *, unused)
|
||||
{
|
||||
--- a/kernel/sys_ni.c
|
||||
+++ b/kernel/sys_ni.c
|
||||
@@ -186,6 +186,9 @@ COND_SYSCALL(mincore);
|
||||
COND_SYSCALL(madvise);
|
||||
COND_SYSCALL(process_madvise);
|
||||
COND_SYSCALL(process_mrelease);
|
||||
+COND_SYSCALL(process_ksm_enable);
|
||||
+COND_SYSCALL(process_ksm_disable);
|
||||
+COND_SYSCALL(process_ksm_status);
|
||||
COND_SYSCALL(remap_file_pages);
|
||||
COND_SYSCALL(mbind);
|
||||
COND_SYSCALL(get_mempolicy);
|
||||
--- a/scripts/syscall.tbl
|
||||
+++ b/scripts/syscall.tbl
|
||||
@@ -407,3 +407,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl
|
||||
+++ b/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl
|
||||
@@ -557,3 +557,6 @@
|
||||
464 common getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status
|
||||
--- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl
|
||||
+++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
|
||||
@@ -469,3 +469,6 @@
|
||||
464 common getxattrat sys_getxattrat sys_getxattrat
|
||||
465 common listxattrat sys_listxattrat sys_listxattrat
|
||||
466 common removexattrat sys_removexattrat sys_removexattrat
|
||||
+467 common process_ksm_enable sys_process_ksm_enable sys_process_ksm_enable
|
||||
+468 common process_ksm_disable sys_process_ksm_disable sys_process_ksm_disable
|
||||
+469 common process_ksm_status sys_process_ksm_status sys_process_ksm_status
|
@@ -1,24 +1,24 @@
|
||||
From 6d141e3121676e9ca50d6465a622b9a5d572219a Mon Sep 17 00:00:00 2001
|
||||
From eceae849a8242fcfeec64470f6f4c24fbae0d614 Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
||||
Date: Mon, 26 Apr 2021 22:12:46 +0200
|
||||
Subject: ZEN: Add VHBA driver
|
||||
|
||||
remote https://github.com/cdemu/cdemu
|
||||
tag vhba-module-20240917
|
||||
tag vhba-module-20250329
|
||||
---
|
||||
drivers/scsi/Kconfig | 2 +
|
||||
drivers/scsi/Makefile | 1 +
|
||||
drivers/scsi/vhba/Kconfig | 9 +
|
||||
drivers/scsi/vhba/Makefile | 4 +
|
||||
drivers/scsi/vhba/vhba.c | 1130 ++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 1146 insertions(+)
|
||||
drivers/scsi/vhba/vhba.c | 1132 ++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 1148 insertions(+)
|
||||
create mode 100644 drivers/scsi/vhba/Kconfig
|
||||
create mode 100644 drivers/scsi/vhba/Makefile
|
||||
create mode 100644 drivers/scsi/vhba/vhba.c
|
||||
|
||||
--- a/drivers/scsi/Kconfig
|
||||
+++ b/drivers/scsi/Kconfig
|
||||
@@ -1522,4 +1522,6 @@ endif # SCSI_LOWLEVEL
|
||||
@@ -1521,4 +1521,6 @@ endif # SCSI_LOWLEVEL
|
||||
|
||||
source "drivers/scsi/device_handler/Kconfig"
|
||||
|
||||
@@ -27,7 +27,7 @@ tag vhba-module-20240917
|
||||
endmenu
|
||||
--- a/drivers/scsi/Makefile
|
||||
+++ b/drivers/scsi/Makefile
|
||||
@@ -153,6 +153,7 @@ obj-$(CONFIG_CHR_DEV_SCH) += ch.o
|
||||
@@ -152,6 +152,7 @@ obj-$(CONFIG_CHR_DEV_SCH) += ch.o
|
||||
obj-$(CONFIG_SCSI_ENCLOSURE) += ses.o
|
||||
|
||||
obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas/
|
||||
@@ -56,7 +56,7 @@ tag vhba-module-20240917
|
||||
+ccflags-y := -DVHBA_VERSION=\"$(VHBA_VERSION)\" -Werror
|
||||
--- /dev/null
|
||||
+++ b/drivers/scsi/vhba/vhba.c
|
||||
@@ -0,0 +1,1130 @@
|
||||
@@ -0,0 +1,1132 @@
|
||||
+/*
|
||||
+ * vhba.c
|
||||
+ *
|
||||
@@ -596,7 +596,9 @@ tag vhba-module-20240917
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
|
||||
+ .slave_alloc = vhba_slave_alloc,
|
||||
+#endif
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)
|
||||
+ .tag_alloc_policy_rr = true,
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
+ .tag_alloc_policy = BLK_TAG_ALLOC_RR,
|
||||
+#endif
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
|
||||
|
@@ -1,28 +0,0 @@
|
||||
From 1f9910c9a54b424ad0cd415b981986937618c4ec Mon Sep 17 00:00:00 2001
|
||||
From: Rok Mandeljc <rok.mandeljc@gmail.com>
|
||||
Date: Mon, 3 Feb 2025 21:05:32 +0100
|
||||
Subject: VHBA: fix building with kernel 6.14-rc1
|
||||
|
||||
Kernel 6.14-rc1 simplified the selection of tag allocation policy.
|
||||
Instead of enum-based value, a boolean is used, and the corresponding
|
||||
field in the `scsi_host_template` structure was renamed from
|
||||
`tag_alloc_policy` to `tag_alloc_policy_rr`.
|
||||
|
||||
See: https://github.com/torvalds/linux/commit/ce32496
|
||||
---
|
||||
drivers/scsi/vhba/vhba.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/scsi/vhba/vhba.c
|
||||
+++ b/drivers/scsi/vhba/vhba.c
|
||||
@@ -537,7 +537,9 @@ static struct scsi_host_template vhba_te
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
|
||||
.slave_alloc = vhba_slave_alloc,
|
||||
#endif
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)
|
||||
+ .tag_alloc_policy_rr = true,
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
|
@@ -1,4 +1,4 @@
|
||||
From 02b4d790bb05e24e7408a147f33e4e9ca0b805fa Mon Sep 17 00:00:00 2001
|
||||
From e0d21c7f4ea5f33bb4a6076d8ff50ad19431e333 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Drake <drake@endlessm.com>
|
||||
Date: Tue, 4 Jun 2019 14:51:21 +0800
|
||||
Subject: ZEN: PCI: Add Intel remapped NVMe device support
|
||||
@@ -135,7 +135,7 @@ Contains:
|
||||
}
|
||||
|
||||
static int ahci_get_irq_vector(struct ata_host *host, int port)
|
||||
@@ -1909,7 +1902,9 @@ static int ahci_init_one(struct pci_dev
|
||||
@@ -1912,7 +1905,9 @@ static int ahci_init_one(struct pci_dev
|
||||
return -ENOMEM;
|
||||
|
||||
/* detect remapped nvme devices */
|
@@ -1,4 +1,4 @@
|
||||
From 17190525fdc9c9f73fe22832ab0631e9e1bbad6d Mon Sep 17 00:00:00 2001
|
||||
From 490a2fd553b92e5ad5f151994a9bbf953cc000f7 Mon Sep 17 00:00:00 2001
|
||||
From: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
Date: Sun, 8 Mar 2020 00:31:35 -0800
|
||||
Subject: ZEN: Disable stack conservation for GCC
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1073,11 +1073,6 @@ KBUILD_CFLAGS += -fno-strict-overflow
|
||||
@@ -1076,11 +1076,6 @@ KBUILD_CFLAGS += -fno-strict-overflow
|
||||
# Make sure -fstack-check isn't enabled (like gentoo apparently did)
|
||||
KBUILD_CFLAGS += -fno-stack-check
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2b801ae725ae05be994d374efdce8fc2e828687f Mon Sep 17 00:00:00 2001
|
||||
From 71ce760cd36faae55cc0fefebed49998b5eae864 Mon Sep 17 00:00:00 2001
|
||||
From: Kenny Levinsen <kl@kl.wtf>
|
||||
Date: Sun, 27 Dec 2020 14:43:13 +0000
|
||||
Subject: ZEN: Input: evdev - use call_rcu when detaching client
|
@@ -1,4 +1,4 @@
|
||||
From 3777b5340ebf0460e6fb79205b294dd4333c9d8b Mon Sep 17 00:00:00 2001
|
||||
From 45cea9e15f2512535f2836ccddcf711f4823a2e1 Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Mon, 11 Jul 2022 19:10:30 -0500
|
||||
Subject: ZEN: cpufreq: Remove schedutil dependency on Intel/AMD P-State
|
@@ -1,4 +1,4 @@
|
||||
From d00df0f150c9d04cd229d42e0af906db3dfb5190 Mon Sep 17 00:00:00 2001
|
||||
From c5eb62bb4d6a06a5a95c0da0d41469f22e71556f Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Wed, 15 Jan 2020 20:43:56 -0600
|
||||
Subject: ZEN: intel-pstate: Implement "enable" parameter
|
||||
@@ -30,7 +30,7 @@ selection.
|
||||
|
||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||
@@ -2300,6 +2300,9 @@
|
||||
@@ -2324,6 +2324,9 @@
|
||||
disable
|
||||
Do not enable intel_pstate as the default
|
||||
scaling driver for the supported processors
|
||||
@@ -42,7 +42,7 @@ selection.
|
||||
governors layer of cpufreq and provides it own
|
||||
--- a/drivers/cpufreq/intel_pstate.c
|
||||
+++ b/drivers/cpufreq/intel_pstate.c
|
||||
@@ -3830,6 +3830,8 @@ static int __init intel_pstate_setup(cha
|
||||
@@ -3828,6 +3828,8 @@ static int __init intel_pstate_setup(cha
|
||||
|
||||
if (!strcmp(str, "disable"))
|
||||
no_load = 1;
|
@@ -1,4 +1,4 @@
|
||||
From f03da22e562a7d65a97926a76f61daeef8a1eb0d Mon Sep 17 00:00:00 2001
|
||||
From b42cd00b809a2f69bbf5e1d63cb7ff90f5f51410 Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Fri, 15 Mar 2024 12:36:51 -0500
|
||||
Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
@@ -13,7 +13,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
|
||||
@@ -160,6 +160,7 @@ struct amdgpu_watchdog_timer {
|
||||
@@ -161,6 +161,7 @@ struct amdgpu_watchdog_timer {
|
||||
*/
|
||||
extern int amdgpu_modeset;
|
||||
extern unsigned int amdgpu_vram_limit;
|
||||
@@ -23,7 +23,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
extern int amdgpu_gtt_size;
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
@@ -139,6 +139,7 @@ enum AMDGPU_DEBUG_MASK {
|
||||
@@ -143,6 +143,7 @@ enum AMDGPU_DEBUG_MASK {
|
||||
};
|
||||
|
||||
unsigned int amdgpu_vram_limit = UINT_MAX;
|
||||
@@ -31,7 +31,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
int amdgpu_vis_vram_limit;
|
||||
int amdgpu_gart_size = -1; /* auto */
|
||||
int amdgpu_gtt_size = -1; /* auto */
|
||||
@@ -259,6 +260,15 @@ struct amdgpu_watchdog_timer amdgpu_watc
|
||||
@@ -263,6 +264,15 @@ struct amdgpu_watchdog_timer amdgpu_watc
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -49,7 +49,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
*/
|
||||
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
|
||||
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
|
||||
@@ -3180,6 +3180,9 @@ static ssize_t amdgpu_hwmon_show_power_c
|
||||
@@ -3055,6 +3055,9 @@ static ssize_t amdgpu_hwmon_show_power_c
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
|
||||
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
|
||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
|
||||
@@ -2824,7 +2824,10 @@ int smu_get_power_limit(void *handle,
|
||||
@@ -2854,7 +2854,10 @@ int smu_get_power_limit(void *handle,
|
||||
*limit = smu->max_power_limit;
|
||||
break;
|
||||
case SMU_PPT_LIMIT_MIN:
|
||||
@@ -73,7 +73,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -2848,7 +2851,14 @@ static int smu_set_power_limit(void *han
|
||||
@@ -2878,7 +2881,14 @@ static int smu_set_power_limit(void *han
|
||||
if (smu->ppt_funcs->set_power_limit)
|
||||
return smu->ppt_funcs->set_power_limit(smu, limit_type, limit);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5f93b67c4e2fa81be5cee3edd8ec056407d25f26 Mon Sep 17 00:00:00 2001
|
||||
From fe26e658b0a14ba9ab4f800bea6a7a43aae0981e Mon Sep 17 00:00:00 2001
|
||||
From: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
Date: Sun, 19 Apr 2020 19:59:18 -0700
|
||||
Subject: ZEN: mm: Stop kswapd early when nothing's waiting for it to free
|
||||
@@ -43,7 +43,7 @@ Contains:
|
||||
|
||||
--- a/mm/internal.h
|
||||
+++ b/mm/internal.h
|
||||
@@ -736,6 +736,7 @@ void post_alloc_hook(struct page *page,
|
||||
@@ -788,6 +788,7 @@ void post_alloc_hook(struct page *page,
|
||||
extern bool free_pages_prepare(struct page *page, unsigned int order);
|
||||
|
||||
extern int user_min_free_kbytes;
|
||||
@@ -53,16 +53,16 @@ Contains:
|
||||
nodemask_t *);
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -88,6 +88,8 @@ typedef int __bitwise fpi_t;
|
||||
*/
|
||||
#define FPI_TO_TAIL ((__force fpi_t)BIT(1))
|
||||
@@ -91,6 +91,8 @@ typedef int __bitwise fpi_t;
|
||||
/* Free the page without taking locks. Rely on trylock only. */
|
||||
#define FPI_TRYLOCK ((__force fpi_t)BIT(2))
|
||||
|
||||
+atomic_long_t kswapd_waiters = ATOMIC_LONG_INIT(0);
|
||||
+
|
||||
/* prevent >1 _updater_ of zone percpu pageset ->high and ->batch fields */
|
||||
static DEFINE_MUTEX(pcp_batch_high_lock);
|
||||
#define MIN_PERCPU_PAGELIST_HIGH_FRACTION (8)
|
||||
@@ -4255,6 +4257,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, u
|
||||
@@ -4436,6 +4438,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, u
|
||||
unsigned int cpuset_mems_cookie;
|
||||
unsigned int zonelist_iter_cookie;
|
||||
int reserve_flags;
|
||||
@@ -70,7 +70,7 @@ Contains:
|
||||
|
||||
if (unlikely(nofail)) {
|
||||
/*
|
||||
@@ -4314,8 +4317,13 @@ restart:
|
||||
@@ -4495,8 +4498,13 @@ restart:
|
||||
goto nopage;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ Contains:
|
||||
|
||||
/*
|
||||
* The adjusted alloc_flags might result in immediate success, so try
|
||||
@@ -4525,9 +4533,12 @@ nopage:
|
||||
@@ -4711,9 +4719,12 @@ nopage:
|
||||
goto retry;
|
||||
}
|
||||
fail:
|
||||
@@ -102,7 +102,7 @@ Contains:
|
||||
|
||||
--- a/mm/vmscan.c
|
||||
+++ b/mm/vmscan.c
|
||||
@@ -6389,7 +6389,7 @@ retry:
|
||||
@@ -6419,7 +6419,7 @@ retry:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ Contains:
|
||||
{
|
||||
struct zone *zone;
|
||||
unsigned long pfmemalloc_reserve = 0;
|
||||
@@ -6418,6 +6418,10 @@ static bool allow_direct_reclaim(pg_data
|
||||
@@ -6444,6 +6444,10 @@ static bool allow_direct_reclaim(pg_data
|
||||
|
||||
wmark_ok = free_pages > pfmemalloc_reserve / 2;
|
||||
|
||||
@@ -122,7 +122,7 @@ Contains:
|
||||
/* kswapd must be awake if processes are being throttled */
|
||||
if (!wmark_ok && waitqueue_active(&pgdat->kswapd_wait)) {
|
||||
if (READ_ONCE(pgdat->kswapd_highest_zoneidx) > ZONE_NORMAL)
|
||||
@@ -6483,7 +6487,7 @@ static bool throttle_direct_reclaim(gfp_
|
||||
@@ -6509,7 +6513,7 @@ static bool throttle_direct_reclaim(gfp_
|
||||
|
||||
/* Throttle based on the first usable node */
|
||||
pgdat = zone->zone_pgdat;
|
||||
@@ -131,7 +131,7 @@ Contains:
|
||||
goto out;
|
||||
break;
|
||||
}
|
||||
@@ -6505,11 +6509,14 @@ static bool throttle_direct_reclaim(gfp_
|
||||
@@ -6531,11 +6535,14 @@ static bool throttle_direct_reclaim(gfp_
|
||||
*/
|
||||
if (!(gfp_mask & __GFP_FS))
|
||||
wait_event_interruptible_timeout(pgdat->pfmemalloc_wait,
|
||||
@@ -148,7 +148,7 @@ Contains:
|
||||
|
||||
if (fatal_signal_pending(current))
|
||||
return true;
|
||||
@@ -7012,14 +7019,14 @@ restart:
|
||||
@@ -7056,14 +7063,14 @@ restart:
|
||||
* able to safely make forward progress. Wake them
|
||||
*/
|
||||
if (waitqueue_active(&pgdat->pfmemalloc_wait) &&
|
@@ -1,4 +1,4 @@
|
||||
From 80b06f0f0bba019632e40c11231987a7e996c340 Mon Sep 17 00:00:00 2001
|
||||
From bc6ff8d7a55a19fdd6828168cc35cba76f05c133 Mon Sep 17 00:00:00 2001
|
||||
From: EXtremeExploit <pedro.montes.alcalde@gmail.com>
|
||||
Date: Fri, 29 Nov 2024 13:05:27 -0300
|
||||
Subject: ZEN: ahci: Disable staggered spinup by default
|
@@ -1,4 +1,4 @@
|
||||
From ac35b7af0aac6a9eb996962130a99c9af75c8b08 Mon Sep 17 00:00:00 2001
|
||||
From 4ae0eb6d9a78f53d796996b17743b7df74a7f43d Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Sat, 14 Dec 2024 11:23:18 -0600
|
||||
Subject: ZEN: kernel/Kconfig.preempt: Remove EXPERT conditional on PREEMPT_RT
|
@@ -1,4 +1,4 @@
|
||||
From 8bf253ea1b48fe101dc0161824b9a7d85f420b84 Mon Sep 17 00:00:00 2001
|
||||
From e90e4b57fedca27f5c230f39bd6f67672f1d24ef Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
||||
Date: Mon, 27 Jan 2020 18:10:06 +0100
|
||||
Subject: ZEN: INTERACTIVE: Base config item
|
||||
@@ -9,7 +9,7 @@ Subject: ZEN: INTERACTIVE: Base config item
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -165,6 +165,12 @@ config THREAD_INFO_IN_TASK
|
||||
@@ -163,6 +163,12 @@ config THREAD_INFO_IN_TASK
|
||||
|
||||
menu "General setup"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d3b2ab943a1de0838c4bd515dbed45f8f1c3c2cc Mon Sep 17 00:00:00 2001
|
||||
From 4da290d83614efedb0eb3b8114070fbddc46677b Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
||||
Date: Mon, 27 Jan 2020 18:11:05 +0100
|
||||
Subject: ZEN: INTERACTIVE: Use BFQ as the elevator for SQ devices
|
||||
@@ -24,7 +24,7 @@ Subject: ZEN: INTERACTIVE: Use BFQ as the elevator for SQ devices
|
||||
/*
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -171,6 +171,10 @@ config ZEN_INTERACTIVE
|
||||
@@ -169,6 +169,10 @@ config ZEN_INTERACTIVE
|
||||
help
|
||||
Tunes the kernel for responsiveness at the cost of throughput and power usage.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d941bedf16b95646be26364f00cf46c6649608a6 Mon Sep 17 00:00:00 2001
|
||||
From 1689e70d72aff7c4e26ca326e5e94b2d244d13bd Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
||||
Date: Mon, 12 Dec 2022 00:03:03 +0100
|
||||
Subject: ZEN: INTERACTIVE: Use Kyber as the elevator for MQ devices
|
||||
@@ -26,7 +26,7 @@ Subject: ZEN: INTERACTIVE: Use Kyber as the elevator for MQ devices
|
||||
return elevator_find_get("bfq");
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -174,6 +174,7 @@ config ZEN_INTERACTIVE
|
||||
@@ -172,6 +172,7 @@ config ZEN_INTERACTIVE
|
||||
--- Block Layer ----------------------------------------
|
||||
|
||||
Default scheduler for SQ..: mq-deadline -> bfq
|
@@ -1,4 +1,4 @@
|
||||
From d0ce01e1def080e52770f9a899476bb840807b37 Mon Sep 17 00:00:00 2001
|
||||
From 8ae9125b5d9637f6b97d20f71348c3e67322028b Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
||||
Date: Mon, 27 Jan 2020 18:21:09 +0100
|
||||
Subject: ZEN: INTERACTIVE: Enable background reclaim of hugepages
|
||||
@@ -32,7 +32,7 @@ Reasoning and details in the original patch: https://lwn.net/Articles/711248/
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -176,6 +176,10 @@ config ZEN_INTERACTIVE
|
||||
@@ -174,6 +174,10 @@ config ZEN_INTERACTIVE
|
||||
Default scheduler for SQ..: mq-deadline -> bfq
|
||||
Default scheduler for MQ..: none -> kyber
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f1fd33efd4b70519ff51b78c62d6fdf7d4f69620 Mon Sep 17 00:00:00 2001
|
||||
From 93c14f60cef3fe7aa8d11edcab2d9a994b667087 Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
||||
Date: Tue, 31 Oct 2023 19:03:10 +0100
|
||||
Subject: ZEN: INTERACTIVE: Tune EEVDF for interactivity
|
||||
@@ -42,14 +42,14 @@ caused by rebalancing too many tasks at once.
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -180,6 +180,13 @@ config ZEN_INTERACTIVE
|
||||
@@ -178,6 +178,13 @@ config ZEN_INTERACTIVE
|
||||
|
||||
Background-reclaim hugepages...: no -> yes
|
||||
|
||||
+ --- EEVDF CPU Scheduler --------------------------------
|
||||
+
|
||||
+ Minimal granularity............: 0.75 -> 0.4 ms
|
||||
+ Migration cost.................: 0.5 -> 0.25 ms
|
||||
+ Minimal granularity............: 0.7 -> 0.4 ms
|
||||
+ Migration cost.................: 0.5 -> 0.3 ms
|
||||
+ Bandwidth slice size...........: 5 -> 3 ms
|
||||
+ Task rebalancing threshold.....: 32 -> 8
|
||||
+
|
||||
@@ -71,9 +71,9 @@ caused by rebalancing too many tasks at once.
|
||||
+#endif
|
||||
|
||||
+#ifdef CONFIG_ZEN_INTERACTIVE
|
||||
+const_debug unsigned int sysctl_sched_migration_cost = 250000UL;
|
||||
+__read_mostly unsigned int sysctl_sched_migration_cost = 300000UL;
|
||||
+#else
|
||||
const_debug unsigned int sysctl_sched_migration_cost = 500000UL;
|
||||
__read_mostly unsigned int sysctl_sched_migration_cost = 500000UL;
|
||||
+#endif
|
||||
|
||||
static int __init setup_sched_thermal_decay_shift(char *str)
|
||||
@@ -93,7 +93,7 @@ caused by rebalancing too many tasks at once.
|
||||
/* Restrict the NUMA promotion throughput (MB/s) for each target node. */
|
||||
--- a/kernel/sched/sched.h
|
||||
+++ b/kernel/sched/sched.h
|
||||
@@ -2837,7 +2837,7 @@ extern void deactivate_task(struct rq *r
|
||||
@@ -2790,7 +2790,7 @@ extern void deactivate_task(struct rq *r
|
||||
|
||||
extern void wakeup_preempt(struct rq *rq, struct task_struct *p, int flags);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 75f2a8831bd24a35d9853b11dabc06a138c5e445 Mon Sep 17 00:00:00 2001
|
||||
From 06211fa595081b33d5de6d818f5d370055075cb2 Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
||||
Date: Mon, 27 Jan 2020 18:27:16 +0100
|
||||
Subject: ZEN: INTERACTIVE: Tune ondemand governor for interactivity
|
||||
@@ -75,7 +75,7 @@ Remove MuQSS cpufreq configuration.
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -187,6 +187,12 @@ config ZEN_INTERACTIVE
|
||||
@@ -185,6 +185,12 @@ config ZEN_INTERACTIVE
|
||||
Bandwidth slice size...........: 5 -> 3 ms
|
||||
Task rebalancing threshold.....: 32 -> 8
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b82d80a4195f179b9c0d0c80f662a7f42ed21ce8 Mon Sep 17 00:00:00 2001
|
||||
From a79294bd643ed6b143fc76ddfdeb25caa2121aa4 Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Sat, 5 Mar 2022 11:37:14 -0600
|
||||
Subject: ZEN: INTERACTIVE: mm: Disable unevictable compaction
|
||||
@@ -12,7 +12,7 @@ turn it off when CONFIG_ZEN_INTERACTIVE is set as well.
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -179,6 +179,7 @@ config ZEN_INTERACTIVE
|
||||
@@ -177,6 +177,7 @@ config ZEN_INTERACTIVE
|
||||
--- Virtual Memory Subsystem ---------------------------
|
||||
|
||||
Background-reclaim hugepages...: no -> yes
|
||||
@@ -22,7 +22,7 @@ turn it off when CONFIG_ZEN_INTERACTIVE is set as well.
|
||||
|
||||
--- a/mm/Kconfig
|
||||
+++ b/mm/Kconfig
|
||||
@@ -691,7 +691,7 @@ config COMPACTION
|
||||
@@ -654,7 +654,7 @@ config COMPACTION
|
||||
config COMPACT_UNEVICTABLE_DEFAULT
|
||||
int
|
||||
depends on COMPACTION
|
@@ -1,4 +1,4 @@
|
||||
From 7227af3e01f9ae5a2bcdc9aa652c973438938eb3 Mon Sep 17 00:00:00 2001
|
||||
From d7c684733ae88876fb00899c621dd40e08902f1e Mon Sep 17 00:00:00 2001
|
||||
From: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
Date: Sat, 28 Mar 2020 13:06:28 -0700
|
||||
Subject: ZEN: INTERACTIVE: mm: Disable watermark boosting by default
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -180,6 +180,7 @@ config ZEN_INTERACTIVE
|
||||
@@ -178,6 +178,7 @@ config ZEN_INTERACTIVE
|
||||
|
||||
Background-reclaim hugepages...: no -> yes
|
||||
Compact unevictable............: yes -> no
|
||||
@@ -43,7 +43,7 @@ Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -273,7 +273,11 @@ const char * const migratetype_names[MIG
|
||||
@@ -276,7 +276,11 @@ const char * const migratetype_names[MIG
|
||||
|
||||
int min_free_kbytes = 1024;
|
||||
int user_min_free_kbytes = -1;
|
||||
@@ -53,5 +53,5 @@ Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
static int watermark_boost_factor __read_mostly = 15000;
|
||||
+#endif
|
||||
static int watermark_scale_factor = 10;
|
||||
int defrag_mode;
|
||||
|
||||
/* movable_zone is the "real" zone pages in ZONE_MOVABLE are taken from */
|
@@ -1,4 +1,4 @@
|
||||
From 91187cefc66b9c186a78d7bd996088fc74c66c99 Mon Sep 17 00:00:00 2001
|
||||
From faa505ee52add9101fc9701edc9567e7f7a254df Mon Sep 17 00:00:00 2001
|
||||
From: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
Date: Wed, 20 Oct 2021 20:50:11 -0700
|
||||
Subject: ZEN: INTERACTIVE: mm: Lower the non-hugetlbpage pageblock size to
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -181,6 +181,7 @@ config ZEN_INTERACTIVE
|
||||
@@ -179,6 +179,7 @@ config ZEN_INTERACTIVE
|
||||
Background-reclaim hugepages...: no -> yes
|
||||
Compact unevictable............: yes -> no
|
||||
Watermark boost factor.........: 1.5 -> 0
|
@@ -1,4 +1,4 @@
|
||||
From 779648709dc797dac595e3007b4c7c3fee254537 Mon Sep 17 00:00:00 2001
|
||||
From 8114de0815b1821e66951288e0a14c5a13b68d82 Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Sat, 21 May 2022 15:15:09 -0500
|
||||
Subject: ZEN: INTERACTIVE: dm-crypt: Disable workqueues for crypto ops
|
||||
@@ -20,7 +20,7 @@ Fixes: https://github.com/zen-kernel/zen-kernel/issues/282
|
||||
|
||||
--- a/drivers/md/dm-crypt.c
|
||||
+++ b/drivers/md/dm-crypt.c
|
||||
@@ -3305,6 +3305,11 @@ static int crypt_ctr(struct dm_target *t
|
||||
@@ -3284,6 +3284,11 @@ static int crypt_ctr(struct dm_target *t
|
||||
goto bad;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ Fixes: https://github.com/zen-kernel/zen-kernel/issues/282
|
||||
goto bad;
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -175,6 +175,7 @@ config ZEN_INTERACTIVE
|
||||
@@ -173,6 +173,7 @@ config ZEN_INTERACTIVE
|
||||
|
||||
Default scheduler for SQ..: mq-deadline -> bfq
|
||||
Default scheduler for MQ..: none -> kyber
|
@@ -1,4 +1,4 @@
|
||||
From ef87b1cb12134c34eed834315b03c4a6747b5716 Mon Sep 17 00:00:00 2001
|
||||
From 1bc3828fcd5966dd94126355e4d02e42caf1407b Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Mon, 5 Sep 2022 11:35:20 -0500
|
||||
Subject: ZEN: INTERACTIVE: mm/swap: Disable swap-in readahead
|
||||
@@ -20,7 +20,7 @@ same change so Zen Kernel users benefit.
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -183,6 +183,7 @@ config ZEN_INTERACTIVE
|
||||
@@ -181,6 +181,7 @@ config ZEN_INTERACTIVE
|
||||
Compact unevictable............: yes -> no
|
||||
Watermark boost factor.........: 1.5 -> 0
|
||||
Pageblock order................: 10 -> 3
|
||||
@@ -30,7 +30,7 @@ same change so Zen Kernel users benefit.
|
||||
|
||||
--- a/mm/swap.c
|
||||
+++ b/mm/swap.c
|
||||
@@ -1081,6 +1081,10 @@ void folio_batch_remove_exceptionals(str
|
||||
@@ -1091,6 +1091,10 @@ static const struct ctl_table swap_sysct
|
||||
*/
|
||||
void __init swap_setup(void)
|
||||
{
|
||||
@@ -41,9 +41,11 @@ same change so Zen Kernel users benefit.
|
||||
unsigned long megs = totalram_pages() >> (20 - PAGE_SHIFT);
|
||||
|
||||
/* Use a smaller cluster for small-memory machines */
|
||||
@@ -1092,4 +1096,5 @@ void __init swap_setup(void)
|
||||
@@ -1102,6 +1106,7 @@ void __init swap_setup(void)
|
||||
* Right now other parts of the system means that we
|
||||
* _really_ don't want to cluster much more
|
||||
*/
|
||||
+#endif
|
||||
|
||||
register_sysctl_init("vm", swap_sysctl_table);
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
From cb33a6dc022faa07ac1e1cd544567b28a7e9afeb Mon Sep 17 00:00:00 2001
|
||||
From 625fb48c0c4fab13b9c2f231c3fe6368a1b78242 Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Sun, 19 Sep 2021 16:03:36 -0500
|
||||
Subject: ZEN: INTERACTIVE: Document PDS/BMQ configuration
|
||||
@@ -9,7 +9,7 @@ Subject: ZEN: INTERACTIVE: Document PDS/BMQ configuration
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -192,6 +192,11 @@ config ZEN_INTERACTIVE
|
||||
@@ -190,6 +190,11 @@ config ZEN_INTERACTIVE
|
||||
Bandwidth slice size...........: 5 -> 3 ms
|
||||
Task rebalancing threshold.....: 32 -> 8
|
||||
|
Reference in New Issue
Block a user