public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@linux-m68k.org>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: geert@linux-m68k.org, linux-m68k@lists.linux-m68k.org
Subject: Re: [PATCH RFC v2 1/2] m68k: Handle __generic_copy_to_user faults more carefully
Date: Fri, 26 Apr 2024 11:00:07 +1000 (AEST)	[thread overview]
Message-ID: <b9d281db-c06e-0eb3-0f49-b95f576a9891@linux-m68k.org> (raw)
In-Reply-To: <57b70e03-2672-4f27-87f9-481208173a20@gmail.com>


On Fri, 26 Apr 2024, Michael Schmitz wrote:

> Not sure you noticed this - the 040 passed __clear_user without fault. 
> We managed to test this one without meaning to. Exception handling in 
> there appears to work OK (for the cases we're testing).
> 
> No idea why you have the __clear_user call occur within 
> __generic_copy_to_user - it does not appear in my disassembly.
> 

I'm afraid I neglected to mention that I added the patch below in order to 
exercise that code path.

diff --git a/arch/m68k/lib/uaccess.c b/arch/m68k/lib/uaccess.c
index ef761fc10981..1c9a24a0b554 100644
--- a/arch/m68k/lib/uaccess.c
+++ b/arch/m68k/lib/uaccess.c
@@ -58,6 +58,8 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from,
 {
 	unsigned long tmp, res;
 
+	__clear_user(to, n);
+
 	asm volatile ("\n"
 		"	tst.l	%0\n"
 		"	jeq	5f\n"

  reply	other threads:[~2024-04-26  0:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  2:29 [PATCH RFC v2 0/2] m68k uaccess fault handling fixes Michael Schmitz
2024-04-22  2:29 ` [PATCH RFC v2 1/2] m68k: Handle __generic_copy_to_user faults more carefully Michael Schmitz
2024-04-25  4:16   ` Finn Thain
2024-04-25  5:32     ` Michael Schmitz
2024-04-25  6:32       ` Finn Thain
2024-04-25  7:52         ` Michael Schmitz
2024-04-25  5:45     ` Michael Schmitz
2024-04-25  6:47       ` Finn Thain
2024-04-25  7:43         ` Michael Schmitz
2024-04-25  8:20     ` Michael Schmitz
2024-04-25 19:15     ` Michael Schmitz
2024-04-26  1:00       ` Finn Thain [this message]
2024-04-26  1:22         ` Michael Schmitz
2024-04-26  7:10           ` Michael Schmitz
2024-04-26  7:57             ` Finn Thain
2024-04-26  8:31               ` Michael Schmitz
2024-04-26  7:58             ` Finn Thain
2024-04-27  1:44               ` Finn Thain
2024-04-27  4:41                 ` Michael Schmitz
2024-04-22  2:29 ` [PATCH RFC v2 2/2] m68k: improve __constant_copy_to_user_asm() fault handling Michael Schmitz

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=b9d281db-c06e-0eb3-0f49-b95f576a9891@linux-m68k.org \
    --to=fthain@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=schmitzmic@gmail.com \
    /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