From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752663AbcCUHuQ (ORCPT ); Mon, 21 Mar 2016 03:50:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54295 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751349AbcCUHuM (ORCPT ); Mon, 21 Mar 2016 03:50:12 -0400 Date: Mon, 21 Mar 2016 15:50:04 +0800 From: Baoquan He To: Kees Cook Cc: LKML , Yinghai Lu , "H. Peter Anvin" , Vivek Goyal , Ingo Molnar , Borislav Petkov , Andy Lutomirski , lasse.collin@tukaani.org, Andrew Morton , Dave Young , Jiri Kosina , Borislav Petkov , Matt Fleming Subject: Re: [PATCH v3 10/19] x86, 64bit: Set ident_mapping for kaslr Message-ID: <20160321075004.GA5042@x1.redhat.com> References: <1457108717-12191-1-git-send-email-bhe@redhat.com> <1457108717-12191-11-git-send-email-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > +#include > > + > > +#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);