mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Mayank Rungta <mrungta@google.com>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>, Radu Rendec <radu@rendec.net>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	"Kirill A. Shutemov" <kas@kernel.org>,
	Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH v3 3/5] genirq: Export NMI APIs
Date: Fri, 04 Sep 2026 17:05:45 +0200	[thread overview]
Message-ID: <87y0dh6oqe.ffs@fw13> (raw)
In-Reply-To: <CAD=FV=VMExH-K68aDfNsFBnQRSaYSNwbHo7hLhpzhpWN+r+Fsw@mail.gmail.com>

On Fri, Sep 04 2026 at 07:07, Doug Anderson wrote:
> On Fri, Sep 4, 2026 at 2:29 AM Thomas Gleixner <tglx@kernel.org> wrote:
>> On Wed, Sep 02 2026 at 18:54, Mayank Rungta wrote:
>> > Currently, request_nmi(), free_nmi(), enable_nmi(), disable_nmi_nosync(),
>> > and disable_nmi() are restricted to built-in kernel code because they are
>> > not exported.
>> >
>> > Export these symbols with EXPORT_SYMBOL_GPL so loadable kernel modules can
>> > register and manage NMIs.
>>
>> I'm not really fond of that.
>
> Is this to be taken a NAK on the whole idea, then?
>
> The last patch in the series [1] wants to promote a HW watchdog bark
> interrupt to NMI. This seems like a pretty useful thing to do and an
> appropriate use of NMI, but the HW watchdog driver is a kernel module.
> Do you have another suggestion for solving that?

I understand the intent and why it might be a good idea, but letting
random modules convert interrupts into NMIs is a scary thought.

We can export it in a restricted way though to limit the exposure and
force people to go through a thorough review of these use cases.

That could be a subsystem restricted export or an explicit restriction
via EXPORT..FOR_MODULES().

>> Funny enough there is already a driver which claims it can be built as
>> module which uses these interfaces. Oh well...
>>
>> > Assisted-by: Antigravity:gemini
>>
>> I'm impressed that AI is required to add four EXPORT_SYMBOL_GPL()
>> instances.
>
> Hmm, I guess it's hard to figure out the guidance here. I think Mayank
> is only adding this tag to try match what's documented in
> `coding-assistants.rst`. If you've got an AI helping you with a
> series, it's pretty much touching all the patches. I guess you're
> suggesting that, even if AI touched it, trivial patches should remove
> the tag?

I really have no strong opinion about it. But it just amused me and I
couldn't help my self from commenting.

Thanks,

        tglx

  reply	other threads:[~2026-09-04 15:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  1:54 [PATCH v3 0/5] watchdog: qcom: Support NMI pretimeout warnings Mayank Rungta
2026-09-03  1:54 ` [PATCH v3 1/5] genirq: Synchronize in-flight handlers during NMI teardown Mayank Rungta
2026-09-04  9:17   ` Thomas Gleixner
2026-09-04 13:40     ` Marc Zyngier
2026-09-04 14:34       ` Doug Anderson
2026-09-04 14:57         ` Marc Zyngier
2026-09-04 14:59           ` Doug Anderson
2026-09-04 15:11       ` Thomas Gleixner
2026-09-04 15:26         ` Doug Anderson
2026-09-03  1:54 ` [PATCH v3 2/5] genirq: Implement synchronous disable_nmi() Mayank Rungta
2026-09-03  1:54 ` [PATCH v3 3/5] genirq: Export NMI APIs Mayank Rungta
2026-09-04  9:29   ` Thomas Gleixner
2026-09-04 14:07     ` Doug Anderson
2026-09-04 15:05       ` Thomas Gleixner [this message]
2026-09-05  1:52         ` Mayank Rungta
2026-09-03  1:54 ` [PATCH v3 4/5] watchdog: pretimeout: Protect governor access with RCU for NMI safety Mayank Rungta
2026-09-03  1:54 ` [PATCH v3 5/5] watchdog: qcom: Register pretimeout interrupt as NMI Mayank Rungta
2026-09-03  8:18   ` Konrad Dybcio
2026-09-03 20:58     ` Mayank Rungta
2026-09-04  7:37       ` Konrad Dybcio
2026-09-04 14:37       ` Doug Anderson
2026-09-05  1:24         ` Mayank Rungta

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=87y0dh6oqe.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=dianders@chromium.org \
    --cc=kas@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=maz@kernel.org \
    --cc=mrungta@google.com \
    --cc=radu@rendec.net \
    --cc=wim@linux-watchdog.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

all inboxes | Powered by JetHome®