All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Intel-gfx] [PATCH v12 2/3] drm/i915: add syncobj timeline support
Date: Wed, 29 Jul 2020 12:19:35 -0700	[thread overview]
Message-ID: <202007291218.E129CEE@keescook> (raw)
In-Reply-To: <CAHk-=wjD-6phO85fvLMt7rvk5ZwaJ1Q5Zor4urYps6C8vG_Txg@mail.gmail.com>

On Wed, Jul 29, 2020 at 10:51:23AM -0700, Linus Torvalds wrote:
> On Wed, Jul 29, 2020 at 5:24 AM Daniel Vetter <daniel@ffwll.ch> wrote:
> >
> > Do we have a access_ok_array or so? Instead of duplicating overflow checks
> > everywhere and getting it all wrong ...
> 
> I really really think you should get away from access_ok() entirely.
> 
> Please just get rid of it, and use "copy_from_user()" instead.

Yes please. :) It also makes code SO much easier to audit (both
automatically and manually).

-- 
Kees Cook
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v12 2/3] drm/i915: add syncobj timeline support
Date: Wed, 29 Jul 2020 12:19:35 -0700	[thread overview]
Message-ID: <202007291218.E129CEE@keescook> (raw)
In-Reply-To: <CAHk-=wjD-6phO85fvLMt7rvk5ZwaJ1Q5Zor4urYps6C8vG_Txg@mail.gmail.com>

On Wed, Jul 29, 2020 at 10:51:23AM -0700, Linus Torvalds wrote:
> On Wed, Jul 29, 2020 at 5:24 AM Daniel Vetter <daniel@ffwll.ch> wrote:
> >
> > Do we have a access_ok_array or so? Instead of duplicating overflow checks
> > everywhere and getting it all wrong ...
> 
> I really really think you should get away from access_ok() entirely.
> 
> Please just get rid of it, and use "copy_from_user()" instead.

Yes please. :) It also makes code SO much easier to audit (both
automatically and manually).

-- 
Kees Cook

  reply	other threads:[~2020-07-29 19:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 13:17 [Intel-gfx] [PATCH v12 0/3] drm/i915: timeline semaphore support Lionel Landwerlin
2020-07-08 13:17 ` [Intel-gfx] [PATCH v12 1/3] drm/i915: introduce a mechanism to extend execbuf2 Lionel Landwerlin
2020-07-08 13:17 ` [Intel-gfx] [PATCH v12 2/3] drm/i915: add syncobj timeline support Lionel Landwerlin
2020-07-29 12:24   ` Daniel Vetter
2020-07-29 12:24     ` Daniel Vetter
2020-07-29 17:51     ` Linus Torvalds
2020-07-29 17:51       ` Linus Torvalds
2020-07-29 19:19       ` Kees Cook [this message]
2020-07-29 19:19         ` Kees Cook
2020-07-29 12:34   ` daniel
2020-07-08 13:17 ` [Intel-gfx] [PATCH v12 3/3] drm/i915: peel dma-fence-chains wait fences Lionel Landwerlin
2020-07-29 12:36   ` daniel
2020-07-08 14:28 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: timeline semaphore support Patchwork
2020-07-08 14:29 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-07-08 14:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-07-08 17:57 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-07-15 11:11 ` [Intel-gfx] [PATCH v12 0/3] " Lionel Landwerlin
2020-07-22  7:10   ` Lionel Landwerlin

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=202007291218.E129CEE@keescook \
    --to=keescook@chromium.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.