From patchwork Wed Aug 21 10:04:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 11106241 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9995A1395 for ; Wed, 21 Aug 2019 10:07:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6972322D6D for ; Wed, 21 Aug 2019 10:07:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.de header.i=@amazon.de header.b="nIWUxo7F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6972322D6D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i0NUc-0006IR-5F; Wed, 21 Aug 2019 10:05:26 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i0NUa-0006IH-QM for xen-devel@lists.xenproject.org; Wed, 21 Aug 2019 10:05:24 +0000 X-Inumbo-ID: 30d8ce28-c3fb-11e9-b95f-bc764e2007e4 Received: from smtp-fw-6002.amazon.com (unknown [52.95.49.90]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 30d8ce28-c3fb-11e9-b95f-bc764e2007e4; Wed, 21 Aug 2019 10:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1566381923; x=1597917923; h=from:to:cc:subject:date:message-id:mime-version; bh=OdZUO+fIc8xzShugSxDSF405yhlTcqgXBGSxVdmKRdY=; b=nIWUxo7FfhWItD9cb0udnpaOnKV6TVpowJQF4vt1m+zX2tTqqUDjeK92 gNuVw4o9t2T8pa/HCE2omCkDR7m0hWaeFixi3qVxT75p47zjFFeUMUH7T Ig28S+STCpnV0bBidMLXvdWgGD4Sb+4DZNY+X0/QZS7TIfHZA/RBvujvP 0=; X-IronPort-AV: E=Sophos;i="5.64,412,1559520000"; d="scan'208";a="416616698" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2a-8549039f.us-west-2.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 21 Aug 2019 10:05:21 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-8549039f.us-west-2.amazon.com (Postfix) with ESMTPS id 26590A0605; Wed, 21 Aug 2019 10:05:21 +0000 (UTC) Received: from EX13D05EUB001.ant.amazon.com (10.43.166.87) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 21 Aug 2019 10:05:20 +0000 Received: from EX13MTAUEB001.ant.amazon.com (10.43.60.96) by EX13D05EUB001.ant.amazon.com (10.43.166.87) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 21 Aug 2019 10:05:19 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.60.129) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 21 Aug 2019 10:05:18 +0000 From: Pawel Wieczorkiewicz To: , Date: Wed, 21 Aug 2019 10:04:30 +0000 Message-ID: <20190821100430.89909-1-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH] livepatch: always print XENLOG_ERR information (ARM, ELF) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: wipawel@amazon.com, Stefano Stabellini , Ross Lagerwall , Konrad Rzeszutek Wilk , Pawel Wieczorkiewicz , Julien Grall , Volodymyr Babchuk Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This complements [1] commit for ARM and livepatch_elf files. [1] 4470efeae4 livepatch: always print XENLOG_ERR information Signed-off-by: Pawel Wieczorkiewicz Acked-by: Julien Grall Reviewed-by: Ross Lagerwall --- xen/arch/arm/arm32/livepatch.c | 28 +++++------ xen/arch/arm/arm64/livepatch.c | 28 +++++------ xen/common/livepatch_elf.c | 104 ++++++++++++++++++++--------------------- 3 files changed, 80 insertions(+), 80 deletions(-) diff --git a/xen/arch/arm/arm32/livepatch.c b/xen/arch/arm/arm32/livepatch.c index 41378a54ae..5a06467008 100644 --- a/xen/arch/arm/arm32/livepatch.c +++ b/xen/arch/arm/arm32/livepatch.c @@ -84,15 +84,15 @@ int arch_livepatch_verify_elf(const struct livepatch_elf *elf) if ( hdr->e_machine != EM_ARM || hdr->e_ident[EI_CLASS] != ELFCLASS32 ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Unsupported ELF Machine type!\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Unsupported ELF Machine type\n", + elf->name); return -EOPNOTSUPP; } if ( (hdr->e_flags & EF_ARM_EABI_MASK) != EF_ARM_EABI_VER5 ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Unsupported ELF EABI(%x)!\n", - elf->name, hdr->e_flags); + printk(XENLOG_ERR LIVEPATCH "%s: Unsupported ELF EABI(%x)\n", + elf->name, hdr->e_flags); return -EOPNOTSUPP; } @@ -256,20 +256,20 @@ int arch_livepatch_perform(struct livepatch_elf *elf, if ( symndx == STN_UNDEF ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Encountered STN_UNDEF\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Encountered STN_UNDEF\n", + elf->name); return -EOPNOTSUPP; } else if ( symndx >= elf->nsym ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Relative symbol wants symbol@%u which is past end!\n", - elf->name, symndx); + printk(XENLOG_ERR LIVEPATCH "%s: Relative symbol wants symbol@%u which is past end\n", + elf->name, symndx); return -EINVAL; } else if ( !elf->sym[symndx].sym ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: No relative symbol@%u\n", - elf->name, symndx); + printk(XENLOG_ERR LIVEPATCH "%s: No relative symbol@%u\n", + elf->name, symndx); return -EINVAL; } @@ -279,13 +279,13 @@ int arch_livepatch_perform(struct livepatch_elf *elf, switch ( rc ) { case -EOVERFLOW: - dprintk(XENLOG_ERR, LIVEPATCH "%s: Overflow in relocation %u in %s for %s!\n", - elf->name, i, rela->name, base->name); + printk(XENLOG_ERR LIVEPATCH "%s: Overflow in relocation %u in %s for %s\n", + elf->name, i, rela->name, base->name); break; case -EOPNOTSUPP: - dprintk(XENLOG_ERR, LIVEPATCH "%s: Unhandled relocation #%x\n", - elf->name, type); + printk(XENLOG_ERR LIVEPATCH "%s: Unhandled relocation #%x\n", + elf->name, type); break; } diff --git a/xen/arch/arm/arm64/livepatch.c b/xen/arch/arm/arm64/livepatch.c index 5c75779284..6ec8dc60f0 100644 --- a/xen/arch/arm/arm64/livepatch.c +++ b/xen/arch/arm/arm64/livepatch.c @@ -71,8 +71,8 @@ int arch_livepatch_verify_elf(const struct livepatch_elf *elf) if ( hdr->e_machine != EM_AARCH64 || hdr->e_ident[EI_CLASS] != ELFCLASS64 ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Unsupported ELF Machine type!\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Unsupported ELF Machine type\n", + elf->name); return -EOPNOTSUPP; } @@ -254,20 +254,20 @@ int arch_livepatch_perform_rela(struct livepatch_elf *elf, if ( symndx == STN_UNDEF ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Encountered STN_UNDEF\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Encountered STN_UNDEF\n", + elf->name); return -EOPNOTSUPP; } else if ( symndx >= elf->nsym ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Relative relocation wants symbol@%u which is past end!\n", - elf->name, symndx); + printk(XENLOG_ERR LIVEPATCH "%s: Relative relocation wants symbol@%u which is past end\n", + elf->name, symndx); return -EINVAL; } else if ( !elf->sym[symndx].sym ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: No relative symbol@%u\n", - elf->name, symndx); + printk(XENLOG_ERR LIVEPATCH "%s: No relative symbol@%u\n", + elf->name, symndx); return -EINVAL; } @@ -465,23 +465,23 @@ int arch_livepatch_perform_rela(struct livepatch_elf *elf, break; default: - dprintk(XENLOG_ERR, LIVEPATCH "%s: Unhandled relocation %lu\n", - elf->name, ELF64_R_TYPE(r->r_info)); + printk(XENLOG_ERR LIVEPATCH "%s: Unhandled relocation %lu\n", + elf->name, ELF64_R_TYPE(r->r_info)); return -EOPNOTSUPP; } if ( overflow_check && ovf == -EOVERFLOW ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Overflow in relocation %u in %s for %s!\n", - elf->name, i, rela->name, base->name); + printk(XENLOG_ERR LIVEPATCH "%s: Overflow in relocation %u in %s for %s\n", + elf->name, i, rela->name, base->name); return ovf; } } return 0; bad_offset: - dprintk(XENLOG_ERR, LIVEPATCH "%s: Relative relocation offset is past %s section!\n", - elf->name, base->name); + printk(XENLOG_ERR LIVEPATCH "%s: Relative relocation offset is past %s section\n", + elf->name, base->name); return -EINVAL; } diff --git a/xen/common/livepatch_elf.c b/xen/common/livepatch_elf.c index dd8b47a1fa..18b9684aeb 100644 --- a/xen/common/livepatch_elf.c +++ b/xen/common/livepatch_elf.c @@ -55,7 +55,7 @@ static int elf_resolve_sections(struct livepatch_elf *elf, const void *data) sec = xzalloc_array(struct livepatch_elf_sec, elf->hdr->e_shnum); if ( !sec ) { - dprintk(XENLOG_ERR, LIVEPATCH"%s: Could not allocate memory for section table!\n", + printk(XENLOG_ERR LIVEPATCH"%s: Could not allocate memory for section table\n", elf->name); return -ENOMEM; } @@ -81,22 +81,22 @@ static int elf_resolve_sections(struct livepatch_elf *elf, const void *data) (sec[i].sec->sh_type != SHT_NOBITS && /* Skip SHT_NOBITS */ (delta > elf->len || (delta + sec[i].sec->sh_size > elf->len))) ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section [%u] data %s of payload!\n", - elf->name, i, + printk(XENLOG_ERR LIVEPATCH "%s: Section [%u] data %s of payload\n", + elf->name, i, delta < sizeof(Elf_Ehdr) ? "at ELF header" : "is past end"); return -EINVAL; } else if ( sec[i].sec->sh_addralign & (sec[i].sec->sh_addralign - 1) ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section [%u] alignment (%#"PRIxElfAddr") is not supported\n", - elf->name, i, sec[i].sec->sh_addralign); + printk(XENLOG_ERR LIVEPATCH "%s: Section [%u] alignment (%#"PRIxElfAddr") is not supported\n", + elf->name, i, sec[i].sec->sh_addralign); return -EOPNOTSUPP; } else if ( sec[i].sec->sh_addralign && sec[i].sec->sh_addr % sec[i].sec->sh_addralign ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section [%u] addr (%#"PRIxElfAddr") is not aligned properly (%#"PRIxElfAddr")\n", - elf->name, i, sec[i].sec->sh_addr, sec[i].sec->sh_addralign); + printk(XENLOG_ERR LIVEPATCH "%s: Section [%u] addr (%#"PRIxElfAddr") is not aligned properly (%#"PRIxElfAddr")\n", + elf->name, i, sec[i].sec->sh_addr, sec[i].sec->sh_addralign); return -EINVAL; } else if ( (sec[i].sec->sh_flags & (SHF_WRITE | SHF_ALLOC)) && @@ -112,8 +112,8 @@ static int elf_resolve_sections(struct livepatch_elf *elf, const void *data) { if ( elf->symtab ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Unsupported multiple symbol tables!\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Unsupported multiple symbol tables\n", + elf->name); return -EOPNOTSUPP; } @@ -126,10 +126,10 @@ static int elf_resolve_sections(struct livepatch_elf *elf, const void *data) */ if ( elf->symtab->sec->sh_link >= elf->hdr->e_shnum ) { - dprintk(XENLOG_ERR, LIVEPATCH - "%s: Symbol table idx (%u) to strtab past end (%u)\n", - elf->name, elf->symtab->sec->sh_link, - elf->hdr->e_shnum); + printk(XENLOG_ERR LIVEPATCH + "%s: Symbol table idx (%u) to strtab past end (%u)\n", + elf->name, elf->symtab->sec->sh_link, + elf->hdr->e_shnum); return -EINVAL; } } @@ -137,8 +137,8 @@ static int elf_resolve_sections(struct livepatch_elf *elf, const void *data) if ( !elf->symtab ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: No symbol table found!\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: No symbol table found\n", + elf->name); return -EINVAL; } @@ -146,8 +146,8 @@ static int elf_resolve_sections(struct livepatch_elf *elf, const void *data) elf->symtab->sec->sh_entsize < sizeof(Elf_Sym) || elf->symtab->sec->sh_size % elf->symtab->sec->sh_entsize ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Symbol table header is corrupted!\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Symbol table header is corrupted\n", + elf->name); return -EINVAL; } @@ -160,8 +160,8 @@ static int elf_resolve_sections(struct livepatch_elf *elf, const void *data) rc = elf_verify_strtab(elf->strtab); if ( rc ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: String table section is corrupted\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: String table section is corrupted\n", + elf->name); } return rc; @@ -185,8 +185,8 @@ static int elf_resolve_section_names(struct livepatch_elf *elf, const void *data rc = elf_verify_strtab(sec); if ( rc ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section string table is corrupted\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Section string table is corrupted\n", + elf->name); return rc; } @@ -203,8 +203,8 @@ static int elf_resolve_section_names(struct livepatch_elf *elf, const void *data /* Boundary check on offset of name within the .shstrtab. */ if ( delta >= sec->sec->sh_size ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section %u name is not within .shstrtab!\n", - elf->name, i); + printk(XENLOG_ERR LIVEPATCH "%s: Section %u name is not within .shstrtab\n", + elf->name, i); return -EINVAL; } @@ -241,7 +241,7 @@ static int elf_get_sym(struct livepatch_elf *elf, const void *data) sym = xzalloc_array(struct livepatch_elf_sym, nsym); if ( !sym ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Could not allocate memory for symbols\n", + printk(XENLOG_ERR LIVEPATCH "%s: Could not allocate memory for symbols\n", elf->name); return -ENOMEM; } @@ -257,8 +257,8 @@ static int elf_get_sym(struct livepatch_elf *elf, const void *data) /* Boundary check within the .strtab. */ if ( delta >= strtab_sec->sec->sh_size ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Symbol [%u] name is not within .strtab!\n", - elf->name, i); + printk(XENLOG_ERR LIVEPATCH "%s: Symbol [%u] name is not within .strtab\n", + elf->name, i); return -EINVAL; } @@ -266,8 +266,8 @@ static int elf_get_sym(struct livepatch_elf *elf, const void *data) sym[i].name = strtab_sec->data + delta; if ( arch_livepatch_symbol_deny(elf, &sym[i]) ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Symbol '%s' should not be in payload!\n", - elf->name, sym[i].name); + printk(XENLOG_ERR LIVEPATCH "%s: Symbol '%s' should not be in payload\n", + elf->name, sym[i].name); return -EINVAL; } } @@ -292,8 +292,8 @@ int livepatch_elf_resolve_symbols(struct livepatch_elf *elf) switch ( idx ) { case SHN_COMMON: - dprintk(XENLOG_ERR, LIVEPATCH "%s: Unexpected common symbol: %s\n", - elf->name, elf->sym[i].name); + printk(XENLOG_ERR LIVEPATCH "%s: Unexpected common symbol: %s\n", + elf->name, elf->sym[i].name); rc = -EINVAL; break; @@ -304,8 +304,8 @@ int livepatch_elf_resolve_symbols(struct livepatch_elf *elf) st_value = livepatch_symbols_lookup_by_name(elf->sym[i].name); if ( !st_value ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Unknown symbol: %s\n", - elf->name, elf->sym[i].name); + printk(XENLOG_ERR LIVEPATCH "%s: Unknown symbol: %s\n", + elf->name, elf->sym[i].name); rc = -ENOENT; break; } @@ -328,7 +328,7 @@ int livepatch_elf_resolve_symbols(struct livepatch_elf *elf) if ( rc ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Out of bounds symbol section %#x\n", + printk(XENLOG_ERR LIVEPATCH "%s: Out of bounds symbol section %#x\n", elf->name, idx); break; } @@ -381,8 +381,8 @@ int livepatch_elf_perform_relocs(struct livepatch_elf *elf) if ( r->sec->sh_link != elf->symtab_idx ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Relative link of %s is incorrect (%d, expected=%d)\n", - elf->name, r->name, r->sec->sh_link, elf->symtab_idx); + printk(XENLOG_ERR LIVEPATCH "%s: Relative link of %s is incorrect (%d, expected=%d)\n", + elf->name, r->name, r->sec->sh_link, elf->symtab_idx); rc = -EINVAL; break; } @@ -397,8 +397,8 @@ int livepatch_elf_perform_relocs(struct livepatch_elf *elf) if ( r->sec->sh_entsize < sz || r->sec->sh_size % r->sec->sh_entsize ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section relative header is corrupted!\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Section relative header is corrupted\n", + elf->name); rc = -EINVAL; break; } @@ -422,14 +422,14 @@ static int livepatch_header_check(const struct livepatch_elf *elf) if ( sizeof(*elf->hdr) > elf->len ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section header is bigger than payload!\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Section header is bigger than payload\n", + elf->name); return -EINVAL; } if ( !IS_ELF(*hdr) ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Not an ELF payload!\n", elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Not an ELF payload\n", elf->name); return -EINVAL; } @@ -442,7 +442,7 @@ static int livepatch_header_check(const struct livepatch_elf *elf) hdr->e_type != ET_REL || hdr->e_phnum != 0 ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Invalid ELF payload!\n", elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Invalid ELF payload\n", elf->name); return -EOPNOTSUPP; } @@ -452,45 +452,45 @@ static int livepatch_header_check(const struct livepatch_elf *elf) if ( elf->hdr->e_shstrndx == SHN_UNDEF ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section name idx is undefined!?\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Section name idx is undefined\n", + elf->name); return -EINVAL; } /* Arbitrary boundary limit. */ if ( elf->hdr->e_shnum >= 1024 ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Too many (%u) sections!\n", - elf->name, elf->hdr->e_shnum); + printk(XENLOG_ERR LIVEPATCH "%s: Too many (%u) sections\n", + elf->name, elf->hdr->e_shnum); return -EOPNOTSUPP; } /* Check that section name index is within the sections. */ if ( elf->hdr->e_shstrndx >= elf->hdr->e_shnum ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section name idx (%u) is past end of sections (%u)!\n", - elf->name, elf->hdr->e_shstrndx, elf->hdr->e_shnum); + printk(XENLOG_ERR LIVEPATCH "%s: Section name idx (%u) is past end of sections (%u)\n", + elf->name, elf->hdr->e_shstrndx, elf->hdr->e_shnum); return -EINVAL; } if ( elf->hdr->e_shoff >= elf->len ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Bogus e_shoff!\n", elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Bogus e_shoff\n", elf->name); return -EINVAL; } if ( elf->hdr->e_shentsize < sizeof(Elf_Shdr) ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section header size is %u! Expected %zu!?\n", - elf->name, elf->hdr->e_shentsize, sizeof(Elf_Shdr)); + printk(XENLOG_ERR LIVEPATCH "%s: Section header size is %u! Expected %zu.\n", + elf->name, elf->hdr->e_shentsize, sizeof(Elf_Shdr)); return -EINVAL; } if ( ((elf->len - elf->hdr->e_shoff) / elf->hdr->e_shentsize) < elf->hdr->e_shnum ) { - dprintk(XENLOG_ERR, LIVEPATCH "%s: Section header size is corrupted!\n", - elf->name); + printk(XENLOG_ERR LIVEPATCH "%s: Section header size is corrupted\n", + elf->name); return -EINVAL; }