All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 11/20] amifb: get rid of pointless access_ok() calls
Date: Thu, 14 May 2020 22:21:46 +0200	[thread overview]
Message-ID: <CAMuHMdV78Y2Y_vkvbs2nt5LjM7D9te3ozr71_o2uGoNHSK4u=Q@mail.gmail.com> (raw)
In-Reply-To: <20200514174131.GD23230@ZenIV.linux.org.uk>

Hi Al,

On Thu, May 14, 2020 at 7:43 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Thu, May 14, 2020 at 04:25:35PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > Thank you for in-detail explanations, for this patch:
> >
> > Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> >
> > Could you also please take care of adding missing checks for {get,put}_user()
> > failures later?
>
> Umm...  OK; put_user() side is trivial -  the interesting part is what to do
> about get_user() failures halfway through.  Right now it treats them as
> "we'd read zeroes".  On anything else I would say "screw it, memdup_user()
> the damn thing on the way in and copy from there", but... Amiga has how
> much RAM, again?

In theory, up to 3.5 GiB ;-)
In practice, 16 MiB is already a lot (mine has 12).

> OTOH, from my reading of that code it does appear to be limited to
> 4Kb of data to copy, so it's probably OK...  Hell knows - I'm really
> confused by those #ifdef __mc68000__ in there; the driver *is*
> amiga-only:
> obj-$(CONFIG_FB_AMIGA)            += amifb.o c2p_planar.o
> config FB_AMIGA
>         tristate "Amiga native chipset support"
>         depends on FB && AMIGA
> and AMIGA is defined only in arch/m68k/Kconfig.machine.  So how the
> hell can it *not* be true?  OTOH, it looks like hand-optimized
> asm equivalents of C they have in #else, so that #else might be
> meant to document what's going on...

These #ifdefs are relics from APUS (Amiga Power-Up System), which
added a PPC board.  APUS support was killed off a long time ago,
when arch/ppc/ was still king, but these #ifdefs were missed, because
they didn't test for CONFIG_APUS.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2020-05-14 20:22 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09 23:41 [PATCHES] uaccess simple access_ok() removals Al Viro
2020-05-09 23:45 ` [PATCH 01/20] dlmfs_file_write(): get rid of pointless access_ok() Al Viro
2020-05-09 23:45   ` [PATCH 02/20] fat_dir_ioctl(): hadn't needed that access_ok() for more than a decade Al Viro
2020-05-09 23:45   ` [PATCH 03/20] btrfs_ioctl_send(): don't bother with access_ok() Al Viro
2020-05-09 23:45   ` [PATCH 04/20] FIEMAP: " Al Viro
2020-05-10  7:02     ` Christoph Hellwig
2020-05-13 19:02       ` Al Viro
2020-05-13 19:38         ` Christoph Hellwig
2020-05-29 15:01           ` Al Viro
2020-05-09 23:45   ` [PATCH 05/20] tomoyo_write_control(): get rid of pointless access_ok() Al Viro
2020-05-10  0:50     ` Tetsuo Handa
2020-05-10  0:57       ` Linus Torvalds
2020-05-10  1:04         ` Tetsuo Handa
2020-05-10  3:01         ` Al Viro
2020-05-09 23:45   ` [PATCH 06/20] n_hdlc_tty_read(): remove " Al Viro
2020-05-15 10:53     ` Greg Kroah-Hartman
2020-05-09 23:45   ` [PATCH 07/20] nvram: drop useless access_ok() Al Viro
2020-05-15 10:54     ` Greg Kroah-Hartman
2020-05-09 23:45   ` [PATCH 08/20] cm4000_cs.c cmm_ioctl(): get rid of pointless access_ok() Al Viro
2020-05-09 23:45   ` [PATCH 09/20] drivers/fpga/dfl-fme-pr.c: " Al Viro
2020-05-09 23:45   ` [PATCH 10/20] drivers/fpga/dfl-afu-dma-region.c: " Al Viro
2020-05-09 23:45   ` [PATCH 11/20] amifb: get rid of pointless access_ok() calls Al Viro
2020-05-14 13:45     ` Bartlomiej Zolnierkiewicz
2020-05-14 14:07       ` Al Viro
2020-05-14 14:25         ` Bartlomiej Zolnierkiewicz
2020-05-14 17:41           ` Al Viro
2020-05-14 20:21             ` Geert Uytterhoeven [this message]
2020-05-09 23:45   ` [PATCH 12/20] omapfb: " Al Viro
2020-05-14 13:39     ` Bartlomiej Zolnierkiewicz
2020-05-09 23:45   ` [PATCH 13/20] drivers/crypto/ccp/sev-dev.c: get rid of pointless access_ok() Al Viro
2020-05-09 23:45   ` [PATCH 14/20] via-pmu: don't bother with access_ok() Al Viro
2020-05-09 23:45   ` [PATCH 15/20] drm_read(): get rid of pointless access_ok() Al Viro
2020-05-09 23:45   ` [PATCH 16/20] efi_test: " Al Viro
2020-05-09 23:45   ` [PATCH 17/20] lpfc_debugfs: " Al Viro
2020-05-09 23:45   ` [PATCH 18/20] usb: get rid of pointless access_ok() calls Al Viro
2020-05-15 10:53     ` Greg Kroah-Hartman
2020-05-09 23:45   ` [PATCH 19/20] hfi1: get rid of pointless access_ok() Al Viro
2020-05-09 23:45   ` [PATCH 4/4] vmci_host: " Al Viro
2020-05-15 10:53     ` Greg Kroah-Hartman
2020-05-10  0:34 ` [PATCHES] uaccess simple access_ok() removals Linus Torvalds
2020-05-10  3:27   ` Al Viro
2020-05-10 14:34 ` David Laight

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='CAMuHMdV78Y2Y_vkvbs2nt5LjM7D9te3ozr71_o2uGoNHSK4u=Q@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.