Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1361566 > unrolled thread
| Started by | Baoquan He <bhe@redhat.com> |
|---|---|
| First post | 2016-03-21 09:00 +0100 |
| Last post | 2016-03-21 20:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 10/19] x86, 64bit: Set ident_mapping for kaslr Baoquan He <bhe@redhat.com> - 2016-03-21 09:00 +0100
Re: [PATCH v3 10/19] x86, 64bit: Set ident_mapping for kaslr Kees Cook <keescook@chromium.org> - 2016-03-21 20:50 +0100
| From | Baoquan He <bhe@redhat.com> |
|---|---|
| Date | 2016-03-21 09:00 +0100 |
| Subject | Re: [PATCH v3 10/19] x86, 64bit: Set ident_mapping for kaslr |
| Message-ID | <rf2UO-2uv-7@gated-at.bofh.it> |
On 03/07/16 at 03:34pm, Kees Cook wrote:
> > #ifdef CONFIG_EARLY_PRINTK
> > /* early_serial_console.c */
> > extern int early_serial_base;
> > diff --git a/arch/x86/boot/compressed/misc_pgt.c b/arch/x86/boot/compressed/misc_pgt.c
> > new file mode 100644
> > index 0000000..954811e
> > --- /dev/null
> > +++ b/arch/x86/boot/compressed/misc_pgt.c
> > @@ -0,0 +1,91 @@
> > +#define __pa(x) ((unsigned long)(x))
> > +#define __va(x) ((void *)((unsigned long)(x)))
> > +
> > +#include "misc.h"
> > +
> > +#include <asm/init.h>
> > +#include <asm/pgtable.h>
> > +
> > +#include "../../mm/ident_map.c"
> > +#include "../string.h"
> > +
> > +struct alloc_pgt_data {
> > + unsigned char *pgt_buf;
> > + unsigned long pgt_buf_size;
> > + unsigned long pgt_buf_offset;
> > +};
> > +
> > +static void *alloc_pgt_page(void *context)
> > +{
> > + struct alloc_pgt_data *d = (struct alloc_pgt_data *)context;
> > + unsigned char *p = (unsigned char *)d->pgt_buf;
> > +
> > + if (d->pgt_buf_offset >= d->pgt_buf_size) {
> > + debug_putstr("out of pgt_buf in misc.c\n");
>
> This line probably isn't needed any more. Or, if it is, maybe it could
> include more details from the context?
I am trying to repost, found I missed this place.
Is it OK to add more informatin in printing as below?
if (d->pgt_buf_offset >= d->pgt_buf_size) {
debug_putstr("out of pgt_buf in misc.c\n");
debug_putaddr(d->pgt_buf_offset);
debug_putaddr(d->pgt_buf_size);
[toc] | [next] | [standalone]
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-03-21 20:50 +0100 |
| Message-ID | <rfdZU-1O7-13@gated-at.bofh.it> |
| In reply to | #1361566 |
On Mon, Mar 21, 2016 at 12:50 AM, Baoquan He <bhe@redhat.com> wrote:
> On 03/07/16 at 03:34pm, Kees Cook wrote:
>> > #ifdef CONFIG_EARLY_PRINTK
>> > /* early_serial_console.c */
>> > extern int early_serial_base;
>> > diff --git a/arch/x86/boot/compressed/misc_pgt.c b/arch/x86/boot/compressed/misc_pgt.c
>> > new file mode 100644
>> > index 0000000..954811e
>> > --- /dev/null
>> > +++ b/arch/x86/boot/compressed/misc_pgt.c
>> > @@ -0,0 +1,91 @@
>> > +#define __pa(x) ((unsigned long)(x))
>> > +#define __va(x) ((void *)((unsigned long)(x)))
>> > +
>> > +#include "misc.h"
>> > +
>> > +#include <asm/init.h>
>> > +#include <asm/pgtable.h>
>> > +
>> > +#include "../../mm/ident_map.c"
>> > +#include "../string.h"
>> > +
>> > +struct alloc_pgt_data {
>> > + unsigned char *pgt_buf;
>> > + unsigned long pgt_buf_size;
>> > + unsigned long pgt_buf_offset;
>> > +};
>> > +
>> > +static void *alloc_pgt_page(void *context)
>> > +{
>> > + struct alloc_pgt_data *d = (struct alloc_pgt_data *)context;
>> > + unsigned char *p = (unsigned char *)d->pgt_buf;
>> > +
>> > + if (d->pgt_buf_offset >= d->pgt_buf_size) {
>> > + debug_putstr("out of pgt_buf in misc.c\n");
>>
>> This line probably isn't needed any more. Or, if it is, maybe it could
>> include more details from the context?
>
> I am trying to repost, found I missed this place.
>
> Is it OK to add more informatin in printing as below?
> if (d->pgt_buf_offset >= d->pgt_buf_size) {
> debug_putstr("out of pgt_buf in misc.c\n");
> debug_putaddr(d->pgt_buf_offset);
> debug_putaddr(d->pgt_buf_size);
Yeah, absolutely, that sounds perfect.
-Kees
--
Kees Cook
Chrome OS & Brillo Security
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web