Messages in this thread | | | From | Andy Shevchenko <> | Date | Sun, 10 Sep 2023 10:43:42 +0300 | Subject | Re: [PATCH v2 1/5] string.h: add array-wrappers for (v)memdup_user() |
| |
On Fri, Sep 8, 2023 at 11:02 PM Philipp Stanner <pstanner@redhat.com> wrote: > > Currently, user array duplications are sometimes done without an > overflow check. Sometimes the checks are done manually; sometimes the > array size is calculated with array_size() and sometimes by calculating > n * size directly in code. > > Introduce wrappers for arrays for memdup_user() and vmemdup_user() to > provide a standardized and safe way for duplicating user arrays. > > This is both for new code as well as replacing usage of (v)memdup_user() > in existing code that uses, e.g., n * size to calculate array sizes.
No objections, Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-- With Best Regards, Andy Shevchenko
| |