Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3697433imd; Mon, 29 Oct 2018 10:55:23 -0700 (PDT) X-Google-Smtp-Source: AJdET5esZ5/PXEM+XJgjBevI+F7hawR69R4DkmU1O/+MWrhP9oUX4n5CEhrORG/2SdCFMO2CwW7r X-Received: by 2002:a63:6ac5:: with SMTP id f188mr14874781pgc.165.1540835723907; Mon, 29 Oct 2018 10:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540835723; cv=none; d=google.com; s=arc-20160816; b=G/2cbc7zwXb0zJlUvVYpom8xlu527/YQJY0wndjS3JS3Y8qIjHjcwfjP7qLi5CWicA J2Z5k0ZOWZpA3+eYxGruHCXCqkiJTzZkoj9GX/MUBaGUEbbiIT9VVOsip9N2gS59Xyec +Qa44IMJCaQhxTu+ciJzIZVSytc+cr9qJhnNnyRbl++ltXjf35GS3Jz58n36uTW2yOHB fwdcTr0KrZzEHI5plqdMTCc25ifB9Lr5EVdY8j4UYyy1S9IbiHbXaeVLl41eE6cDrWJ/ J5yzxYaneDaSbmiAwKfh9y1eJMg3Bh6y9lMKb03TDmQczuKoRYnoLaDH/KYRkXITM5Cy jRmQ== 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=dSRBAJc5LjP0q5OJVj+GJWLu8GLrm3rpsIZDICYf+sg=; b=S78/9y362Mj1xlUAn2e9gQbGUxWlZnJqiyIzp3tx5JbmkQM21VYmISLp1VJ7V5+FZF Et5ilgCoEQObX0yT6WwGCKCWLcNF0AYz7SJLBQ1O7fm3LCxmpPUIvpvpaADKyBIhvYXz lvkhnoroa7BEYu6absXLJ+6dvN5d5FT03drqjZww8J1adQN8feNmd16HyfFXkK2y+bpq vkVtDcCSAAn+HT2Frn8GjwvTEc9KWAJwmKo4Kb/Zh9CWCegSj49iOf214WeCnYbBqGbY g4kxGtiLlAkdw3ZaK5h4l6GIkgYxsQp+xfZEZnpgQXCiL3ieosKd4+1e8Z8G+fq3hesx OZ+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DQ6AoN4m; 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 e4-v6si20841764pls.214.2018.10.29.10.55.07; Mon, 29 Oct 2018 10:55:23 -0700 (PDT) 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=DQ6AoN4m; 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 S1728221AbeJ3CoV (ORCPT + 99 others); Mon, 29 Oct 2018 22:44:21 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39572 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727834AbeJ3CoV (ORCPT ); Mon, 29 Oct 2018 22:44:21 -0400 Received: by mail-pg1-f194.google.com with SMTP id r9-v6so4273168pgv.6 for ; Mon, 29 Oct 2018 10:54:41 -0700 (PDT) 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=dSRBAJc5LjP0q5OJVj+GJWLu8GLrm3rpsIZDICYf+sg=; b=DQ6AoN4mF54G/icj5lBMWGhZ4iWMO8x8DBlN3zsG31Pc1xz7P5mYixswVbf6xhV4/H WjElr0+2zmHrpMdPL7oBZJ742nNedfPz2hHISNtsg2Vm6X+L6EBM095DE9wkDJ1sL6Jq 2IE5mU1XtzUurNJtaSy1QlwRprNYfM5XEoU52t56dKByc1+SvPddXo23s/IkIB5/sfGa sRZ8BWZFzV8URRKQ7XNzImTjgJd4Hfco5bnO5g93pNWs22zn/PqiYQVDmZ/sOTYVq0BA v/jOzivQlkAdo0XGSMbTyypNqCwVaotpGJI+ox8jxS5DtSCB8H24UxnbnOkipH/g/uJ0 JEyg== 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=dSRBAJc5LjP0q5OJVj+GJWLu8GLrm3rpsIZDICYf+sg=; b=bRRyR7idPBRwOdRGi54npXHDTUlW9oYOMbiMuFI/wp2eePXouZ94kcV8KkgGW1YoUy HNPrY13G4gxZ77oI4C1jjg8WHu7PoN/13Dxf9LpYdzUudwS83+uRrRvU+T3qmxn79YTx 8+hXio63fQtZSARciLJWqoluhZQ8WR4dMFIb5zuYLD3fwW3xJw6M59CCxKxaObX8BLOP gSeIXziAIZrum5Rs6e/AC3wWmZMVLImTgpEGnffA3GleybfD9K4LkZBq8XYZNT3bQirG eekkdDJUGOfIUVZTIU//7BBENQn3JFMfFnyZEnwzOFVQFb7RdfVeH74vTYzHft5pAjAV gl1A== X-Gm-Message-State: AGRZ1gJtPY4A1E+NAsB/xJOYuUwjV8FDcV0Mtn9i4/AgG6h/NQZjIU1G pwvrrA06CQxHK5oi6yNY6TBe1kjlczULpQGixbz0pQ== X-Received: by 2002:a62:5bc4:: with SMTP id p187-v6mr13503819pfb.94.1540835680718; Mon, 29 Oct 2018 10:54:40 -0700 (PDT) MIME-Version: 1.0 References: <0147a993d4a94426afa469a8dcc4e5d7@AcuMS.aculab.com> <20181022234357.82217-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Mon, 29 Oct 2018 10:54:29 -0700 Message-ID: Subject: Re: [PATCH v2] [PATCH] KEYS: trusted: fix -Wvarags warning To: jarkko.sakkinen@linux.intel.com Cc: dhowells@redhat.com, "James E.J. Bottomley" , Nathan Chancellor , David.Laight@aculab.com, denkenz@gmail.com, zohar@linux.vnet.ibm.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 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? -- Thanks, ~Nick Desaulniers