From: Greg Ungerer <gerg@linux-m68k.org>
To: Nicolas Pitre <nicolas.pitre@linaro.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
David Howells <dhowells@redhat.com>
Subject: Re: [PATCH v2 01/10] binfmt_flat: assorted cleanups
Date: Tue, 19 Jul 2016 14:52:24 +1000 [thread overview]
Message-ID: <ca29815f-55f7-c8b3-3757-44fe082bfc3a@linux-m68k.org> (raw)
In-Reply-To: <1468812716-30537-2-git-send-email-nicolas.pitre@linaro.org>
Hi Nicolas,
On 18/07/16 13:31, Nicolas Pitre wrote:
> Remove excessive casts, do some code grouping, etc.
> No functional changes.
>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
> ---
> fs/binfmt_flat.c | 118 ++++++++++++++++++++++++++-----------------------------
> 1 file changed, 56 insertions(+), 62 deletions(-)
>
> diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
> index caf9e39bb8..085059d879 100644
> --- a/fs/binfmt_flat.c
> +++ b/fs/binfmt_flat.c
> @@ -80,7 +80,7 @@ struct lib_info {
> unsigned long text_len; /* Length of text segment */
> unsigned long entry; /* Start address for this module */
> unsigned long build_date; /* When this one was compiled */
> - short loaded; /* Has this library been loaded? */
> + bool loaded; /* Has this library been loaded? */
> } lib_list[MAX_SHARED_LIBS];
> };
>
> @@ -107,7 +107,7 @@ static struct linux_binfmt flat_format = {
> static int flat_core_dump(struct coredump_params *cprm)
> {
> printk("Process %s:%d received signr %d and should have core dumped\n",
> - current->comm, current->pid, (int) cprm->siginfo->si_signo);
> + current->comm, current->pid, cprm->siginfo->si_signo);
> return(1);
> }
>
> @@ -190,7 +190,7 @@ static int decompress_exec(
> loff_t fpos;
> int ret, retval;
>
> - DBG_FLT("decompress_exec(offset=%x,buf=%x,len=%x)\n",(int)offset, (int)dst, (int)len);
> + DBG_FLT("decompress_exec(offset=%lx,buf=%p,len=%lx)\n",offset, dst, len);
>
> memset(&strm, 0, sizeof(strm));
> strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
> @@ -358,8 +358,8 @@ calc_reloc(unsigned long r, struct lib_info *p, int curid, int internalp)
> text_len = p->lib_list[id].text_len;
>
> if (!flat_reloc_valid(r, start_brk - start_data + text_len)) {
> - printk("BINFMT_FLAT: reloc outside program 0x%x (0 - 0x%x/0x%x)",
> - (int) r,(int)(start_brk-start_data+text_len),(int)text_len);
> + printk("BINFMT_FLAT: reloc outside program 0x%lx (0 - 0x%lx/0x%lx)",
> + r, start_brk-start_data+text_len, text_len);
Seeing as you have modified quite a few printk calls is it worth
while annotating them with appropriate KERN_ERR, KERN_INFO, etc?
Just a thought.
Regards
Greg
next prev parent reply other threads:[~2016-07-19 5:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 3:31 [PULL REQUEST] [PATCH v2 00/10] allow BFLT executables on systems with a MMU Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 01/10] binfmt_flat: assorted cleanups Nicolas Pitre
2016-07-19 4:52 ` Greg Ungerer [this message]
2016-07-19 6:40 ` Geert Uytterhoeven
2016-07-20 4:09 ` Nicolas Pitre
2016-07-20 6:54 ` Geert Uytterhoeven
2016-07-20 7:18 ` Greg Ungerer
2016-07-18 3:31 ` [PATCH v2 02/10] elf_fdpic_transfer_args_to_stack(): make it generic Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 03/10] binfmt_flat: use generic transfer_args_to_stack() Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 04/10] binfmt_flat: clean up create_flat_tables() and stack accesses Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 05/10] binfmt_flat: use proper user space accessors with relocs processing code Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 06/10] binfmt_flat: use proper user space accessors with old relocs code Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 07/10] binfmt_flat: use clear_user() rather than memset() to clear .bss Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 08/10] binfmt_flat: update libraries' data segment pointer with userspace accessors Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 09/10] binfmt_flat: add MMU-specific support Nicolas Pitre
2016-07-18 3:31 ` [PATCH v2 10/10] binfmt_flat: allow compressed flat binary format to work on MMU systems Nicolas Pitre
2016-07-18 11:47 ` One Thousand Gnomes
2016-07-18 15:45 ` Nicolas Pitre
2016-07-18 16:51 ` One Thousand Gnomes
2016-07-18 16:58 ` Nicolas Pitre
2016-07-19 7:21 ` [PULL REQUEST] [PATCH v2 00/10] allow BFLT executables on systems with a MMU Greg Ungerer
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=ca29815f-55f7-c8b3-3757-44fe082bfc3a@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®