Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp888095imm; Fri, 12 Oct 2018 08:16:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV61FtMgvvdFA/ehQCNwcthj3Lax+6yqatPaiuARzLhrzA+UjjvA5x850eN45RRWIPd4F8XWf X-Received: by 2002:a63:608c:: with SMTP id u134-v6mr5812145pgb.266.1539357381343; Fri, 12 Oct 2018 08:16:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539357381; cv=none; d=google.com; s=arc-20160816; b=033WVZcx+aHQ4Z2h0RSICePI3Us9PvqqRRKm0otl4mEoWkvgkWWgx2SZrJMyd2czqx 5BlXfLnPqA4c2ZfY08Mw+KMRN88mkHv8aoBwD21GeNoKMFzXUEVQksGoFsoLNTJSm6DQ dKlXl9MxkFUIKrOLdMZdqI7Rt+X7oI1qIPS5HFi6X6+oB75YPPICny9E/xXY6WL9Z80i h5Y/rVjg+ZAMhcOqTor8rmVwCNJjIYAcROf5Yulv9juT4X+Gg1e1KVtHH+T7Dw0ECXyd eNaxjbLJCwF8ufOwjD6n/lPYbFbUPjzU3MtIj2zBgDAVjIGKmAOCBkfSXtBiLHRDQ+6Q 41cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=OX0jD8o5jFFMWMMxlWPTg+rLnbH5CF/R0JGC9Srfuo8=; b=tJIsv5v5HETIr2ZZ0SDs6Y8DABbZTRrHPMupkUVHm2CsjAzOWg4UNil2O4EcXicg6C nqwtrmX1GafNcowVOZ1sJHTithnuNfZbbdMtzBmAkC42tScfzXl2qshNmp8gYQW4xTyF zvTjWKctPfbUO6gyyQ4DHing0ZCaxNu1mTL7+c4Omd05C4Fz2Zpz4t1TOQWusG9S4UYH 4xaxzZecMAvWdkg/W3jDTqxzw+6QWJ5lExMcRZGp+iUFNVMogNh/EDrmKr/z3rUJcD2c RvpLnCVzS5456olVsKXVSkOgYDMUoGBz6bgK9SrI4J/VWniV95LpqH6Jg5rhFaXFGefG eN8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dCw5596U; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h131-v6si1510499pgc.122.2018.10.12.08.16.05; Fri, 12 Oct 2018 08:16:21 -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=@gmail.com header.s=20161025 header.b=dCw5596U; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728958AbeJLWq7 (ORCPT + 99 others); Fri, 12 Oct 2018 18:46:59 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:43366 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728178AbeJLWq7 (ORCPT ); Fri, 12 Oct 2018 18:46:59 -0400 Received: by mail-io1-f66.google.com with SMTP id y10-v6so9451253ioa.10; Fri, 12 Oct 2018 08:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OX0jD8o5jFFMWMMxlWPTg+rLnbH5CF/R0JGC9Srfuo8=; b=dCw5596UuGVifnScmeUSHblReg2vSTtdwfxx0uX8gMmwpnabDh02aLmoRHOdj2uhYK qG0PGd5vCkK+oOgu1YH/VMN/GDKQgyggcpO1++qVeqkHfCyTPtmrIlDiRWn5HOeYyFyR 524cUUR56TTVbNUCzLoP5N0FGMTIa1dyQYZ72sM3GP3BUFy2ag4DBZ1wmub1+WwSD/Sd OqSqAoStd/8XkvBso7ZA0SqgGAG2PAQqmed96RvmkRPVIAQ3NIN3RyPmzCQga/OLPDC6 2DPn6jKrTmu2OC5eK2AZ91vvv7LNOJ1KhCjEtfV2C3EAJ2nCEFoykih4cW0qEeIyTOq4 PQBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OX0jD8o5jFFMWMMxlWPTg+rLnbH5CF/R0JGC9Srfuo8=; b=KEaSrfeZy2jhNQhqWxotEYXMr6wwPspbb8WdO/AIMOEWvXPvAM3r0W4yEKauqXUkgA kBTdZ0BexbLMRN+rA9oHdjrU7xSAOm+W9cySpKfqZ+nS5DrD4Zz3AV3l0c9oysAqYS7e xsV5K0ZWri/yP5pRnCvljbUIhdNDI3No6BQMc2xWt5v/EayBt94kVz4wk2wq53IHokzY bVACsM32QMOAtZSDmIU3DChixDcvBiJOTPuS4uI4ZUXJ6w0QI16/xnsIdR6HKIX2ZrYN diO2kJCABaFlrjey1ZMKVBgqaXGZ7Qb45bKLqXlnL5EwFvLRDXWTsJgkriSf6fHwqWrV NDMQ== X-Gm-Message-State: ABuFfoiTJuvDWVs0INEpbYuUTuJjT7gQrQKeP6cO7ZNYexn4Zfh5FVOP Ku5pTGxsfadHwVMTqt/B1cuaDRQ5zcY= X-Received: by 2002:a6b:e217:: with SMTP id z23-v6mr4401215ioc.70.1539357243273; Fri, 12 Oct 2018 08:14:03 -0700 (PDT) Received: from [192.168.1.249] (cpe-70-114-247-242.austin.res.rr.com. [70.114.247.242]) by smtp.googlemail.com with ESMTPSA id x21-v6sm722203ita.6.2018.10.12.08.13.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 08:14:00 -0700 (PDT) Subject: Re: [PATCH] KEYS: trusted: fix -Wvarags warning To: James Bottomley , ndesaulniers@google.com, dhowells@redhat.com Cc: natechancellor@gmail.com, ebiggers@google.com, Mimi Zohar , James Morris , "Serge E. Hallyn" , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org References: <1539274203.2623.56.camel@linux.vnet.ibm.com> <20181011203126.15338-1-ndesaulniers@google.com> <1539356751.2656.5.camel@linux.ibm.com> From: Denis Kenzior Message-ID: Date: Fri, 12 Oct 2018 10:13:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1539356751.2656.5.camel@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, >> So can't we simply use 'bool' or uint32 as the type for h3 instead >> of re-ordering everything > > The problem is the standard is ambiguious. The only thing that's > guaranteed to work for all time is a char *. If you want to keep the > order, what I'd suggest is inserting a dummy pointer argument which is > always expected to be NULL between the h3 and the varargs. So maybe I'm misunderstanding something, but the issue seems to be that unsigned char is promoted to 'unsigned char *' by Clang and probably unsigned int or int by gcc. So instead of having unsigned char h3, can't we simply have bool h3 or unsigned int h3? Regards, -Denis