On Thu, Aug 31, 2023 at 4:16 PM Andy Shevchenko
wrote:
> On Thu, Aug 31, 2023 at 3:22 PM Philipp Stanner wrote:
> > On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote:
> > > On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner
> > > wrote:
...
> > > I'm wondering if this has no side-effects a
On Thu, Aug 31, 2023 at 3:22 PM Philipp Stanner wrote:
> On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote:
> > On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner
> > wrote:
...
> > I'm wondering if this has no side-effects as string.h/string.c IIRC
> > is used also for early stages where s
On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote:
> On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner
> wrote:
> >
> > Currently, user array duplications are sometimes done without an
> > overflow check. Sometimes the checks are done manually; sometimes
> > the
> > array size is calculated
On Thu, 2023-08-31 at 11:59 +0300, Andy Shevchenko wrote:
> On Wed, Aug 30, 2023 at 10:15 PM wrote:
> > On Wed, 2023-08-30 at 17:29 +0300, Andy Shevchenko wrote:
> > > On Wed, Aug 30, 2023 at 5:19 PM wrote:
> > > > On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote:
> > > > > On Wed, Aug 30
On Wed, Aug 30, 2023 at 10:15 PM wrote:
> On Wed, 2023-08-30 at 17:29 +0300, Andy Shevchenko wrote:
> > On Wed, Aug 30, 2023 at 5:19 PM wrote:
> > > On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote:
> > > > On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner
> > > >
> > > > wrote:
...
> >
On Wed, 2023-08-30 at 17:29 +0300, Andy Shevchenko wrote:
> On Wed, Aug 30, 2023 at 5:19 PM wrote:
> > On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote:
> > > On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner
> > >
> > > wrote:
>
> > > > --- a/include/linux/string.h
> > > > +++ b/include/l
On Wed, Aug 30, 2023 at 5:19 PM wrote:
> On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote:
> > On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner
> > wrote:
> > > --- a/include/linux/string.h
> > > +++ b/include/linux/string.h
> >
> > I'm wondering if this has no side-effects as string.h/st
On Wed, 2023-08-30 at 17:15 +0300, Andy Shevchenko wrote:
> On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner
> wrote:
>
> > + if (unlikely(check_mul_overflow(n, size, &nbytes)))
> > + return ERR_PTR(-EINVAL);
>
> > + if (unlikely(check_mul_overflow(n, size, &nbytes)))
>
On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote:
> On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner
> wrote:
> >
> > Currently, user array duplications are sometimes done without an
> > overflow check. Sometimes the checks are done manually; sometimes
> > the
> > array size is calculated
On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner wrote:
> + if (unlikely(check_mul_overflow(n, size, &nbytes)))
> + return ERR_PTR(-EINVAL);
> + if (unlikely(check_mul_overflow(n, size, &nbytes)))
> + return ERR_PTR(-EINVAL);
Btw, why not -EOVERFLOW ?
--
On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner 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.
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
12 matches
Mail list logo