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: linux-m68k@vger.kernel.org, geert@linux-m68k.org,
	gerg@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 11:57:14 +1000 (AEST)	[thread overview]
Message-ID: <de7c9ac4-cb6f-e2a4-59e4-26fd7e260d4e@linux-m68k.org> (raw)
In-Reply-To: <42dfdef0-88d1-4c15-b04b-174f12bd8f3f@gmail.com>


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.

> 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

  reply	other threads:[~2024-08-08  1:57 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 [this message]
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
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=de7c9ac4-cb6f-e2a4-59e4-26fd7e260d4e@linux-m68k.org \
    --to=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 \
    --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