All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Leon Hwang <leon.hwang@linux.dev>
Cc: linux-mm@kvack.org, "Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Liam R . Howlett" <liam@infradead.org>,
	"Lorenzo Stoakes" <ljs@kernel.org>,
	"Vlastimil Babka" <vbabka@kernel.org>,
	"Jann Horn" <jannh@google.com>,
	"Pedro Falcato" <pfalcato@suse.de>,
	"Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Douglas Anderson" <dianders@chromium.org>,
	"Gary Guo" <gary@garyguo.net>,
	"Anand Moon" <linux.amoon@gmail.com>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH] mm/mseal: fix mseal documentation for 32-bit kernels
Date: Sat, 4 Jul 2026 01:39:04 +0100	[thread overview]
Message-ID: <akhWKJSZLfDusVcL@casper.infradead.org> (raw)
In-Reply-To: <20260703022507.187457-1-leon.hwang@linux.dev>

On Fri, Jul 03, 2026 at 10:25:07AM +0800, Leon Hwang wrote:
> Document the -EINTR return from mmap_write_lock_killable(), fix the

No, you don't understand the whole concept of "killable".  If a
task receives a fatal signal, it dies before it returns to userspace.
So userspace never gets to see the -EINTR.  It's fine to document inside
the kernel that function foo() can return -EINTR, but it's pointless to
document it for userspace.

This is how "killable" differs from "interruptible".  Interruptible allows
non-fatal signals to wake a task, and then the task can see the -EINTR.
But many processes do not check the error code, and so read() and write()
(despite being documented as being able to return EINTR!)  do not do so
in practise.

WARNING: multiple messages have this Message-ID (diff)
From: Matthew Wilcox <willy@infradead.org>
To: Leon Hwang <leon.hwang@linux.dev>
Cc: linux-doc@vger.kernel.org,
	"Peter Zijlstra" <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	"Gary Guo" <gary@garyguo.net>,
	linux-riscv@lists.infradead.org,
	"Vlastimil Babka" <vbabka@kernel.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Jann Horn" <jannh@google.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Pedro Falcato" <pfalcato@suse.de>,
	"Lorenzo Stoakes" <ljs@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Liam R . Howlett" <liam@infradead.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Douglas Anderson" <dianders@chromium.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Paul Walmsley" <pjw@kernel.org>
Subject: Re: [PATCH] mm/mseal: fix mseal documentation for 32-bit kernels
Date: Sat, 4 Jul 2026 01:39:04 +0100	[thread overview]
Message-ID: <akhWKJSZLfDusVcL@casper.infradead.org> (raw)
In-Reply-To: <20260703022507.187457-1-leon.hwang@linux.dev>

On Fri, Jul 03, 2026 at 10:25:07AM +0800, Leon Hwang wrote:
> Document the -EINTR return from mmap_write_lock_killable(), fix the

No, you don't understand the whole concept of "killable".  If a
task receives a fatal signal, it dies before it returns to userspace.
So userspace never gets to see the -EINTR.  It's fine to document inside
the kernel that function foo() can return -EINTR, but it's pointless to
document it for userspace.

This is how "killable" differs from "interruptible".  Interruptible allows
non-fatal signals to wake a task, and then the task can see the -EINTR.
But many processes do not check the error code, and so read() and write()
(despite being documented as being able to return EINTR!)  do not do so
in practise.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2026-07-04  0:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03  2:25 [PATCH] mm/mseal: fix mseal documentation for 32-bit kernels Leon Hwang
2026-07-03  2:25 ` Leon Hwang
2026-07-03  9:30 ` Lance Yang
2026-07-03  9:30   ` Lance Yang
2026-07-03  9:44 ` Thomas Weißschuh
2026-07-03  9:44   ` Thomas Weißschuh
2026-07-03 15:09   ` Leon Hwang
2026-07-03 15:09     ` Leon Hwang
2026-07-07 10:34     ` Thomas Weißschuh
2026-07-07 10:34       ` Thomas Weißschuh
2026-07-03  9:44 ` Pedro Falcato
2026-07-03  9:44   ` Pedro Falcato
2026-07-03 14:50   ` Leon Hwang
2026-07-03 14:50     ` Leon Hwang
2026-07-07 10:01     ` Pedro Falcato
2026-07-07 10:01       ` Pedro Falcato
2026-07-04  0:39 ` Matthew Wilcox [this message]
2026-07-04  0:39   ` Matthew Wilcox
2026-07-06  1:42   ` Leon Hwang
2026-07-06  1:42     ` Leon Hwang

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=akhWKJSZLfDusVcL@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=aliceryhl@google.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=corbet@lwn.net \
    --cc=dianders@chromium.org \
    --cc=gary@garyguo.net \
    --cc=jannh@google.com \
    --cc=leon.hwang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux.amoon@gmail.com \
    --cc=ljs@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=pfalcato@suse.de \
    --cc=pjw@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=vbabka@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.