Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4516281imj; Tue, 12 Feb 2019 18:18:28 -0800 (PST) X-Google-Smtp-Source: AHgI3IYK4AISzieofwsM7no4jYdmeQfc0XOjBJHRmGHTeqfeYFu0XE44Sa8076+BddpqgUDxD0RG X-Received: by 2002:a17:902:2c83:: with SMTP id n3mr3182991plb.104.1550024308767; Tue, 12 Feb 2019 18:18:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550024308; cv=none; d=google.com; s=arc-20160816; b=WV7PdGXlCmfirroYDQNLfqEXt7s9C/ndfuHI6KxBepvvz02nV1jtR61rPZ9i5kp8ou FZLxHk1A7DuaNTsTSVZe1lmufjx9EXacHFyDzQkzhFtoFxyx4sRrZ/Q53vgsSo62tiEQ ZAqXrSI1dPKPWfhNrMOmo6sArBqC6n8o9FZIsmOylRt9AZrmLVzM9ZdR8nGEd7SQTJPf C11ZaDvcEVW9m3S+S3mOh3gcC5Vtn6EL2xlPGyY33JPpGbDY/6NsNUbbklTqnsMR6Ix4 TDyi1pblyWsev86XR7JMMx1nVOrREV+JqE2Obv8Emq3A9ZbzhuBHjNrrycz87jD7CYH4 0Ekg== 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=p+ZqygbyKk1qSdCUNgdz62Lc5rA54REy9htTpNk/s/A=; b=M4awEH++2NKMeaCdxBqv+qO5s8fjezzOMM34Y42bR9evyCvtFc5cCtcbLziC/G3Y1s uL6ujOfhTaqIXQV7znqi0Mzq0y9yuB7yUbUaaz05onMw6XNQcc11s7lfyiCmvZb2oeW3 mvgrmE3PmxcWkqXTQjQDXw+4z9TJ1W3OhDMrhhQ2GGjh5lBP8PYVgNZfxfrIIhnMvb7f GB51radwtd6x7IXclqVQz8beMKH51syp0Hj8Ze3HjEiLhewPbgEpUYnVWVVL1lKA9fJd wR0/kYKh48UxHw8Kmjoq5t5ly5Zv+4AbkLSyghqTqgtyeDZTLuTUw8sr4asVcp48t4FG VvRw== 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 d14si14806257pll.30.2019.02.12.18.18.13; Tue, 12 Feb 2019 18:18:28 -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 S1731252AbfBLXNF (ORCPT + 99 others); Tue, 12 Feb 2019 18:13:05 -0500 Received: from mga03.intel.com ([134.134.136.65]:47418 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730495AbfBLXNF (ORCPT ); Tue, 12 Feb 2019 18:13:05 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2019 15:13:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,362,1544515200"; d="scan'208";a="124013186" Received: from briva-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.254.236]) by fmsmga008.fm.intel.com with ESMTP; 12 Feb 2019 15:12:57 -0800 Date: Wed, 13 Feb 2019 01:12:56 +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: <20190212231256.GD3977@linux.intel.com> References: <0147a993d4a94426afa469a8dcc4e5d7@AcuMS.aculab.com> <20181022234357.82217-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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? /Jarkko