lkml.org 
[lkml]   [2012]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch 4/4] c/r: prctl: Extend PR_SET_MM to set up more mm_struct entries
From
On Fri, Feb 3, 2012 at 7:19 AM, Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> +       case PR_SET_MM_AUXV: {
> +               unsigned long user_auxv[AT_VECTOR_SIZE];
> +
> +               if (arg4 > sizeof(mm->saved_auxv))
> +                       goto out;

While these are both AT_VECTOR_SIZE, I think it might be better to use
sizeof(mm->saved_auxv) instead of AT_VECTOR_SIZE, just so that they
can never get out sync and there's a single reference for the size.

-Kees

--
Kees Cook
ChromeOS Security
--
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-02-03 17:59    [W:0.062 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site