All of lore.kernel.org
 help / color / mirror / Atom feed
* Out-of-bound access in sysrq
@ 2013-03-28 10:34 Jiri Slaby
  2013-03-28 13:19 ` Mathieu Poirier
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2013-03-28 10:34 UTC (permalink / raw)
  To: Linus Torvalds, mathieu.poirier; +Cc: LKML, Dmitry Torokhov

Guys,

how is this supposed to work?

#define SYSRQ_KEY_RESET_MAX     20 /* Should be plenty */
static unsigned short sysrq_reset_seq[SYSRQ_KEY_RESET_MAX];
...
unsigned short platform_sysrq_reset_seq[] __weak = { KEY_RESERVED };
...
static inline void sysrq_register_handler(void)
{
...
        for (i = 0; i < ARRAY_SIZE(sysrq_reset_seq); i++) {
                key = platform_sysrq_reset_seq[i];
                if (key == KEY_RESERVED || key > KEY_MAX)
...




i runs from 0 to 19 incl., but platform_sysrq_reset_seq, if not
overriden, is of size 1, so?

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-28 13:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28 10:34 Out-of-bound access in sysrq Jiri Slaby
2013-03-28 13:19 ` Mathieu Poirier
2013-03-28 13:28   ` Jiri Slaby

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.