All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Nathan Fontenot <nfont@austin.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Memset the kernel copy of rtas args before using
Date: Sat, 26 Jul 2008 14:52:50 +0400	[thread overview]
Message-ID: <488B0202.3010204@ru.mvista.com> (raw)
In-Reply-To: <488A44DB.7090400@austin.ibm.com>

Hello.

Nathan Fontenot wrote:
> Index: linux-2.6.git/arch/powerpc/kernel/rtas.c
> ===================================================================
> --- linux-2.6.git.orig/arch/powerpc/kernel/rtas.c    2008-07-22 
> 09:34:03.000000000 -0500
> +++ linux-2.6.git/arch/powerpc/kernel/rtas.c    2008-07-25 
> 16:06:00.000000000 -0500
> @@ -775,6 +775,8 @@
>     if (!capable(CAP_SYS_ADMIN))
>         return -EPERM;
>
> +    memset(&args, 0, sizeof(args));
> +

   You could use memzero() directly -- memset(x, 0, sizeof(x))l should 
boil down to it anyway...
>     if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0)
>         return -EFAULT;

WBR, Sergei

      parent reply	other threads:[~2008-07-26 10:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-25 21:25 [PATCH] Memset the kernel copy of rtas args before using Nathan Fontenot
2008-07-26  4:17 ` Milton Miller
2008-07-26 10:52 ` Sergei Shtylyov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=488B0202.3010204@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=nfont@austin.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.