From: Arnd Bergmann <arnd@arndb.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jeremy Kerr <jk@ozlabs.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/6] powerpc/spufs: simplify spufs core dumping
Date: Mon, 6 Apr 2020 15:12:45 +0200 [thread overview]
Message-ID: <CAK8P3a1YdCuChb0mOU1+27PHK9qK6NGkuKfrHQa4LC=1LZmPTw@mail.gmail.com> (raw)
In-Reply-To: <20200406120312.1150405-2-hch@lst.de>
On Mon, Apr 6, 2020 at 2:03 PM Christoph Hellwig <hch@lst.de> wrote:
>
> Replace the coredump ->read method with a ->dump method that must call
> dump_emit itself. That way we avoid a buffer allocation an messing with
> set_fs() to call into code that is intended to deal with user buffers.
> For the ->get case we can now use a small on-stack buffer and avoid
> memory allocations as well.
I had no memory of this code at all, but your change looks fine to me.
Amazingly you even managed to even make it smaller and more readable
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
next prev parent reply other threads:[~2020-04-06 13:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 12:03 remove set_fs calls from the exec and coredump code Christoph Hellwig
2020-04-06 12:03 ` [PATCH 1/6] powerpc/spufs: simplify spufs core dumping Christoph Hellwig
2020-04-06 13:12 ` Arnd Bergmann [this message]
2020-04-07 0:01 ` Jeremy Kerr
2020-04-06 12:03 ` [PATCH 2/6] binfmt_elf: open code copy_siginfo_to_user to kernelspace buffer Christoph Hellwig
2020-04-06 13:01 ` Arnd Bergmann
2020-04-06 13:04 ` Christoph Hellwig
2020-04-06 12:03 ` [PATCH 3/6] binfmt_elf: remove the set_fs(KERNEL_DS) in elf_core_dump Christoph Hellwig
2020-04-06 13:02 ` Al Viro
2020-04-06 13:03 ` Christoph Hellwig
2020-04-06 12:03 ` [PATCH 4/6] binfmt_elf_fdpic: remove the set_fs(KERNEL_DS) in elf_fdpic_core_dump Christoph Hellwig
2020-04-06 12:03 ` [PATCH 5/6] exec: simplify the copy_strings_kernel calling convention Christoph Hellwig
2020-04-06 12:03 ` [PATCH 6/6] exec: open code copy_string_kernel Christoph Hellwig
2020-04-06 12:10 ` Matthew Wilcox
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='CAK8P3a1YdCuChb0mOU1+27PHK9qK6NGkuKfrHQa4LC=1LZmPTw@mail.gmail.com' \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=jk@ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).