Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3032494imj; Mon, 11 Feb 2019 12:38:21 -0800 (PST) X-Google-Smtp-Source: AHgI3IYktcSBL2YsEsUpMYJyFtAvxMhy+xrtYP1KjwqcJaViahtVHBjZ4jTx5ROzjt04HMCLKnto X-Received: by 2002:a17:902:d83:: with SMTP id 3mr93103plv.43.1549917501443; Mon, 11 Feb 2019 12:38:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549917501; cv=none; d=google.com; s=arc-20160816; b=F0sUJQUQpkkJsRAM5WU2CiQ8upb2WjivQYpPybwzq8MLvQS7Hn3tXIbyByyr1m78+s l+ZfNm4+UuAkO9irDYqJpSw8oRD4W4lyvPg/pozw3POH3TSxau/1/D+BUAcdZZhPm4Pr f7iZYxxP2l4loq86yN4vj+9Xl1Wqv6AllqsT7+HpyaXnNJxhUb6ooIgDFSAdYzNR5aW9 ny9KVOglPMMrNL4onoZTNa9GWhS5KAlrZPd97heP6LAaiFh4DFiUiWw4UQxcImypwJSr LjjvKekaLmvvhzher8UI+LRuHvFIS/NrOdGP4t5H1l3KiwtVvPPjqYKKh7EAnb58prJt D10Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=nArp1SIyjhYvkr2+dj1tRdHY+8xTs51Con5kosXTkNg=; b=YejsutHl8Auo2V3lMwL+5+NqZKZXNTWjL1r+eq60T3g8wyESBCEuA5mngTSK7XZ0Ou k2eQxnBixsc73OhbRwvxnmoZoJPocq1FE1NxzLjzj2hUgz62FL84/hRGBxT0ESTXn09g dUw/tiBfS3m/3ZSP1rhdOkjd/3i+oTqxqux9jMci0+BoWRBAcaQ0SfPH7y8m2t2+qGoF 35KnATXznFooVuCC7/xozG5wdNatnm2OuYAxcvkdQ3b5okyyPL1CcJMxxWhxiuLJyFZW nVXXU9TNF2M1q5BYpKnGyHmtUhqt+E/6bMEC03+O/12TbopFOiPp7Z0dvlQ0A4LUA4Iy ph4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ou1Wfg2g; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d130si10125751pgc.232.2019.02.11.12.38.05; Mon, 11 Feb 2019 12:38:21 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Ou1Wfg2g; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732753AbfBKShE (ORCPT + 99 others); Mon, 11 Feb 2019 13:37:04 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45856 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732413AbfBKShE (ORCPT ); Mon, 11 Feb 2019 13:37:04 -0500 Received: by mail-pg1-f196.google.com with SMTP id y4so5320270pgc.12 for ; Mon, 11 Feb 2019 10:37:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nArp1SIyjhYvkr2+dj1tRdHY+8xTs51Con5kosXTkNg=; b=Ou1Wfg2gwsp34FXdvlHuufYk5gVul5L2Ro9KR6BvE3BRAlTR790QoyHzGbM/uNVBLQ 9YbQsoUx68UcTcZbpBEJdvDC3hadlcSJv7Xg1vKzP8v2m/Woxv9Eb9kt3huX2WBijydL HBKIukouO2OxxZR6LBpt8Elfp0RTFiktZ9OrPMR4R7QcY9Kqwhiy94Ke4UzHGoT0JCWF 4HhmEHM4HPUzMODyxMElHSOTS1ngr4ZRrs6DO8nKDS9k1mRnlyC1zqe2H00QqIDMYovU cmvXy3LlaAYNyk2VBiwQvdIuLnbTgVIGLxwiqhkyDX4Hd7Z5uJFY22eK7QFPQRnmOMZd PvjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nArp1SIyjhYvkr2+dj1tRdHY+8xTs51Con5kosXTkNg=; b=WA/zsu5RKXNXYMQrNVZ10ULrqGDM07UD0jbCqWw/S7XtNaIVMa5YSUVo5IXQbEjBTW RHt5Z5sWpTXsGituUaZTNKuUAjPB2yS5QpOYpO7QmmoWuSDYc1FLpKANjapulpIT/jio VVJQFn3PpHMF+YNABiPFyYg+4JQCI2/uZBZq1K6iFk7hRCs53skqllUB61Th5CrQRu63 RcXw9l7LA0dB+4YOu20ZfqMR6gWcI3IqMFRfpL83ir+jQRUoP+1VEBuGT36oAF3X5LrL IKenS473I8tKhMmJiQXXk04bSyaprrkRkj+6qLK7gv9eDA6PQ+AflADJKisFAcc1vrXO uQ8Q== X-Gm-Message-State: AHQUAuaD8E6jVBADLX7SREa9FoYV/ygd6tHLTwAkVG1JOkx0pmPnYiiW 6B9ZLbe1EK3JVG0PFM4tkYXpljWdCxHk3QY0ogxXbw== X-Received: by 2002:a63:40c1:: with SMTP id n184mr7885032pga.225.1549910222886; Mon, 11 Feb 2019 10:37:02 -0800 (PST) MIME-Version: 1.0 References: <0147a993d4a94426afa469a8dcc4e5d7@AcuMS.aculab.com> <20181022234357.82217-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Mon, 11 Feb 2019 10:36:51 -0800 Message-ID: Subject: Re: [PATCH v2] [PATCH] KEYS: trusted: fix -Wvarags warning To: "James E.J. Bottomley" , jarkko.sakkinen@linux.intel.com, zohar@linux.vnet.ibm.com Cc: 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)? https://lkml.org/lkml/2018/10/23/116 -- Thanks, ~Nick Desaulniers