All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] /dev/[k]mem: make reads and writes interruptible
@ 2022-04-07  0:13 Jason A. Donenfeld
  2022-04-07  8:14 ` David Hildenbrand
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-04-07  0:13 UTC (permalink / raw)
  To: linux-kernel, gregkh; +Cc: Jason A. Donenfeld, Tetsuo Handa

In 8619e5bdeee8 ("/dev/mem: Bail out upon SIGKILL."), /dev/[k]mem became
killable, and that commit noted:

  Theoretically, reading/writing /dev/mem and /dev/kmem can become
  "interruptible". But this patch chose "killable". Future patch will
  make them "interruptible" so that we can revert to "killable" if
  some program regressed.

So now we take the next step in making it "interruptible", by changing
fatal_signal_pending() into signal_pending().

Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 drivers/char/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index cc296f0823bd..84ca98ed1dad 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -101,7 +101,7 @@ static inline bool should_stop_iteration(void)
 {
 	if (need_resched())
 		cond_resched();
-	return fatal_signal_pending(current);
+	return signal_pending(current);
 }
 
 /*
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] /dev/[k]mem: make reads and writes interruptible
  2022-04-07  0:13 [PATCH] /dev/[k]mem: make reads and writes interruptible Jason A. Donenfeld
@ 2022-04-07  8:14 ` David Hildenbrand
  2022-04-07 12:26   ` [PATCH v2] /dev/mem: " Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: David Hildenbrand @ 2022-04-07  8:14 UTC (permalink / raw)
  To: Jason A. Donenfeld, linux-kernel, gregkh; +Cc: Tetsuo Handa

On 07.04.22 02:13, Jason A. Donenfeld wrote:
> In 8619e5bdeee8 ("/dev/mem: Bail out upon SIGKILL."), /dev/[k]mem became
> killable, and that commit noted:
> 
>   Theoretically, reading/writing /dev/mem and /dev/kmem can become
>   "interruptible". But this patch chose "killable". Future patch will
>   make them "interruptible" so that we can revert to "killable" if
>   some program regressed.
> 
> So now we take the next step in making it "interruptible", by changing
> fatal_signal_pending() into signal_pending().

/dev/kmem is no more. So this should only apply to /dev/mem nowadays.


-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] /dev/mem: make reads and writes interruptible
  2022-04-07  8:14 ` David Hildenbrand
@ 2022-04-07 12:26   ` Jason A. Donenfeld
  0 siblings, 0 replies; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-04-07 12:26 UTC (permalink / raw)
  To: linux-kernel, gregkh; +Cc: david, Jason A. Donenfeld, Tetsuo Handa

In 8619e5bdeee8 ("/dev/mem: Bail out upon SIGKILL."), /dev/mem became
killable, and that commit noted:

  Theoretically, reading/writing /dev/mem and /dev/kmem can become
  "interruptible". But this patch chose "killable". Future patch will
  make them "interruptible" so that we can revert to "killable" if
  some program regressed.

So now we take the next step in making it "interruptible", by changing
fatal_signal_pending() into signal_pending().

Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
Changes v1->v2:
- The commit message mentions only /dev/mem now, not /dev/kmem which was
  removed.

 drivers/char/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index cc296f0823bd..84ca98ed1dad 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -101,7 +101,7 @@ static inline bool should_stop_iteration(void)
 {
 	if (need_resched())
 		cond_resched();
-	return fatal_signal_pending(current);
+	return signal_pending(current);
 }
 
 /*
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-07 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  0:13 [PATCH] /dev/[k]mem: make reads and writes interruptible Jason A. Donenfeld
2022-04-07  8:14 ` David Hildenbrand
2022-04-07 12:26   ` [PATCH v2] /dev/mem: " Jason A. Donenfeld

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.