From: Michael Schmitz <schmitzmic@gmail.com>
To: Greg Ungerer <gerg@linux-m68k.org>, Finn Thain <fthain@linux-m68k.org>
Cc: linux-m68k@vger.kernel.org, geert@linux-m68k.org,
linux-m68k@lists.linux-m68k.org
Subject: Re: [PATCH v4 1/2] m68k: Handle __generic_copy_to_user faults more carefully
Date: Thu, 8 Aug 2024 18:58:05 +1200 [thread overview]
Message-ID: <05cd1710-4422-aef5-5bed-8b5968069a4d@gmail.com> (raw)
In-Reply-To: <ae5facc5-4b10-481b-9f76-f9b007309d8f@linux-m68k.org>
Hi Greg,
Am 08.08.2024 um 18:05 schrieb Greg Ungerer:
> Hi Michael, Finn,
>
> On 8/8/24 11:57, Finn Thain wrote:
>>
>> Hello Michael
>>
>> On Thu, 8 Aug 2024, Michael Schmitz wrote:
>>
>>>> Well, that __clear_user() bug is no longer theoretical. I accidentally
>>>> bumped into it when I sent a ^C to a shell script I wrote to test some
>>>> mac_scsi driver patches...
>>
>> ...
>>
>>>
>>> I'm afraid I've lost track of where we're at with this patch series.
>>> Does it need more work, or more bug reports such as the one below?
>>
>> Apparently the series is waiting for some testing on a Coldfire system
>> with MMU.
>
> Ok, I am in a state that I can do that now (I managed to fix my M5475EVB
> board).
> If I test the v4 versions of this patch set that should do the job?
Yes, v4 is the one to test.
I'll see that I can dig out my test code to reproduce the bug.
Thanks,
Michael
>
> Regards
> Greg
>
>
>
>>> The previous bug reports might be considered somewhat contrived but this
>>> one's from 'real' user space code, and none too complex at that?
>>>
>>
>> Right. That code was as follows. There's nothing here aimed at
>> arch/m68k/lib/uaccess.c in particular, just IO to a block device and a
>> tmpfs filesystem.
>>
>>
>> #!/bin/bash
>>
>> set -e -u
>>
>> filename=$1
>>
>> rand=/tmp/rand_test_data
>> zero=/tmp/zero_test_data
>> len=512K
>>
>> dd if=/dev/urandom of=$rand bs=$len count=1 2>/dev/null
>> dd if=/dev/zero of=$zero bs=$len count=1 2>/dev/null
>>
>> write() {
>> dd $args if=$orig of=$filename # oflag=direct
>> }
>>
>> compare() {
>> echo 3 > /proc/sys/vm/drop_caches
>> if ! cmp -n $len $orig $filename ; then
>> diff -u <(hexdump -C < $orig) <(hexdump -C < $filename)
>> fi
>> }
>>
>> while true; do
>> for args in "bs=512k count=1" "bs=64k count=8" "bs=4k
>> count=128" "bs=512 count=1k" ; do
>> echo $args
>> orig=$rand ; write ; compare
>> orig=$zero ; write ; compare
>> sync
>> echo
>> done
>> done
next prev parent reply other threads:[~2024-08-08 6:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 3:09 [PATCH v4 0/2] m68k uaccess fault handling fixes Michael Schmitz
2024-04-29 3:09 ` [PATCH v4 1/2] m68k: Handle __generic_copy_to_user faults more carefully Michael Schmitz
2024-08-07 8:14 ` Finn Thain
2024-08-07 19:32 ` Michael Schmitz
2024-08-08 1:57 ` Finn Thain
2024-08-08 6:05 ` Greg Ungerer
2024-08-08 6:56 ` Finn Thain
2024-08-08 14:52 ` Greg Ungerer
2024-08-08 19:27 ` Michael Schmitz
2024-08-09 3:34 ` Finn Thain
2024-08-09 8:03 ` Michael Schmitz
2024-08-09 12:58 ` Greg Ungerer
2024-08-09 3:22 ` Finn Thain
2024-08-08 6:58 ` Michael Schmitz [this message]
2024-04-29 3:09 ` [PATCH v4 2/2] m68k: improve __constant_copy_to_user_asm() fault handling Michael Schmitz
2024-04-29 7:58 ` [PATCH v4 0/2] m68k uaccess fault handling fixes Greg Ungerer
2024-04-29 8:08 ` Geert Uytterhoeven
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=05cd1710-4422-aef5-5bed-8b5968069a4d@gmail.com \
--to=schmitzmic@gmail.com \
--cc=fthain@linux-m68k.org \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-m68k@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox