~mreed8855/ubuntu/+source/linux/+git/jammy:lp_2008751_hpwdt

Last commit made on 2023-02-28
Get this branch:
git clone -b lp_2008751_hpwdt https://git.launchpad.net/~mreed8855/ubuntu/+source/linux/+git/jammy
Only Michael Reed can upload to this branch. If you are Michael Reed please log in for upload directions.

Branch merges

Branch information

Name:
lp_2008751_hpwdt
Repository:
lp:~mreed8855/ubuntu/+source/linux/+git/jammy

Recent commits

ae1c883... by Jerry Hoemann

watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING

Fixes: d48b0e173715 ("x86, nmi, drivers: Fix nmi splitup build bug")

Arm64 does not support NMI and has no <asm/nmi.h>.

Include <asm/nmi.h> only if CONFIG_HPWDT_NMI_DECODING is defined to
avoid build failure on non-existent header file on Arm64.

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

Signed-off-by: Jerry Hoemann <email address hidden>
Reviewed-by: Guenter Roeck <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Guenter Roeck <email address hidden>
Signed-off-by: Wim Van Sebroeck <email address hidden>
(cherry picked from commit ed835d8171fc884c7750cdd54128df16d4571e3a)
Signed-off-by: Michael Reed <email address hidden>

9f4c973... by Jerry Hoemann

watchdog/hpwdt: Enable HP_WATCHDOG for ARM64 systems.

Enable HP_WATCHDOG for ARM64 systems.
HPWDT_NMI_DECODING requires X86 as NMI handlers are X86 specific.

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

Signed-off-by: Jerry Hoemann <email address hidden>
Reviewed-by: Guenter Roeck <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Guenter Roeck <email address hidden>
Signed-off-by: Wim Van Sebroeck <email address hidden>

Add arm64 option to CONFIG_HP_WATCHDOG

CONFIG_HP_WATCHDOG is used in module hpwdt. A software monitoring watchdog
and NMI handling driver. This driver will detect lockups and provide
a stack trace. This is a driver that will only load on an HP ProLiant
system with a minimum of iLO2 support. This option allow it to build
on arm64.

(backported from commit 891862d5ba11da739ac796221ff64e4ccf5a275f)
Signed-off-by: Michael Reed <email address hidden>
[Michael Reed - Added arm64 option to the config file for CONFIG_HP_WATCHDOG]

49bd24e... by Stefan Bader

UBUNTU: Ubuntu-5.15.0-68.75

Signed-off-by: Stefan Bader <email address hidden>

b738cce... by Stefan Bader

UBUNTU: debian/dkms-versions -- update from kernel-versions (main/2023.02.27)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Stefan Bader <email address hidden>

b5f1a73... by Stefan Bader

UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/2008349
Properties: no-test-build
Signed-off-by: Stefan Bader <email address hidden>

83c0dba... by JianlinLv

UBUNTU: SAUCE: audit: fix memory leak of audit_log_lsm()

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

Got following memory leak reports by kmemleak

unreferenced object 0xffff8baee56b9d08 (size 24):
  comm "grep", pid 5503, jiffies 4297727573 (age 466.572s)
  hex dump (first 24 bytes):
    00 80 b5 a2 ae 8b ff ff 00 74 74 db dd 8b ff ff .........tt.....
    20 0a 00 00 00 00 00 00 .......
  backtrace:
    [<00000000b7cc6a2d>] kmem_cache_alloc+0x13f/0x450
    [<0000000024efa20e>] audit_log_start.part.0+0x12d/0x3b0
    [<000000007a98c9a0>] audit_log_start+0x3f/0x60
    [<00000000165c321e>] audit_log_lsm+0x74/0x180
    [<00000000e9cb2cd0>] audit_log_exit+0x4df/0x700
    [<00000000688ae612>] __audit_syscall_exit+0x241/0x2b0
    [<00000000bda00aef>] syscall_exit_work+0x116/0x150
    [<000000008071854f>] syscall_exit_to_user_mode+0x3b/0x50
    [<000000000dd668c7>] do_syscall_64+0x69/0xc0
    [<00000000bef68a32>] entry_SYSCALL_64_after_hwframe+0x44/0xae
unreferenced object 0xffff8baea2b58000 (size 224):
  comm "grep", pid 5503, jiffies 4297727573 (age 466.572s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  backtrace:
    [<00000000b2225191>] kmem_cache_alloc_node+0x14f/0x460
    [<0000000097965326>] __alloc_skb+0x168/0x1d0
    [<00000000400424f6>] audit_log_start.part.0+0x14d/0x3b0
    [<000000007a98c9a0>] audit_log_start+0x3f/0x60
    [<00000000165c321e>] audit_log_lsm+0x74/0x180
    [<00000000e9cb2cd0>] audit_log_exit+0x4df/0x700
    [<00000000688ae612>] __audit_syscall_exit+0x241/0x2b0
    [<00000000bda00aef>] syscall_exit_work+0x116/0x150
    [<000000008071854f>] syscall_exit_to_user_mode+0x3b/0x50
    [<000000000dd668c7>] do_syscall_64+0x69/0xc0
    [<00000000bef68a32>] entry_SYSCALL_64_after_hwframe+0x44/0xae

struct audit_buffer object allocated in audit_log_lsm should be freed if
lsmblob_is_set/security_secid_to_secctx return false or error.

Fixes: 85ff537962b6 "UBUNTU: SAUCE: Audit: Add new record for multiple process LSM attributes"
Signed-off-by: Jianlin Lv <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Acked-by: Luke Nowakowski-Krijger <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

207293f... by Artem Bityutskiy <email address hidden>

intel_idle: make SPR C1 and C1E be independent

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

This patch partially reverts the changes made by the following commit:

da0e58c038e6 intel_idle: add 'preferred_cstates' module argument

As that commit describes, on early Sapphire Rapids Xeon platforms the C1 and
C1E states were mutually exclusive, so that users could only have either C1 and
C6, or C1E and C6.

However, Intel firmware engineers managed to remove this limitation and make C1
and C1E to be completely independent, just like on previous Xeon platforms.

Therefore, this patch:
 * Removes commentary describing the old, and now non-existing SPR C1E
   limitation.
 * Marks SPR C1E as available by default.
 * Removes the 'preferred_cstates' parameter handling for SPR. Both C1 and
   C1E will be available regardless of 'preferred_cstates' value.

We expect that all SPR systems are shipping with new firmware, which includes
the C1/C1E improvement.

Cc: v5.18+ <email address hidden> # v5.18+
Signed-off-by: Artem Bityutskiy <email address hidden>
Signed-off-by: Rafael J. Wysocki <email address hidden>

(backported from commit 1548fac47a114b42063def551eb152a536ed9697)
[jsalisbury: Resolved context diffs. adl structs do not exist in Jammy]
Signed-off-by: Joseph Salisbury <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

533fa60... by Artem Bityutskiy <email address hidden>

intel_idle: Fix SPR C6 optimization

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

The Sapphire Rapids (SPR) C6 optimization was added to the end of the
'spr_idle_state_table_update()' function. However, the function has a
'return' which may happen before the optimization has a chance to run.
And this may prevent the optimization from happening.

This is an unlikely scenario, but possible if user boots with, say,
the 'intel_idle.preferred_cstates=6' kernel boot option.

This patch fixes the issue by eliminating the problematic 'return'
statement.

Fixes: 3a9cf77b60dc ("intel_idle: add core C6 optimization for SPR")
Suggested-by: Jan Beulich <email address hidden>
Reported-by: Jan Beulich <email address hidden>
Signed-off-by: Artem Bityutskiy <email address hidden>
[ rjw: Minor changelog edits ]
Signed-off-by: Rafael J. Wysocki <email address hidden>

(cherry picked from commit 7eac3bd38d18cd3317756649921b8264ddfee692)
Signed-off-by: Joseph Salisbury <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

bad3aaf... by Artem Bityutskiy <email address hidden>

intel_idle: Fix the 'preferred_cstates' module parameter

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

Problem description.

When user boots kernel up with the 'intel_idle.preferred_cstates=4' option,
we enable C1E and disable C1 states on Sapphire Rapids Xeon (SPR). In order
for C1E to work on SPR, we have to enable the C1E promotion bit on all
CPUs. However, we enable it only on one CPU.

Fix description.

The 'intel_idle' driver already has the infrastructure for disabling C1E
promotion on every CPU. This patch uses the same infrastructure for
enabling C1E promotion on every CPU. It changes the boolean
'disable_promotion_to_c1e' variable to a tri-state 'c1e_promotion'
variable.

Tested on a 2-socket SPR system. I verified the following combinations:

 * C1E promotion enabled and disabled in BIOS.
 * Booted with and without the 'intel_idle.preferred_cstates=4' kernel
   argument.

In all 4 cases C1E promotion was correctly set on all CPUs.

Also tested on an old Broadwell system, just to make sure it does not cause
a regression. C1E promotion was correctly disabled on that system, both C1
and C1E were exposed (as expected).

Fixes: da0e58c038e6 ("intel_idle: add 'preferred_cstates' module argument")
Reported-by: Jan Beulich <email address hidden>
Signed-off-by: Artem Bityutskiy <email address hidden>
[ rjw: Minor changelog edits ]
Signed-off-by: Rafael J. Wysocki <email address hidden>

(cherry picked from commit 39c184a6a9a7a99950b321d55fe713175cf1d404)
Signed-off-by: Joseph Salisbury <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

b072fe1... by "Rafael J. Wysocki" <email address hidden>

cpuidle: intel_idle: Drop redundant backslash at line end

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

Drop a redundant backslash character at the end of a line in the
spr_cstates[] definition.

Signed-off-by: Rafael J. Wysocki <email address hidden>
Acked-by: Artem Bityutskiy <email address hidden>

(cherry picked from commit 03eb65224e5711e7a2f34b500d44866b322a249a)
Signed-off-by: Joseph Salisbury <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>