All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: rmk+lkml@arm.linux.org.uk
Cc: roland@redhat.com, linux-arch@vger.kernel.org,
	utrace-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: CONFIG_HAVE_ARCH_TRACEHOOK and you
Date: Fri, 12 Sep 2008 14:57:41 -0700 (PDT)	[thread overview]
Message-ID: <20080912.145741.59974282.davem@davemloft.net> (raw)
In-Reply-To: <20080912131351.GA31545@flint.arm.linux.org.uk>

From: Russell King <rmk+lkml@arm.linux.org.uk>
Date: Fri, 12 Sep 2008 14:13:51 +0100

> However, in looking at other architectures, I notice that sparc does this
> when initializing its regsets:
> 
>                 .n = 38 * sizeof(u32),
>                 .size = sizeof(u32), .align = sizeof(u32),
> 
> and sparc64:
> 
>                 .n = 36 * sizeof(u64),
>                 .size = sizeof(u64), .align = sizeof(u64),
> 
> which, given that fs/binfmt_elf.c does this:
> 
>                         size_t size = regset->n * regset->size;
>                         void *data = kmalloc(size, GFP_KERNEL);
>                         if (unlikely(!data))
>                                 return 0;
> 
> means sparc ends up allocating 38 * sizeof(u32) * sizeof(u32), and
> sparc64 ends up with 36 * sizeof(u64) * sizeof(u64), which must surely
> be wrong?

Yep, definitely a bug, good catch.  I guess, better to allocate
too much by accident rather than too little in this case :-)

I'll fix this up, thanks!

  reply	other threads:[~2008-09-12 21:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12  2:57 CONFIG_HAVE_ARCH_TRACEHOOK and you Roland McGrath
2008-09-12  8:23 ` Christoph Hellwig
2008-09-12 13:05 ` Paul Mundt
2008-09-15 20:38   ` Roland McGrath
2008-09-12 13:13 ` Russell King
2008-09-12 21:57   ` David Miller [this message]
2008-09-12 22:31   ` Roland McGrath
2008-09-12 22:37     ` David Miller
2008-09-12 22:39       ` Roland McGrath
2008-09-12 22:39         ` Roland McGrath
2008-09-12 22:40         ` David Miller
2008-09-12 22:45           ` Roland McGrath
2008-09-12 22:45             ` Roland McGrath
  -- strict thread matches above, loose matches on Subject: below --
2008-09-12 13:40 Russell King
2008-09-12 23:57 ` Roland McGrath

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=20080912.145741.59974282.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=roland@redhat.com \
    --cc=utrace-devel@redhat.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.