Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: gang.chen@asianux.com (Chen Gang)
To: linux-arm-kernel@lists.infradead.org
Subject: [Suggestion] ARM:kernel: memcpy, checking the length before copy.
Date: Mon, 28 Jan 2013 18:36:01 +0800	[thread overview]
Message-ID: <51065491.7040702@asianux.com> (raw)

Hello Russell King:

in arch/arm/kernel/fiq.c:

  since the function set_fiq_handler is an EXPORT_SYMBOL function.
  do we need checking memory length, before copy ?
    (have to understand the madly using by outside users)

  if really it is, maybe also need provide the return value for failure.


  Regards

gchen.


 80 void set_fiq_handler(void *start, unsigned int length)
 81 {
 82 #if defined(CONFIG_CPU_USE_DOMAINS)
 83         memcpy((void *)0xffff001c, start, length);
 84 #else
 85         memcpy(vectors_page + 0x1c, start, length);
 86 #endif
 87         flush_icache_range(0xffff001c, 0xffff001c + length);
 88         if (!vectors_high())
 89                 flush_icache_range(0x1c, 0x1c + length);
 90 }
 91 
...

137 EXPORT_SYMBOL(set_fiq_handler);

                 reply	other threads:[~2013-01-28 10:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=51065491.7040702@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox