Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1447144

Re: [PATCH v3 02/11] mm: Hardened usercopy

From Balbir Singh <bsingharora@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 02/11] mm: Hardened usercopy
Date 2016-07-20 12:30 +0200
Message-ID <rWWVj-7S-7@gated-at.bofh.it> (permalink)
References <rVj9E-3EM-7@gated-at.bofh.it> <rVj9E-3EM-15@gated-at.bofh.it> <rWrHP-5yJ-7@gated-at.bofh.it> <rWIfE-7yk-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2016-07-19 at 11:48 -0700, Kees Cook wrote:
> On Mon, Jul 18, 2016 at 6:06 PM, Laura Abbott <labbott@redhat.com> wrote:
> > 
> > On 07/15/2016 02:44 PM, Kees Cook wrote:
> > 
> > This doesn't work when copying CMA allocated memory since CMA purposely
> > allocates larger than a page block size without setting head pages.
> > Given CMA may be used with drivers doing zero copy buffers, I think it
> > should be permitted.
> > 
> > Something like the following lets it pass (I can clean up and submit
> > the is_migrate_cma_page APIs as a separate patch for review)
> Yeah, this would be great. I'd rather use an accessor to check this
> than a direct check for MIGRATE_CMA.
>
> >          */
> >         for (; ptr <= end ; ptr += PAGE_SIZE, page = virt_to_head_page(ptr))
> > {
> > -               if (!PageReserved(page))
> > +               if (!PageReserved(page) && !is_migrate_cma_page(page))
> >                         return "<spans multiple pages>";
> >         }
> Yeah, I'll modify this a bit so that which type it starts as is
> maintained for all pages (rather than allowing to flip back and forth
> -- even though that is likely impossible).
> 
Sorry, I completely missed the MIGRATE_CMA bits. Could you clarify if you
caught this in testing/review?

Balbir Singh.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 02/11] mm: Hardened usercopy Kees Cook <keescook@chromium.org> - 2016-07-15 23:50 +0200
  Re: [PATCH v3 02/11] mm: Hardened usercopy Laura Abbott <labbott@redhat.com> - 2016-07-19 03:10 +0200
    Re: [PATCH v3 02/11] mm: Hardened usercopy Kees Cook <keescook@chromium.org> - 2016-07-19 20:50 +0200
      [PATCH] mm: Add is_migrate_cma_page Laura Abbott <labbott@redhat.com> - 2016-07-20 00:10 +0200
        Re: [PATCH] mm: Add is_migrate_cma_page Kees Cook <keescook@chromium.org> - 2016-07-20 00:50 +0200
      Re: [PATCH v3 02/11] mm: Hardened usercopy Balbir Singh <bsingharora@gmail.com> - 2016-07-20 12:30 +0200
        Re: [PATCH v3 02/11] mm: Hardened usercopy Laura Abbott <labbott@redhat.com> - 2016-07-20 17:40 +0200
  Re: [PATCH v3 02/11] mm: Hardened usercopy Laura Abbott <labbott@redhat.com> - 2016-07-19 04:00 +0200
    Re: [PATCH v3 02/11] mm: Hardened usercopy Kees Cook <keescook@chromium.org> - 2016-07-19 21:20 +0200
      Re: [PATCH v3 02/11] mm: Hardened usercopy Kees Cook <keescook@chromium.org> - 2016-07-20 01:00 +0200
  Re: [PATCH v3 02/11] mm: Hardened usercopy Christian Borntraeger <borntraeger@de.ibm.com> - 2016-07-19 11:30 +0200
    Re: [PATCH v3 02/11] mm: Hardened usercopy Kees Cook <keescook@chromium.org> - 2016-07-19 21:40 +0200
      Re: [PATCH v3 02/11] mm: Hardened usercopy Christian Borntraeger <borntraeger@de.ibm.com> - 2016-07-19 22:20 +0200
        Re: [PATCH v3 02/11] mm: Hardened usercopy Kees Cook <keescook@chromium.org> - 2016-07-19 22:40 +0200
          Re: [PATCH v3 02/11] mm: Hardened usercopy Christian Borntraeger <borntraeger@de.ibm.com> - 2016-07-19 22:50 +0200
  Re: [PATCH v3 02/11] mm: Hardened usercopy Kees Cook <keescook@chromium.org> - 2016-07-21 20:40 +0200
    Re: [PATCH v3 02/11] mm: Hardened usercopy Josh Poimboeuf <jpoimboe@redhat.com> - 2016-07-22 19:50 +0200
      RE: [PATCH v3 02/11] mm: Hardened usercopy David Laight <David.Laight@ACULAB.COM> - 2016-07-25 11:30 +0200

csiph-web