From: Michael Schmitz <schmitzmic@gmail.com>
To: Finn Thain <fthain@linux-m68k.org>
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 07:15:09 +1200 [thread overview]
Message-ID: <57b70e03-2672-4f27-87f9-481208173a20@gmail.com> (raw)
In-Reply-To: <6fbf4809-dec2-84b9-3b83-86084ed19a20@linux-m68k.org>
Hi Finn,
On 25/04/24 16:16, Finn Thain wrote:
> 00464504 <__generic_copy_to_user>:
> 464504: 4e56 0000 linkw %fp,#0
> 464508: 2f03 movel %d3,%sp@-
> 46450a: 2f02 movel %d2,%sp@-
> 46450c: 262e 0008 movel %fp@(8),%d3
> 464510: 242e 0010 movel %fp@(16),%d2
> 464514: 2f02 movel %d2,%sp@-
> 464516: 2f03 movel %d3,%sp@-
> 464518: 4eb9 0046 44c6 jsr 4644c6 <__clear_user>
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.
Cheers,
Michael
> 46451e: 2002 movel %d2,%d0
> 464520: e488 lsrl #2,%d0
> 464522: 7203 moveq #3,%d1
> 464524: c282 andl %d2,%d1
> 464526: 226e 000c moveal %fp@(12),%a1
> 46452a: 2043 moveal %d3,%a0
> 46452c: 4a80 tstl %d0
> 46452e: 670a beqs 46453a <__generic_copy_to_user+0x36>
> 464530: 2419 movel %a1@+,%d2
> 464532: 0e98 2800 movesl %d2,%a0@+
> 464536: 5380 subql #1,%d0
> 464538: 66f6 bnes 464530 <__generic_copy_to_user+0x2c>
> 46453a: 0801 0001 btst #1,%d1
> 46453e: 6706 beqs 464546 <__generic_copy_to_user+0x42>
> 464540: 3419 movew %a1@+,%d2
> 464542: 0e58 2800 movesw %d2,%a0@+
> 464546: 0801 0000 btst #0,%d1
> 46454a: 6706 beqs 464552 <__generic_copy_to_user+0x4e>
> 46454c: 1419 moveb %a1@+,%d2
> 46454e: 0e18 2800 movesb %d2,%a0@+
> 464552: 242e fff8 movel %fp@(-8),%d2
> 464556: 262e fffc movel %fp@(-4),%d3
> 46455a: 4e5e unlk %fp
> 46455c: 4e75 rts
> 46455e: 4e75 rts
>
next prev parent reply other threads:[~2024-04-25 19:15 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 [this message]
2024-04-26 1:00 ` Finn Thain
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=57b70e03-2672-4f27-87f9-481208173a20@gmail.com \
--to=schmitzmic@gmail.com \
--cc=fthain@linux-m68k.org \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.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.