lkml.org 
[lkml]   [2012]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] vfio powerpc: enabled on powernv platform
    On 29/11/12 15:20, Alex Williamson wrote:

    >> + /* Put tces to the table */
    >> + for (i = 0; (i < pages) && !ret; ++i, tce += IOMMU_PAGE_SIZE) {
    >> + ret = put_tce(tbl, entry + i, tce, direction);
    >> + /*
    >> + * As IOMMU page size is always 4K, the system page size
    >> + * can be 64K and there is no special tracking for IOMMU pages,
    >> + * we only do rlimit check/update for the very first
    >> + * 4K IOMMUpage within 64K system page.
    >> + */
    >> + if (!(tce & ~PAGE_MASK))
    >> + ++retpages;
    >
    > Ah, here's the comment I was looking for, though I'm still not sure
    > about the read/write bits.
    >
    > Isn't there an exploit here that a user can lock pages beyond their
    > limits if they just skip mapping the first 4k of each page? Thanks,


    Heh. True. Posted another patch with 4K pages per system page usage tracking.



    --
    Alexey


    \
     
     \ /
      Last update: 2012-11-30 08:01    [W:5.213 / U:0.528 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site