Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp899554imm; Fri, 12 Oct 2018 08:26:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV63x69VIk462wh0jAAn/MIViNqfiYbcXvQYnuq9hkfSELhX/Kr6j2pzFk1z/t9qPsHLFkE7v X-Received: by 2002:a17:902:d68e:: with SMTP id v14-v6mr6380475ply.140.1539358007156; Fri, 12 Oct 2018 08:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539358007; cv=none; d=google.com; s=arc-20160816; b=UGEo7Q6zAzKdsY4Dhm0D1uUjcETIoynPiY7l5OOABL5wxIqpMpjSeMD+ZcVb43dNPm Sb6wJQh5waGocRZ9uW0L9G8Pq9Mrb0ppzElFN2nQ1Olh0jXQGLWXBv7lZZk07KPKM8Ql XuDa8oPqqjqJy9rt6D1tCW60PY8L33DG9GgY9YYkG3CvhuH68hk+VDCrf9x+sbCoW0bL VQ3chkDJie/QdXmJKjBjSKp8Y//nCm8M2NRAHrBLd9E9/Bm8xSEb4E+bg7juBUgIwCy0 DujgxT9NLBi6fsZyueQUbkdPKLa4qZm7EkIMGTD0Q7y48a9y+py9uBdvfPqPsibmdD2M dN6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=3rc5cX1b8pFkQoJgfMMofKRP24GaOD7ea9F7FpIc+1s=; b=dL6GelguAN1wW7UJdB6ng1zmoxiPxJ1pQeemn/fJF8e4tk74zx3EuxlH/oaIKtpt2n 9ne4MqfpO5q9m3l3kehd8xflYYomoj4nMcUILlmnvcC38MT5ZLsFyIBLQIaUIchBSwI/ rOQbmNaDdT0rTrVyd40457AQcPL1SDIwB5PaBzMD3NnyW4iEZaVh/CLotLYUNVDIEFIW m6rcnqlMiBvfak7jIqriR5xOcYCzMrjnRBDK2Hg1GeyMJgbUVtzXXULvprqNCWxcot3e qt284yDJDIhfGQEKBCvSOBJLhkEYFvEgJ+wrtcP5QD6w50SatNB7de7vHtEShver99UZ f/1w== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1-v6si1512349pgf.78.2018.10.12.08.26.31; Fri, 12 Oct 2018 08:26:47 -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; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729022AbeJLW7A (ORCPT + 99 others); Fri, 12 Oct 2018 18:59:00 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40544 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728880AbeJLW67 (ORCPT ); Fri, 12 Oct 2018 18:58:59 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9CFP2qH070868 for ; Fri, 12 Oct 2018 11:26:00 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2n2tu6hacv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 12 Oct 2018 11:25:59 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 12 Oct 2018 09:25:59 -0600 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 12 Oct 2018 09:25:55 -0600 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9CFPsdc17891500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 Oct 2018 08:25:54 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B45507805C; Fri, 12 Oct 2018 09:25:54 -0600 (MDT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7E4B078067; Fri, 12 Oct 2018 09:25:52 -0600 (MDT) Received: from [153.66.254.194] (unknown [9.85.185.70]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 12 Oct 2018 09:25:52 -0600 (MDT) Subject: Re: [PATCH] KEYS: trusted: fix -Wvarags warning From: James Bottomley To: Denis Kenzior , 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 Date: Fri, 12 Oct 2018 08:25:51 -0700 In-Reply-To: References: <1539274203.2623.56.camel@linux.vnet.ibm.com> <20181011203126.15338-1-ndesaulniers@google.com> <1539356751.2656.5.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18101215-0016-0000-0000-000009414D22 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009866; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01101630; UDB=6.00570068; IPR=6.00881675; MB=3.00023729; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-12 15:25:59 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18101215-0017-0000-0000-000040AE76BE Message-Id: <1539357951.2656.9.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-12_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=797 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810120151 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-10-12 at 10:13 -0500, Denis Kenzior wrote: > 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. > https://patchwork.kernel.org/patch/10274411/ > 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? Or actually, we fix this like I did for tpm2 in an unmerged patch and compute the hmac over the constructed buffer not using varargs: https://patchwork.kernel.org/patch/10274411/ James