Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1625739
| From | Baoquan He <bhe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/4] KASLR: Parse all memmap entries in cmdline |
| Date | 2017-04-19 02:10 +0200 |
| Message-ID | <txLm2-4su-9@gated-at.bofh.it> (permalink) |
| References | <txf2N-1br-9@gated-at.bofh.it> <txf2O-1br-33@gated-at.bofh.it> <txHV9-29d-29@gated-at.bofh.it> <txKgi-3qF-7@gated-at.bofh.it> <txKT0-3YV-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/18/17 at 04:32pm, Kees Cook wrote:
> On Tue, Apr 18, 2017 at 3:52 PM, Baoquan He <bhe@redhat.com> wrote:
> > On 04/18/17 at 01:22pm, Kees Cook wrote:
> >> > +#define COMMAND_LINE_SIZE 256
> >> > +static int handle_mem_memmap(void)
> >> > +{
> >> > + char *args = (char *)get_cmd_line_ptr();
> >> > + char tmp_cmdline[COMMAND_LINE_SIZE];
> >>
> >> Can't this use a dynamic allocation instead of the 256 limit?
> >
> > This is in boot/compressed code, no mm allocator built yet? Am I right?
>
> misc.c uses malloc for phdrs, and the boot_heap is create to build an
> area for those calls, see include/linux/decompress/mm.h. I *think* it
> should be safe to use malloc here. It should be a pretty small
> allocation normally.
Yes, didn't notice this. Will use it to do dynamic malloc.
Thanks for telling!
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/4] KASLR: Parse all memmap entries in cmdline Baoquan He <bhe@redhat.com> - 2017-04-17 15:40 +0200
Re: [PATCH 2/4] KASLR: Parse all memmap entries in cmdline Kees Cook <keescook@chromium.org> - 2017-04-18 22:30 +0200
Re: [PATCH 2/4] KASLR: Parse all memmap entries in cmdline Baoquan He <bhe@redhat.com> - 2017-04-19 01:00 +0200
Re: [PATCH 2/4] KASLR: Parse all memmap entries in cmdline Kees Cook <keescook@chromium.org> - 2017-04-19 01:40 +0200
Re: [PATCH 2/4] KASLR: Parse all memmap entries in cmdline Baoquan He <bhe@redhat.com> - 2017-04-19 02:10 +0200
csiph-web