From: Ralf Baechle <ralf@linux-mips.org>
To: Yong Zhang <yong.zhang@windriver.com>
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: o32 application running on 64bit kernel core dump
Date: Wed, 1 Jul 2009 20:19:34 +0100 [thread overview]
Message-ID: <20090701191934.GE23121@linux-mips.org> (raw)
In-Reply-To: <16bd35f2910f585740f4764fa1e80bf31c80d576.1242178813.git.yong.zhang@windriver.com>
On Wed, Jul 01, 2009 at 09:35:39AM +0800, Yong Zhang wrote:
> +/* These MUST be defined before elf.h gets included */
This sort of ordering bug seems to become a tradition. I think it may be
a good idea to insert a check like this:
#ifdef ELF_CORE_COPY_REGS
#error ELF_CORE_COPY_REGS should not be defined yet!
#endif
> +extern void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs);
> +#define ELF_CORE_COPY_REGS(_dest, _regs) elf32_core_copy_regs(_dest, _regs);
> +#define ELF_CORE_COPY_TASK_REGS(_tsk, _dest) \
> +({ \
> + int __res = 1; \
> + elf32_core_copy_regs((*_dest), (task_pt_regs(_tsk))); \
Be very careful with parentheses in macros. This line should probably
become:
elf32_core_copy_regs(*(_dest), task_pt_regs(_tsk)); \
The changes to the first argument to bullet prof the macro and the change
to the second one for cosmetic reasons.
Ralf
next prev parent reply other threads:[~2009-07-01 19:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 3:15 [PATCH] MIPS: o32 application running on 64bit kernel core dump Yong Zhang
2009-07-01 19:09 ` David Daney
2009-07-02 1:25 ` Yong Zhang
2009-07-01 19:19 ` Ralf Baechle [this message]
2009-07-01 23:47 ` Ralf Baechle
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=20090701191934.GE23121@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=yong.zhang@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).