mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Paul Mundt" <lethal@linux-sh.org>, "Wu, Bryan" <Bryan.Wu@analog.com>
Cc: "David Howells" <dhowells@redhat.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] binfmt_elf_fdpic: Convert initial stack alignment to arch_align_stack().
Date: Sun, 3 Aug 2008 23:24:21 -0400	[thread overview]
Message-ID: <8bd0f97a0808032024x18a31d29tb44ebc6216a2aed@mail.gmail.com> (raw)
In-Reply-To: <20080801214448.GA13448@linux-sh.org>

On Fri, Aug 1, 2008 at 5:44 PM, Paul Mundt wrote:
> On Fri, Aug 01, 2008 at 03:01:19PM +0100, David Howells wrote:
>> Paul Mundt <lethal@linux-sh.org> wrote:
>> > +    * In some cases (e.g. Hyper-Threading), we want to avoid L1
>> > +    * evictions by the processes running on the same package. One
>> > +    * thing we can do is to shuffle the initial stack for them, so
>> > +    * we give the architecture an opportunity to do so here.
>> > +    */
>> >  #ifdef CONFIG_MMU
>> > -   sp = bprm->p;
>> > +   sp = arch_align_stack(bprm->p);
>> >  #else
>> > -   sp = mm->start_stack;
>> > +   sp = arch_align_stack(mm->start_stack);
>>
>> Ummm...  You're calling arch_align_stack() under NOMMU...  Is that really a
>> good idea?
>
> Not particularly, no.
>
>> You can't necessarily move the stack pointer without exiting the allocated
>> region or shrinking the amount of stack space the executable asked for.  If
>> you want to do this sort of thing, you need to tell the memory allocator what
>> you're up to - or at the very least allocate some slack.
>
> Yes, that's a good point, and one that probably ought to be documented
> alongside the initial alignment. I'll send an updated patch.

fs/binfmt_elf_fdpic.c: In function 'create_elf_fdpic_tables':
fs/binfmt_elf_fdpic.c:497: error: implicit declaration of function
'arch_align_stack'
make[1]: *** [fs/binfmt_elf_fdpic.o] Error 1
make: *** [fs] Error 2

Blackfin lacks a arch_align_stack(x) in asm-blackfin/system.h ... i
imagine a stub will work for us like every other arch though

feel like doing that Bryan ?  i'm guessing Paul doesnt want to ... ;)
-mike

  reply	other threads:[~2008-08-04  3:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 15:03 [PATCH 0/3] binfmt_elf_fdpic: auxvec updates Paul Mundt
2008-07-28 15:04 ` [PATCH 1/3] binfmt_elf_fdpic: Support auxvec base platform string Paul Mundt
2008-07-28 15:05   ` [PATCH 2/3] binfmt_elf_fdpic: Convert initial stack alignment to arch_align_stack() Paul Mundt
2008-07-28 15:05     ` [PATCH 3/3] binfmt_elf_fdpic: Wire up AT_EXECFD, AT_EXECFN, AT_SECURE Paul Mundt
2008-08-01 14:04     ` David Howells
2008-08-01 14:01   ` [PATCH 2/3] binfmt_elf_fdpic: Convert initial stack alignment to arch_align_stack() David Howells
2008-08-01 21:44     ` Paul Mundt
2008-08-04  3:24       ` Mike Frysinger [this message]
2008-08-04  4:00         ` Paul Mundt
2008-08-04 10:08         ` David Howells
2008-08-01 13:57 ` [PATCH 1/3] binfmt_elf_fdpic: Support auxvec base platform string David Howells
2008-08-01 21:46   ` Paul Mundt
2008-08-06 10:34 [PATCH 0/3] binfmt_elf_fdpic: auxvec updates, v2 Paul Mundt
2008-08-06 10:36 ` [PATCH 2/3] binfmt_elf_fdpic: Convert initial stack alignment to arch_align_stack() Paul Mundt

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=8bd0f97a0808032024x18a31d29tb44ebc6216a2aed@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=Bryan.Wu@analog.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.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

Powered by JetHome