linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: benjamin.berg@intel.com,chunkeey@gmail.com,gregkh@linuxfoundation.org,johannes@sipsolutions.net,linux-um@lists.infradead.org,richard@nod.at,sashal@kernel.org
Cc: <stable-commits@vger.kernel.org>
Subject: Patch "[PATCH 6.12] Revert "um: work around sched_yield not yielding in time-travel mode"" has been added to the 6.12-stable tree
Date: Mon, 12 May 2025 15:30:58 +0200	[thread overview]
Message-ID: <2025051258-silenced-resend-bc87@gregkh> (raw)
In-Reply-To: <20250509095040.33355-1-chunkeey@gmail.com>


This is a note to let you know that I've just added the patch titled

    [PATCH 6.12] Revert "um: work around sched_yield not yielding in time-travel mode"

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-um-work-around-sched_yield-not-yielding-in-time-travel-mode.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From chunkeey@gmail.com  Mon May 12 13:25:04 2025
From: Christian Lamparter <chunkeey@gmail.com>
Date: Fri,  9 May 2025 11:50:39 +0200
Subject: [PATCH 6.12] Revert "um: work around sched_yield not yielding in time-travel mode"
To: linux-kernel@vger.kernel.org, linux-um@lists.infradead.org
Cc: benjamin.berg@intel.com, sashal@kernel.org, johannes@sipsolutions.net, richard@nod.at, stable@vger.kernel.org
Message-ID: <20250509095040.33355-1-chunkeey@gmail.com>

From: Christian Lamparter <chunkeey@gmail.com>

This reverts commit da780c4a075ba2deb05ae29f0af4a990578c7901 which is
commit 887c5c12e80c8424bd471122d2e8b6b462e12874 upstream.


Reason being that the patch depends on at least commit 0b8b2668f998
("um: insert scheduler ticks when userspace does not yield") in order to
build. Otherwise it fails with:

| /usr/bin/ld: arch/um/kernel/skas/syscall.o: in function `handle_syscall':
|      linux-6.12.27/arch/um/kernel/skas/syscall.c:43:(.text+0xa2): undefined
| reference to `tt_extra_sched_jiffies'
| collect2: error: ld returned 1 exit status

The author Benjamin Berg commented: "I think it is better to just not
backport commit 0b8b2668f998 ("um: insert scheduler ticks when userspace
does not yield")"

Link: https://lore.kernel.org/linux-um/8ce0b6056a9726e540f61bce77311278654219eb.camel@sipsolutions.net/
Cc: <stable@vger.kernel.org> # 6.12.y
Cc: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/um/include/linux/time-internal.h |    2 --
 arch/um/kernel/skas/syscall.c         |   11 -----------
 2 files changed, 13 deletions(-)

--- a/arch/um/include/linux/time-internal.h
+++ b/arch/um/include/linux/time-internal.h
@@ -83,8 +83,6 @@ extern void time_travel_not_configured(v
 #define time_travel_del_event(...) time_travel_not_configured()
 #endif /* CONFIG_UML_TIME_TRAVEL_SUPPORT */
 
-extern unsigned long tt_extra_sched_jiffies;
-
 /*
  * Without CONFIG_UML_TIME_TRAVEL_SUPPORT this is a linker error if used,
  * which is intentional since we really shouldn't link it in that case.
--- a/arch/um/kernel/skas/syscall.c
+++ b/arch/um/kernel/skas/syscall.c
@@ -31,17 +31,6 @@ void handle_syscall(struct uml_pt_regs *
 		goto out;
 
 	syscall = UPT_SYSCALL_NR(r);
-
-	/*
-	 * If no time passes, then sched_yield may not actually yield, causing
-	 * broken spinlock implementations in userspace (ASAN) to hang for long
-	 * periods of time.
-	 */
-	if ((time_travel_mode == TT_MODE_INFCPU ||
-	     time_travel_mode == TT_MODE_EXTERNAL) &&
-	    syscall == __NR_sched_yield)
-		tt_extra_sched_jiffies += 1;
-
 	if (syscall >= 0 && syscall < __NR_syscalls) {
 		unsigned long ret = EXECUTE_SYSCALL(syscall, regs);
 


Patches currently in stable-queue which might be from chunkeey@gmail.com are

queue-6.12/revert-um-work-around-sched_yield-not-yielding-in-time-travel-mode.patch


      parent reply	other threads:[~2025-05-12 14:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09  9:50 [PATCH 6.12] Revert "um: work around sched_yield not yielding in time-travel mode" Christian Lamparter
2025-05-09 10:03 ` Johannes Berg
2025-05-11 19:23 ` Johannes Berg
2025-05-11 20:04   ` Christian Lamparter
2025-05-12 13:30 ` gregkh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025051258-silenced-resend-bc87@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=benjamin.berg@intel.com \
    --cc=chunkeey@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=sashal@kernel.org \
    --cc=stable-commits@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).