core/urgent for v5.18-rc6
Subsystems (6)
Linus,
please pull the latest core/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-urgent-2022-05-08
up to: 2667ed10d9f0: mm: Fix PASID use-after-free issue
A single bugfix for the PASID management code, which freed the PASID too early. The PASID needs to be tied to the mm lifetime, not to the address space lifetime.
Thanks,
tglx
------------------>
Fenghua Yu (1):
mm: Fix PASID use-after-free issue
kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/fork.c +1 -1
@@ -792,6 +792,7 @@ void __mmdrop(struct mm_struct *mm)mmu_notifier_subscriptions_destroy (mm);check_mm (mm);put_user_ns (mm->user_ns); +mm_pasid_drop (mm);free_mm (mm); }EXPORT_SYMBOL_GPL (__mmdrop);
@@ -1190,7 +1191,6 @@ static inline void __mmput(struct mm_struct *mm) }if (mm->binfmt)module_put (mm->binfmt->module); -mm_pasid_drop (mm);mmdrop (mm); }
[GIT pull] irq/urgent for v5.18-rc6
Linus,
please pull the latest irq/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2022-05-08
up to: 8707898e22fd: genirq: Synchronize interrupt thread startup
A fix for the threaded interrupt core. A quick sequence of request/free_irq() can result in a hang because the interrupt thread did not reach the thread function and got stopped in the kthread core already. That leaves a state active counter arround which makes a invocation of synchronized_irq() on that interrupt hang forever. Ensure that the thread reached the thread function in request_irq() to prevent that.
Thanks,
tglx
------------------>
Thomas Pfaff (1):
genirq: Synchronize interrupt thread startup
kernel/irq/internals.h | 2 ++ kernel/irq/irqdesc.c | 2 ++ kernel/irq/manage.c | 39 +++++++++++++++++++++++++++++---------- 3 files changed, 33 insertions(+), 10 deletions(-)
kernel/irq/internals.h +2 -0
@@ -29,12 +29,14 @@ extern struct irqaction chained_action;* IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed * IRQTF_AFFINITY - irq thread is requested to adjust affinity * IRQTF_FORCED_THREAD - irq action is force threaded +* IRQTF_READY - signals that irq thread is ready */ enum {IRQTF_RUNTHREAD ,IRQTF_WARNED ,IRQTF_AFFINITY ,IRQTF_FORCED_THREAD , +IRQTF_READY , };/*
kernel/irq/irqdesc.c +2 -0
@@ -407,6 +407,7 @@ static struct irq_desc *alloc_desc(int irq, int node, unsigned int flags,lockdep_set_class (&desc->lock, &irq_desc_lock_class);mutex_init (&desc->request_mutex);init_rcu_head (&desc->rcu); +init_waitqueue_head (&desc->wait_for_threads);desc_set_defaults (irq, desc, node, affinity, owner);irqd_set (&desc->irq_data, flags);
@@ -575,6 +576,7 @@ int __init early_irq_init(void)raw_spin_lock_init (&desc[i].lock);lockdep_set_class (&desc[i].lock, &irq_desc_lock_class);mutex_init (&desc[i].request_mutex); +init_waitqueue_head (&desc[i].wait_for_threads);desc_set_defaults (i, &desc[i], node,NULL ,NULL ); }return arch_early_irq_init ();
kernel/irq/manage.c +29 -10
@@ -1248,6 +1248,31 @@ static void irq_wake_secondary(struct irq_desc *desc, struct irqaction *action)raw_spin_unlock_irq (&desc->lock); } +/* +* Internal function to notify that a interrupt thread is ready. +*/ +static void irq_thread_set_ready (struct irq_desc *desc, +struct irqaction *action) +{ +set_bit (IRQTF_READY , &action->thread_flags); +wake_up (&desc->wait_for_threads); +} + +/* +* Internal function to wake up a interrupt thread and wait until it is +* ready. +*/ +static void wake_up_and_wait_for_irq_thread_ready (struct irq_desc *desc, +struct irqaction *action) +{ +if (!action || !action->thread) +return ; + +wake_up_process (action->thread); +wait_event (desc->wait_for_threads, +test_bit (IRQTF_READY , &action->thread_flags)); +} +/* * Interrupt handler thread */
@@ -1259,6 +1284,8 @@ static int irq_thread(void *data)irqreturn_t (*handler_fn)(struct irq_desc *desc,struct irqaction *action); +irq_thread_set_ready (desc, action); +sched_set_fifo (current); if (force_irqthreads() && test_bit(IRQTF_FORCED_THREAD,
@@ -1683,8 +1710,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) }if (!shared) { -init_waitqueue_head (&desc->wait_for_threads); -/* Setup the type (level, edge polarity) if configured: */ if (new->flags &IRQF_TRIGGER_MASK ) { ret = __irq_set_trigger(desc,
@@ -1780,14 +1805,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)irq_setup_timings (desc, new); -/* -* Strictly no need to wake it up, but hung_task complains -* when no hard interrupt wakes the thread up. -*/ -if (new->thread) -wake_up_process (new->thread); -if (new->secondary) -wake_up_process (new->secondary->thread); +wake_up_and_wait_for_irq_thread_ready (desc, new); +wake_up_and_wait_for_irq_thread_ready (desc, new->secondary);register_irq_proc (irq, desc); new->dir =NULL ;
Re: [GIT pull] irq/urgent for v5.18-rc6
The pull request you sent on Sun, 8 May 2022 14:05:21 +0200 (CEST):
The pull request you sent on Sun, 8 May 2022 14:05:21 +0200 (CEST):
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitirq-urgent-2022-05-08
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/9692df0581eae29abcc925ca3c12babc6c194741
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
[GIT pull] locking/urgent for v5.18-rc6
In reply to Thomas GleixnerLinus,
please pull the latest locking/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-2022-05-08
up to: 60cc5468daae: futex: MAINTAINERS, .mailmap: Update André's email address
Just a email address update for MAINTAINERS and mailmap.
Thanks,
tglx
------------------>
André Almeida (1):
futex: MAINTAINERS, .mailmap: Update André's email address
.mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
.mailmap +1 -0
@@ -45,6 +45,7 @@ Andrey Konovalov <[email protected]> <[email protected]> Andrey Ryabinin <[email protected]> <[email protected]> Andrey Ryabinin <[email protected]> <[email protected]> Andrzej Hajda <[email protected]> <[email protected]> +André Almeida <[email protected]> <[email protected]> Andy Adamson <[email protected]> Antoine Tenart <[email protected]> <[email protected]> Antoine Tenart <[email protected]> <[email protected]>
MAINTAINERS +1 -1
@@ -8109,7 +8109,7 @@ M: Ingo Molnar <[email protected]> R: Peter Zijlstra <[email protected]> R: Darren Hart <[email protected]> R: Davidlohr Bueso <[email protected]> -R: André Almeida <[email protected]> +R: André Almeida <[email protected]> L: [email protected] S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
Re: [GIT pull] locking/urgent for v5.18-rc6
The pull request you sent on Sun, 8 May 2022 14:05:22 +0200 (CEST):
The pull request you sent on Sun, 8 May 2022 14:05:22 +0200 (CEST):
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitlocking-urgent-2022-05-08
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ede4c6d78a32f9b7dfdb12d5edf8c8c4c84c729a
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
[GIT pull] timers/urgent for v5.18-rc6
In reply to Thomas GleixnerLinus,
please pull the latest timers/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-2022-05-08
up to: 2c33d775ef4c: timekeeping: Mark NMI safe time accessors as notrace
A fix and an email address update:
- Mark the NMI safe time accessors notrace to prevent tracer recursion when they are selected as trace clocks.
- John Stultz has a new email address
Thanks,
tglx
------------------>
John Stultz (1):
MAINTAINERS: Update email address for John Stultz
Kurt Kanzenbach (1):
timekeeping: Mark NMI safe time accessors as notrace
MAINTAINERS | 8 ++++---- kernel/time/timekeeping.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
MAINTAINERS +4 -4
@@ -5914,7 +5914,7 @@ R: Benjamin Gaignard <[email protected]> R: Liam Mark <[email protected]> R: Laura Abbott <[email protected]> R: Brian Starkey <[email protected]> -R: John Stultz <[email protected]> +R: John Stultz <[email protected]> L: [email protected] L: [email protected] L: [email protected] (moderated for non-subscribers)
@@ -6584,7 +6584,7 @@ F: drivers/gpu/drm/gma500/ DRM DRIVERS FOR HISILICON M: Xinliang Liu <[email protected]> M: Tian Tao <[email protected]> -R: John Stultz <[email protected]> +R: John Stultz <[email protected]> R: Xinwei Kong <[email protected]> R: Chen Feng <[email protected]> L: [email protected]
@@ -8845,7 +8845,7 @@ F: Documentation/devicetree/bindings/net/hisilicon*.txt F: drivers/net/ethernet/hisilicon/ HIKEY960 ONBOARD USB GPIO HUB DRIVER -M: John Stultz <[email protected]> +M: John Stultz <[email protected]> L: [email protected] S: Maintained F: drivers/misc/hisi_hikey_usb.c
@@ -19784,7 +19784,7 @@ F: drivers/net/wireless/ti/ F: include/linux/wl12xx.h TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER -M: John Stultz <[email protected]> +M: John Stultz <[email protected]> M: Thomas Gleixner <[email protected]> R: Stephen Boyd <[email protected]> L: [email protected]
kernel/time/timekeeping.c +2 -2
@@ -482,7 +482,7 @@ static __always_inline u64 __ktime_get_fast_ns(struct tk_fast *tkf)* of the following timestamps. Callers need to be aware of that and * deal with it. */ -u64 ktime_get_mono_fast_ns (void ) +u64 notrace ktime_get_mono_fast_ns(void) {return __ktime_get_fast_ns (&tk_fast_mono); }
@@ -494,7 +494,7 @@ EXPORT_SYMBOL_GPL(ktime_get_mono_fast_ns);* Contrary to ktime_get_mono_fast_ns() this is always correct because the * conversion factor is not affected by NTP/PTP correction. */ -u64 ktime_get_raw_fast_ns (void ) +u64 notrace ktime_get_raw_fast_ns(void) {return __ktime_get_fast_ns (&tk_fast_raw); }
Re: [GIT pull] timers/urgent for v5.18-rc6
The pull request you sent on Sun, 8 May 2022 14:05:24 +0200 (CEST):
The pull request you sent on Sun, 8 May 2022 14:05:24 +0200 (CEST):
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gittimers-urgent-2022-05-08
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ea82593bad9a77f6f14c9701c13ff7368b22f027
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
[GIT pull] x86/urgent for v5.18-rc6
In reply to Thomas GleixnerLinus,
please pull the latest x86/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2022-05-08
up to: 59f5ede3bc0f: x86/fpu: Prevent FPU state corruption
A fix and an email address update:
- Prevent FPU state corruption. The condition in irq_fpu_usable() grants FPU usage when the FPU is not used in the kernel. That's just wrong as it does not take the fpregs_lock()'ed regions into account. If FPU usage happens within such a region from interrupt context, then the FPU state gets corrupted. That's a long standing bug, which got unearthed by the recent changes to the random code.
- Josh wants to use his kernel.org email address
Thanks,
tglx
------------------>
Josh Poimboeuf (1):
MAINTAINERS: Update Josh Poimboeuf's email address
Thomas Gleixner (1):
x86/fpu: Prevent FPU state corruption
MAINTAINERS | 10 +++---- arch/x86/kernel/fpu/core.c | 67 ++++++++++++++++++---------------------------- 2 files changed, 31 insertions(+), 46 deletions(-)
MAINTAINERS +5 -5
@@ -7499,7 +7499,7 @@ F: Documentation/hwmon/f71805f.rst F: drivers/hwmon/f71805f.c FADDR2LINE -M: Josh Poimboeuf <[email protected]> +M: Josh Poimboeuf <[email protected]> S: Maintained F: scripts/faddr2line
@@ -11348,7 +11348,7 @@ F: drivers/mmc/host/litex_mmc.c N: litex LIVE PATCHING -M: Josh Poimboeuf <[email protected]> +M: Josh Poimboeuf <[email protected]> M: Jiri Kosina <[email protected]> M: Miroslav Benes <[email protected]> M: Petr Mladek <[email protected]>
@@ -14224,7 +14224,7 @@ F: lib/objagg.c F: lib/test_objagg.c OBJTOOL -M: Josh Poimboeuf <[email protected]> +M: Josh Poimboeuf <[email protected]> M: Peter Zijlstra <[email protected]> S: Supported F: tools/objtool/
@@ -18792,7 +18792,7 @@ F: include/dt-bindings/reset/starfive-jh7100.h STATIC BRANCH/CALL M: Peter Zijlstra <[email protected]> -M: Josh Poimboeuf <[email protected]> +M: Josh Poimboeuf <[email protected]> M: Jason Baron <[email protected]> R: Steven Rostedt <[email protected]> R: Ard Biesheuvel <[email protected]>
@@ -21444,7 +21444,7 @@ F: arch/x86/kernel/apic/x2apic_uv_x.c F: arch/x86/platform/uv/ X86 STACK UNWINDING -M: Josh Poimboeuf <[email protected]> +M: Josh Poimboeuf <[email protected]> M: Peter Zijlstra <[email protected]> S: Supported F: arch/x86/include/asm/unwind*.h
arch/x86/kernel/fpu/core.c +26 -41
85 lines not on this page · raw message
Re: [GIT pull] x86/urgent for v5.18-rc6
The pull request you sent on Sun, 8 May 2022 14:07:12 +0200 (CEST):
The pull request you sent on Sun, 8 May 2022 14:07:12 +0200 (CEST):
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitx86-urgent-2022-05-08
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/27b5d61c0c0c4ba347b514ade27f7919b032778e
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
Quoted 4 lines · Thomas Gleixner
A single bugfix for the PASID management code, which freed the PASID too early. The PASID needs to be tied to the mm lifetime, not to the address space lifetime.
So I have to once more complain about the -tip tree "Link:" usage.
Again, the commit has a link to the patch *submission*, which is almost entirely useless. There's no link to the actual problem the patch fixes.
It does have a "Fixes:" link, and it has an "explanation", but the explanation doesn't actually make much sense to me.
The *sensible* thing for an iommu driver to do is to just do a mmget/mmput, and then the whole "drop PASIX on last mmput() (ie in __mmput)" makes lots of sense.
The commit claims that's not what the iommu drivers do, but it's really hard to tell *what* it is that does a mmgrab. It just says
"the IOMMU driver holds a reference on the mm itself, not the address space"
but then I tried to see where such references are held, and I couldn't find it.
*Must* users do mmget/mmput, and the commit even says that's the logical thing to do. Apparently something that the iommu code relies on does the mmgrab/mmdrop thing, but I really would have liked to know what that is.
Yes, "mmgab" is the right thing to do if all you want is the "struct mm_struct", and don't actually care about the page tables themselves, and don't want to have the refcount keep page tables alive. But you'd think the iommu code really does want the page tables.
So it would have been really nice to have an explanation for what it was that did the mmgrab, especially since the commit itself makes it clear that the logical thing to do seems to be just mmget/put. No?
I _really_ wish the -tip tree had more links to the actual problem reports and explanations, rather than links to the patch submission.
One has the actual issue. The other just has the information that is already in the commit, and the "Link:" adds almost no actual value (yes, yes, you can see late "Acked-by" etc, but that really isn't worth it).
I've pulled this, because I definitely believe the issue is real. I just wish I could see _what_ the issue was.
Put another way: I can see that
in the commit, but I don't have a clue what the actual report was, and there really isn't enough information in the commit itself, except for a fairly handwavy "Device drivers might, for instance, still need to flush operations.."
I don't want to know what device drivers _might_ do. I would want to have an actual pointer to what they do and where.
I suspect it's related to mmu_notifiers or something, but I really would have liked a more exact "this is where things go wrong".
I also *suspect* that this is all about that _loong_ thread (picking one email almost at random) here:
https://lore.kernel.org/all/[email protected]/
but if so, the confusion I see in that thread is even more reason to have more background for what is going on.
Anyway, this is merged in my tree, but I'm having trouble following the logic, which is why I'm writing this long email to complain about lack of context.
Linus
Quoted 3 lines · Linus Torvalds
I suspect it's related to
mmu_notifiersor something, but I really would have liked a more exact "this is where things go wrong".
Looks like it is
->(*sva_bind)()
-> intel_svm_bind_mm()
-> mmu_notifier_register(&svm->notifier, mm)and yes, the mmu notifiers annoyingly end up doing an mmgrab, because they actually don't want to affect the state of mm teardown, they just want to be notified about it.
Annoying, but it seems to explain the issue if I followed this right.
Unlike the commit message.
Linus
Quoted 8 lines · Linus Torvalds
Looks like it is
->(*sva_bind)()
-> intel_svm_bind_mm() -> mmu_notifier_register(&svm->notifier, mm)and yes, the mmu notifiers annoyingly end up doing an mmgrab [..]
Side note: quite independently of this mmgrab issue, I think the code in question is *very* suspect and horrendously fragile.
In particular, the code ends up being called through things like this:
handle = iommu_sva_bind_device(uacce->parent, current->mm, NULL);
and then that Intel svm.c code does this:
svm->pasid = mm->pasid;
svm->mm = mm;
svm->flags = flags;and saves off that mm pointer in the 'svm' structure.
AND IT NEVER TAKES ANY REFERENCE TO IT AT ALL!
It then does
mm = svm->mm;
later at some unspecified time, and the 'mm' might long since have died.
In other words, the code works almost by accident - the only user of the 'mm' pointer seems to be that mmu_notifier_register() thing, so it basically treats the 'struct mm_struct' as something as a random cookie.
And yes, the mmu notifiers do then take that mmgrab reference to the mm, so it all works.
But it sure looks horrendously ugly. Saving off a 'struct mm_struct' pointer with having basically an accidental reference to it is WRONG.
In fact, it will save off that pointer whether it then actually does the mmu_notifier thing on it, because the code actually does
[...]
svm->mm = mm;
svm->flags = flags;
INIT_LIST_HEAD_RCU(&svm->devs);
if (!(flags & SVM_FLAG_SUPERVISOR_MODE)) {
svm->notifier.ops = &intel_mmuops;
ret = mmu_notifier_register(&svm->notifier, mm);
[...]so that mmu_notifier_register() call is conditional. On the freeing path, it then uses that "svm->notifier.ops" pointer as a "did we register this thing or not" flag, so again - it all technically *works*, but this is all horrendously ugly and wrong on so many levels, keeping pointers around with very dubious reference counting indeed.
Linus
Hi,
Quoted 5 lines · Linus Torvalds
And yes, the mmu notifiers do then take that mmgrab reference to the mm, so it all works.
But it sure looks horrendously ugly. Saving off a 'struct
mm_struct' pointer with having basically an accidental reference to it is WRONG.
Yes it is fragile. We're currently reworking iommu_sva_bind_device() to factor more code into the IOMMU core and to add explicit mmgrab/mmdrop, so once this lands we won't depend on mmu_notifier_register() anymore to hold the mm reference.
https://lore.kernel.org/linux-iommu/[email protected]/
Thanks,
Jean
Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
In reply to Linus TorvaldsQuoted 7 lines · Linus Torvalds
Quoted 4 lines · Thomas Gleixner
A single bugfix for the PASID management code, which freed the PASID too early. The PASID needs to be tied to the mm lifetime, not to the address space lifetime.
So I have to once more complain about the -tip tree "Link:" usage.
Many thx for reminding people about the tag. FWIW, that's a problem in a lot or subsystems and makes my regression tracking efforts hard, as my tracking bot relies on the 'Link:' tag. If it's missing I thus have to manually search if patches were posted or committed to fix a regression, which makes the tracking hard and annoying. :-/
Quoted 3 lines
Again, the commit has a link to the patch *submission*, which is almost entirely useless. There's no link to the actual problem the patch fixes.
It seems quite a few developers are under the impressions that "Link:" is just for the patch submission and not to be used for other things. That's why some people invented other tags. I see "BugLink" quite often these days, but there are also other tags in use (some drm people used "References:" for a while).
Do we care? Should we try to clean this up while making things a bit more straight forward at the same time by making it more obvious what a link is actually about? I once suggested we use something like
* "Submitted:" or "Posted:" for the patch submission
* "Reported:" or "BugLink:" for any reports that lead to the
That would leave "Link:" ambiguous and usable for anything else (and b4 likely could be fixed easily to set a different tag; but sure, there would be a transition period).
But there was not much feedback on the idea. Do you think I should pick up this again? Or is this something I should bring up during this years kernel summit?
Quoted 3 lines
[...]
Put another way: I can see thatReported-by Zhangfei Gao <[email protected]>
With a "Reported:" tag like mentioned above we could stop using "Reported-by:" if we wanted to reduce the overhead (or make it optional). But OTOH I guess it's a bad idea, as having this in there will motivate some people to submit reports. And is good for stats reg. syzbot and 0-day (but I guess those could be generated from proper links, too).
BTW: Documentation/process/5.Posting.rst states '''Be careful in the addition of tags to your patches: only Cc: is appropriate for addition without the explicit permission of the person named.''' Is that actually true? A lot of people seem to set "Reported-by:" without getting explicit permission. If that is fine I'd prepare a patch to fix the docs.
Ciao, Thorsten
Borislav Petkov
maintainerRe: Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
Quoted 5 lines · Thorsten Leemhuis
Many thx for reminding people about the tag. FWIW, that's a problem in a lot or subsystems and makes my regression tracking efforts hard, as my tracking bot relies on the 'Link:' tag. If it's missing I thus have to manually search if patches were posted or committed to fix a regression, which makes the tracking hard and annoying. :-/
Here's my experience with the Link thing:
So it is trivial to take the Message-ID and turn it into a link tag and our automation does that.
- Now, it is not a problem when that link tag points to a patch which is part of the thread which contains the initial bug report - you just go up-thread.
- If the link tag points to a patch which is version N and it is the version which passed all review and gets committed, it is a bit harder to find the previous versions and find the whole discussion how it all arrived at version N. You can search by the Subject, ofc, which, if it hasn't been changed, will give you the previous threads. And so on ...
- The problem is when the discussion happened somewhere and the patch got submitted separately. I can't think of a good way to automate that so we have to pay attention and fix the link tag by hand and add the relevant one. And I try to do that when I'm especially awake when applying the patch.
So I think we should simply pay attention to making sure the link tags point to the relevant discussion. And we even document that:
"If related discussions or any other background information behind the change can be found on the web, add 'Link:' tags pointing to it."
so we better follow through with it.
:-)
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteRe: Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
Quoted 22 lines · Borislav Petkov
Quoted 5 lines · Thorsten Leemhuis
Many thx for reminding people about the tag. FWIW, that's a problem in a lot or subsystems and makes my regression tracking efforts hard, as my tracking bot relies on the 'Link:' tag. If it's missing I thus have to manually search if patches were posted or committed to fix a regression, which makes the tracking hard and annoying. :-/
Here's my experience with the Link thing:
So it is trivial to take the Message-ID and turn it into a link tag and our automation does that.
- Now, it is not a problem when that link tag points to a patch which is part of the thread which contains the initial bug report - you just go up-thread.
- If the link tag points to a patch which is version N and it is the version which passed all review and gets committed, it is a bit harder to find the previous versions and find the whole discussion how it all arrived at version N. You can search by the Subject, ofc, which, if it hasn't been changed, will give you the previous threads. And so on ...
Quoted 5 lines
- The problem is when the discussion happened somewhere and the patch got submitted separately. I can't think of a good way to automate that so we have to pay attention and fix the link tag by hand and add the relevant one. And I try to do that when I'm especially awake when applying the patch.
That doesn't scale though, it puts more work on maintainers, who already don't have enough time.
The *submitter* should be putting all the relevant info in the patch, including any links to other discussions, previous versions etc. etc.
Then the maintainer can automatically add the "Link:" tag pointing to the submission, and everything is there in the archive.
One advantage of linking back to the original submission is that if the patch doesn't have all the relevant info, anyone can post replies adding context or linking to other places, even after the patch has been committed.
cheers
Re: Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
In reply to Borislav PetkovQuoted 5 lines · Borislav Petkov
- The problem is when the discussion happened somewhere and the patch got submitted separately. I can't think of a good way to automate that so we have to pay attention and fix the link tag by hand and add the relevant one. And I try to do that when I'm especially awake when applying the patch.
I would argue that it should be the patch submitter's responsibility to explicitly add a URL to the problem report. In some cases this might be a pointer to a bug tracking system; in other cases it might be a URL to lore.kernel.org.
- Ted
Re: Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
Quoted 3 lines · Theodore Ts'o
I would argue that it should be the patch submitter's responsibility to explicitly add a URL to the problem report.
I agree in the perfect case.
But in practice, we have a lot more patch submitters than we have maintainers, and not all "leaf developers" necessarily know how to do everything.
So the maintainer should probably expect to fix things up. Not always, but also not a "the developer should have done this, so I won't do it"
This isn't so different from the fact that not everybody writes English proficiently - people do hopefully end up fixing things up as they get passed onwards.
Linus
Borislav Petkov
maintainerRe: Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
Quoted 11 lines · Linus Torvalds
Quoted 3 lines · Theodore Ts'o
I would argue that it should be the patch submitter's responsibility to explicitly add a URL to the problem report.
I agree in the perfect case.
But in practice, we have a lot more patch submitters than we have maintainers, and not all "leaf developers" necessarily know how to do everything.
Quoted 6 lines
So the maintainer should probably expect to fix things up. Not always, but also not a "the developer should have done this, so I won't do it"
This isn't so different from the fact that not everybody writes English proficiently - people do hopefully end up fixing things up as they get passed onwards.
And, in addition, what happens most often in my experience is I constantly get to point submitters to our process documentation - submitting-patches especially - as not a small number of them are not aware of different aspects of the whole patch dance: tags, SOB chains, etc. And the Link tag is no exception here.
So yeah, the maintainer is kinda the last one to make sure the patch looks somewhat sane and documents the whole issue so that years from now, it can still be understood what we were fixing there.
And I guess important part of that documentation is setting the proper Link so...
And as said, yeah, we won't be perfect and catch all cases but at least we can pay attention.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteRe: Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
Quoted 19 lines · Borislav Petkov
Quoted 11 lines · Linus Torvalds
Quoted 3 lines · Theodore Ts'o
I would argue that it should be the patch submitter's responsibility to explicitly add a URL to the problem report.
I agree in the perfect case.
But in practice, we have a lot more patch submitters than we have maintainers, and not all "leaf developers" necessarily know how to do everything.
Quoted 6 lines
So the maintainer should probably expect to fix things up. Not always, but also not a "the developer should have done this, so I won't do it"
This isn't so different from the fact that not everybody writes English proficiently - people do hopefully end up fixing things up as they get passed onwards.
Quoted 5 lines
And, in addition, what happens most often in my experience is I constantly get to point submitters to our process documentation - submitting-patches especially - as not a small number of them are not aware of different aspects of the whole patch dance: tags, SOB chains, etc. And the Link tag is no exception here.
Which leads to the question: can we (and do we want to) teach scripts/checkpatch.pl to point out when a Link: tag is missing and likely appropriate? If a "Reported-by:" is present there should be a "Link:" as well, unless the issue was reported privately, via IRC or something like that. A "Fixes:" tag is also a strong indicator that a link might be appropriate, but not as good.
Ciao, Thorsten
Borislav Petkov
maintainerRe: Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
Quoted 6 lines · Thorsten Leemhuis
Which leads to the question: can we (and do we want to) teach
scripts/checkpatch.plto point out when a Link: tag is missing and likely appropriate? If a "Reported-by:" is present there should be a "Link:" as well, unless the issue was reported privately, via IRC or something like that. A "Fixes:" tag is also a strong indicator that a link might be appropriate, but not as good.
All good ideas, sure.
At least pointing it out as a hint - not necessarily as a warning - would be a good idea. And say, "hey, and while you're adding a Link tag, pls make sure it points to the mail which has the most relevant discussion on the matter your patch is fixing."
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteRe: Link: tag and links to submission and reports (was: Re: [GIT pull] core/urgent for v5.18-rc6)
In reply to Linus TorvaldsQuoted 5 lines · Linus Torvalds
Quoted 3 lines · Theodore Ts'o
I would argue that it should be the patch submitter's responsibility to explicitly add a URL to the problem report.
Quoted 8 lines
I agree in the perfect case.
But in practice, we have a lot more patch submitters than we have maintainers, and not all "leaf developers" necessarily know how to do everything.
So the maintainer should probably expect to fix things up. Not always, but also not a "the developer should have done this, so I won't do it"
Sure... but *because* maintainers are significantly outnumbered by the patch submitters, what we should document is that it is the developer's responsibility to provide the link, just as it is the developer's responsibility to at least *try* to write a clear commit description.
Quoted 3 lines
This isn't so different from the fact that not everybody writes English proficiently - people do hopefully end up fixing things up as they get passed onwards.
Maintainers can be the backstop, sure, but if we are trying to make Maintainers scale well, developers should at least feel obligated to **try** to lighten the load on maintainers to the limits of their ability.
And I have a bit more sympathy over someone who doesn't speak English as their first language, over someone who can't be bothered to look up a bug report link or a Syzkaller ID.
I guess we could always NACK such a patch until they provide that information, but if it's for a critical bug fix, that's not necessarily a good alternative either. I guess that's why the Maintainers get paid the big bucks....
- Ted
The pull request you sent on Sun, 8 May 2022 14:05:19 +0200 (CEST):
The pull request you sent on Sun, 8 May 2022 14:05:19 +0200 (CEST):
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitcore-urgent-2022-05-08
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/1f8c5dff000d96b66273a0bf57dbf4d505c730cc
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html