понедельник

[Bug 1977753] [NEW] Azure 5.4: vDSO broken with 5.4.0-1075-azure

Public bug reported:

SRU Justification

[Impact]
vDSO works with the 5.4.0-1074-azure kernel, but is broken in 5.4.0-1075-azure and newer due to this commit
https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-azure/+git/bionic/commit/?h=Ubuntu-azure-5.4-5.4.0-1075.78_18.04.1&id=5c899e1bcda02c755a5327353ed66f0768771644

Please revert the commit 5c899e1bcda02c755a5327353ed66f0768771644.

How to verify vDSO is working: "strace date 2>&1 | grep time" should not show the time related syscalls, e.g. clock_gettime()
With 5.4.0-1075-azure and newer, I see the time related syscalls.

****************************************************************
More info:
The buggy commit 5c899e1bcda02c755a5327353ed66f0768771644 was backported from the mainline commit:
e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
but due to the differences between the mainline kernel and the 5.4.0-107x-azure kernel, we actually should not simply remove hv_set_clocksource_vdso().

FWIW, the mainline commit is actually buggy and is fixed by this later
mainline path:

commit 3486d2c9be652a31033363bdd50391b0c8a8fe21
Author: Vitaly Kuznetsov vkuznets@redhat.com
Date: Thu May 13 09:32:46 2021 +0200

clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86

Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029)
the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO
differences inline") broke vDSO on x86. The problem appears to be that
VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and
'#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not
a define).

Use a dedicated HAVE_VDSO_CLOCKMODE_HVCLOCK define instead.

Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
Reported-by: Mohammed Gamal mgamal@redhat.com
Suggested-by: Thomas Gleixner tglx@linutronix.de
Signed-off-by: Vitaly Kuznetsov vkuznets@redhat.com
Signed-off-by: Thomas Gleixner tglx@linutronix.de
Reviewed-by: Michael Kelley mikelley@microsoft.com
Link: https://lore.kernel.org/r/20210513073246.1715070-1-vkuznets@redhat.com

PS, Ubunt 20.04's 5.13.0-1026-azure is not affected.

After some discussion it was decided that the revert is the best
solution.

[Test Case]

strace date 2>&1 | grep time
also Microsoft tested

[Where things could go wrong]

vDSO entry point could stop working altogether

[Other Info]

SF: #00338309

** Affects: linux-azure (Ubuntu)
Importance: Undecided
Status: Fix Released

** Affects: linux-azure (Ubuntu Focal)
Importance: Medium
Assignee: Tim Gardner (timg-tpi)
Status: In Progress

** Package changed: linux (Ubuntu) => linux-azure (Ubuntu)

** Changed in: linux-azure (Ubuntu)
Status: New => Fix Released

** Also affects: linux-azure (Ubuntu Focal)
Importance: Undecided
Status: New

** Changed in: linux-azure (Ubuntu Focal)
Importance: Undecided => Medium

** Changed in: linux-azure (Ubuntu Focal)
Status: New => In Progress

** Changed in: linux-azure (Ubuntu Focal)
Assignee: (unassigned) => Tim Gardner (timg-tpi)

** Description changed:

SRU Justification

[Impact]
vDSO works with the 5.4.0-1074-azure kernel, but is broken in 5.4.0-1075-azure and newer due to this commit
https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-azure/+git/bionic/commit/?h=Ubuntu-azure-5.4-5.4.0-1075.78_18.04.1&id=5c899e1bcda02c755a5327353ed66f0768771644

Please revert the commit 5c899e1bcda02c755a5327353ed66f0768771644.

How to verify vDSO is working: "strace date 2>&1 | grep time" should not show the time related syscalls, e.g. clock_gettime()
With 5.4.0-1075-azure and newer, I see the time related syscalls.

****************************************************************
More info:
The buggy commit 5c899e1bcda02c755a5327353ed66f0768771644 was backported from the mainline commit:
e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
but due to the differences between the mainline kernel and the 5.4.0-107x-azure kernel, we actually should not simply remove hv_set_clocksource_vdso().

FWIW, the mainline commit is actually buggy and is fixed by this later
mainline path:

commit 3486d2c9be652a31033363bdd50391b0c8a8fe21
Author: Vitaly Kuznetsov vkuznets@redhat.com
Date: Thu May 13 09:32:46 2021 +0200

clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86

Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029)
the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO
differences inline") broke vDSO on x86. The problem appears to be that
VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and
'#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not
a define).

Use a dedicated HAVE_VDSO_CLOCKMODE_HVCLOCK define instead.

Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
Reported-by: Mohammed Gamal mgamal@redhat.com
Suggested-by: Thomas Gleixner tglx@linutronix.de
Signed-off-by: Vitaly Kuznetsov vkuznets@redhat.com
Signed-off-by: Thomas Gleixner tglx@linutronix.de
Reviewed-by: Michael Kelley mikelley@microsoft.com
Link: https://lore.kernel.org/r/20210513073246.1715070-1-vkuznets@redhat.com

PS, Ubunt 20.04's 5.13.0-1026-azure is not affected.

- After some discussion it was decided that the revert is the solution.
+ After some discussion it was decided that the revert is the best
+ solution.

[Test Case]

strace date 2>&1 | grep time
also Microsoft tested

[Where things could go wrong]

vDSO entry point could stop working altogether

[Other Info]

SF: #00338309

--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/1977753

Title:
Azure 5.4: vDSO broken with 5.4.0-1075-azure

Status in linux-azure package in Ubuntu:
Fix Released
Status in linux-azure source package in Focal:
In Progress

Bug description:
SRU Justification

[Impact]
vDSO works with the 5.4.0-1074-azure kernel, but is broken in 5.4.0-1075-azure and newer due to this commit
https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-azure/+git/bionic/commit/?h=Ubuntu-azure-5.4-5.4.0-1075.78_18.04.1&id=5c899e1bcda02c755a5327353ed66f0768771644

Please revert the commit 5c899e1bcda02c755a5327353ed66f0768771644.

How to verify vDSO is working: "strace date 2>&1 | grep time" should not show the time related syscalls, e.g. clock_gettime()
With 5.4.0-1075-azure and newer, I see the time related syscalls.

****************************************************************
More info:
The buggy commit 5c899e1bcda02c755a5327353ed66f0768771644 was backported from the mainline commit:
e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
but due to the differences between the mainline kernel and the 5.4.0-107x-azure kernel, we actually should not simply remove hv_set_clocksource_vdso().

FWIW, the mainline commit is actually buggy and is fixed by this later
mainline path:

commit 3486d2c9be652a31033363bdd50391b0c8a8fe21
Author: Vitaly Kuznetsov vkuznets@redhat.com
Date: Thu May 13 09:32:46 2021 +0200

clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86

Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029)
the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO
differences inline") broke vDSO on x86. The problem appears to be that
VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and
'#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not
a define).

Use a dedicated HAVE_VDSO_CLOCKMODE_HVCLOCK define instead.

Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
Reported-by: Mohammed Gamal mgamal@redhat.com
Suggested-by: Thomas Gleixner tglx@linutronix.de
Signed-off-by: Vitaly Kuznetsov vkuznets@redhat.com
Signed-off-by: Thomas Gleixner tglx@linutronix.de
Reviewed-by: Michael Kelley mikelley@microsoft.com
Link: https://lore.kernel.org/r/20210513073246.1715070-1-vkuznets@redhat.com

PS, Ubunt 20.04's 5.13.0-1026-azure is not affected.

After some discussion it was decided that the revert is the best
solution.

[Test Case]

strace date 2>&1 | grep time
also Microsoft tested

[Where things could go wrong]

vDSO entry point could stop working altogether

[Other Info]

SF: #00338309

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-azure/+bug/1977753/+subscriptions

Комментариев нет:

Отправить комментарий