Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1694253imj; Thu, 14 Feb 2019 10:25:59 -0800 (PST) X-Google-Smtp-Source: AHgI3IaMLcxAYVB3GkowLfW+qkjNBogXtWhE/brrlpz7mvnMsJQVjP7L2WXEvi3glscxB2NG5pg+ X-Received: by 2002:a17:902:3381:: with SMTP id b1mr5666524plc.13.1550168759273; Thu, 14 Feb 2019 10:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550168759; cv=none; d=google.com; s=arc-20160816; b=vzioRtph226frCPZTxU2QCUfQBQeQrRCqBRCMh6vf1bZjn2QHdjZOe+BnIx7jIx8Hp Umse2pzqQlmdYAYclo5rkR4NOkvOtxHK1zxjHrKg7XwibzUML/jxzlefbVUwizx1+tLZ fk6H50rmd0ZbrpyO7Zds53hVno8DvmMcxSyDYErpypfoGTQJD/5XD98R1C87dVw0AUYK scFiXi3695t09p/uNAqqttci9t8vShQ5XCVQBHlCkK9TobWpnQFjrzWFDXRy7MUvYIbz udnpfly6GQeGDd6O4iny81f1pDgP9PEcAw0m3vQVGywo/9XXeiOh646fbncK8BHows3B 8wMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=joT5YN1kWgmFKs1s9u8I25FDiBohBcc1hmN+PvQgopY=; b=Vi+Eo3TR8bt7ImyidnWoWaSIj/5U0T+p7EGQesq5jA+kFtX5Pys5yu23pDoc26DEWW TTxI+4aF+V6mVWF9RqvzXDiBk2N0aXJ3BpbEjMi6/4B7zLCCRDENY3lYVN1VyolKIfoa K24R2l5yH746pSb16tAQ/ffZStXx49NvfNEs4tqTtYhNBfe3Nleuy0nGVlYETpeevT3q 1oe5jo7+9xdzmtXW2YdB9aXLrFVRvO5IPu/FdHtY6d4Sm544IGzAzyxTwsLSRtfFgRLm Jh9P5f/I24TKHtNww9F6WsRbgZojZ80wFmQ4ZN1spuUefgplJZjIHPe0LEP8I4+ZiMog gSfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si2827105pgv.262.2019.02.14.10.25.43; Thu, 14 Feb 2019 10:25:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406744AbfBNKwa (ORCPT + 99 others); Thu, 14 Feb 2019 05:52:30 -0500 Received: from mga05.intel.com ([192.55.52.43]:49830 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388138AbfBNKw3 (ORCPT ); Thu, 14 Feb 2019 05:52:29 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2019 02:52:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,368,1544515200"; d="scan'208";a="134242065" Received: from djustese-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.254.237]) by orsmga002.jf.intel.com with ESMTP; 14 Feb 2019 02:52:21 -0800 Date: Thu, 14 Feb 2019 12:52:21 +0200 From: Jarkko Sakkinen To: Nick Desaulniers Cc: "James E.J. Bottomley" , zohar@linux.vnet.ibm.com, David Howells , Nathan Chancellor , David.Laight@aculab.com, denkenz@gmail.com, jmorris@namei.org, serge@hallyn.com, keyrings@vger.kernel.org, LKML , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v2] [PATCH] KEYS: trusted: fix -Wvarags warning Message-ID: <20190214105221.GB7956@linux.intel.com> References: <0147a993d4a94426afa469a8dcc4e5d7@AcuMS.aculab.com> <20181022234357.82217-1-ndesaulniers@google.com> <20190212231256.GD3977@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190212231256.GD3977@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 13, 2019 at 01:12:56AM +0200, Jarkko Sakkinen wrote: > On Mon, Feb 11, 2019 at 10:36:51AM -0800, Nick Desaulniers wrote: > > On Mon, Oct 29, 2018 at 10:54 AM Nick Desaulniers > > wrote: > > > > > > On Wed, Oct 24, 2018 at 1:37 AM Jarkko Sakkinen > > > wrote: > > > > > > > > On Mon, 22 Oct 2018, ndesaulniers@google.com wrote: > > > > > Fixes the warning reported by Clang: > > > > > security/keys/trusted.c:146:17: warning: passing an object that > > > > > undergoes default > > > > > argument promotion to 'va_start' has undefined behavior [-Wvarargs] > > > > > va_start(argp, h3); > > > > > ^ > > > > > security/keys/trusted.c:126:37: note: parameter of type 'unsigned > > > > > char' is declared here > > > > > unsigned char *h2, unsigned char h3, ...) > > > > > ^ > > > > > Specifically, it seems that both the C90 (4.8.1.1) and C11 (7.16.1.4) > > > > > standards explicitly call this out as undefined behavior: > > > > > > > > > > The parameter parmN is the identifier of the rightmost parameter in > > > > > the variable parameter list in the function definition (the one just > > > > > before the ...). If the parameter parmN is declared with ... or with a > > > > > type that is not compatible with the type that results after > > > > > application of the default argument promotions, the behavior is > > > > > undefined. > > > > > > > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/41 > > > > > Link: https://www.eskimo.com/~scs/cclass/int/sx11c.html > > > > > Suggested-by: David Laight > > > > > Suggested-by: Denis Kenzior > > > > > Suggested-by: James Bottomley > > > > > Suggested-by: Nathan Chancellor > > > > > Signed-off-by: Nick Desaulniers > > > > > > > > Reviewed-by: Jarkko Sakkinen > > > > > > > > /Jarkko > > > > > > Bumping the maintainers if this isn't already picked up? > > > > James, Jarkko, or Mimi, can you please pick this up (and let me know > > what tree it lands in)? > > I can volunteer. Have not done yet v5.1 PR so it would land to that > release. Is this agreed? http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/cfb1f7ee3b35e6ba9e9e2de53a8668ced6397f88 /Jarkko