lkml.org 
[lkml]   [2012]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] kmsg: Use vmalloc instead of kmalloc when writing
    On Fri, Mar 30, 2012 at 6:30 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
    > On Fri, Mar 30, 2012 at 01:04:27PM -0400, Sasha Levin wrote:
    >> There are no size checks in kmsg_write(), and we try allocating enough
    >> memory to store everything userspace gave us, which may be too much for
    >> kmalloc to allocate.
    >
    > Really?  Have you seen this fail?  As only root can do this, is this
    > really a problem?

    Only root, and a whole bunch of management software that dumps data
    into /dev/kmsg (systemd and friends).

    >> One option would be to limit it to something, but we can't come up with
    >> a number that would make sense.
    >>
    >> Instead, just use vmalloc so that nothing would break with large amounts
    >> of data.
    >
    > Are you sure this will work properly?  Have you tested it with large
    > amounts of data?

    My test was dumping 800mb of data into it, if there's anything else I
    should try please let me know.

    Thanks.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-03-30 18:41    [W:0.021 / U:151.304 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site