Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp173464pxv; Thu, 24 Jun 2021 05:34:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMKoAw/G6jYrQuI4G15ch1bq8yJkChRokfSB/YAPg0sMc+6Fy9ewQ2bLmsAsRO2tJE4oUV X-Received: by 2002:a05:6402:5248:: with SMTP id t8mr6983188edd.110.1624538096821; Thu, 24 Jun 2021 05:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624538096; cv=none; d=google.com; s=arc-20160816; b=TXHdNHCJO7diRvgj9QuNmwSlv+vquoovu569sOqtlBfcsngW/RUaKv/3t/QyDkn3Xt PEF3RQKNecrCn2B+/hlYI4SJofeEibM1PMfltdyWJMFtCZDX52NB/PRCAAIrLZGiVkxK R53HHraXym2q8hp54tqAFjbOiV9BFCnkuZ/YgpnkBalX5xl8a1HYsfyvdPXu6y01gHRS WcWV7TA22XWCw/zlXVlf8cDI4qiTccNWJizoBKwtiJrLQBWIRXU2+W7L03PRLU7kcO5d 4KAuoaK7ALi6J7U25qbUo8a2UM1SaNoKeWjJVGW3/2GzvK47CDGNixEWdfDg/Qn03o6y S9aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=w3Imzx+Dttr4Se/KutyUyF0VY+n/AzDUQ7OUjfDHAgM=; b=gS1kZDfAdVnykFCiAfSFvLIlQZ+fshux2hb0RuhFCG8B+n036x0ClKCmzZjmdw5ICp WvbRGVp1/QxeB0UPXdSpPGsfXkF9cFgP1GVgT7DzGW4pWYs6rbMne0ziGnzCC2Jl/gNb WyXwnVjNYu9X9VxOA0EM6rX61k/P/Z6wwQkjHtclshJypjvdf1+rxn23WGmWM0JKgd7p r5yKvceVigrF+ACSsmJWQdZzzfp8QiJ+sIz5YZ+gY8h0RDLDZQoi2a3HQ4Y9D7+H1bcM E7q/Wt0XGj0CgpIUcJVZtvsUda/OHMUPRsajyDZ1tLCNblJq3NfUIR7Qv/Woyjg3QNjZ 61eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=c0DP3acQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z22si3176540edd.361.2021.06.24.05.34.33; Thu, 24 Jun 2021 05:34:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=c0DP3acQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231707AbhFXMfL (ORCPT + 99 others); Thu, 24 Jun 2021 08:35:11 -0400 Received: from mail.skyhub.de ([5.9.137.197]:37282 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbhFXMfJ (ORCPT ); Thu, 24 Jun 2021 08:35:09 -0400 Received: from zn.tnic (p200300ec2f0c1e00373e146aff8faaa8.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:1e00:373e:146a:ff8f:aaa8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 6F6FA1EC046E; Thu, 24 Jun 2021 14:32:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1624537969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=w3Imzx+Dttr4Se/KutyUyF0VY+n/AzDUQ7OUjfDHAgM=; b=c0DP3acQFntZSlcpq9n/Uf/3sV2iLEpv8qxPfZ5ca4KWx2A85kYx1S5tkEh2TSacFsWBLA Ckh5YxtV5n2aHqKOmwJ4uTI+jT3QcukGhjTIvzwpaeVEA3hNLJQ4rlhkdt21ZPuGnwnHbb FQsK+lNO5tG5+jj7PjRgC0CVGM37u/Q= Date: Thu, 24 Jun 2021 14:32:43 +0200 From: Borislav Petkov To: Greg Kroah-Hartman Cc: x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH] x86/tools/relocs: add __printf attribute to die() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 24, 2021 at 01:58:03PM +0200, Greg Kroah-Hartman wrote: > There are a number of printf "mismatches" in the use of die() in > x86/tools/relocs.c. Fix them up and add the printf attribute to the > reloc.h header file to prevent them from ever coming back. > > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: "H. Peter Anvin" > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- > arch/x86/tools/relocs.c | 21 +++++++++++---------- > arch/x86/tools/relocs.h | 1 + > 2 files changed, 12 insertions(+), 10 deletions(-) > > Originally sent back in Feb, but it seems to have been missed: > https://lore.kernel.org/r/20210227095356.603513-1-gregkh@linuxfoundation.org > > > diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c > index ce7188cbdae5..c3105a8c6cde 100644 > --- a/arch/x86/tools/relocs.c > +++ b/arch/x86/tools/relocs.c > @@ -389,7 +389,8 @@ static void read_ehdr(FILE *fp) > Elf_Shdr shdr; > > if (fseek(fp, ehdr.e_shoff, SEEK_SET) < 0) > - die("Seek to %d failed: %s\n", ehdr.e_shoff, strerror(errno)); > + die("Seek to %d failed: %s\n", > + (int)ehdr.e_shoff, strerror(errno)); Instead of casting all those, I think you should use %zu as, apparently, we're using unsigned types for Elf{32,64}_Off and Elf{32,64}_Xword, etc. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette