Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2472652imm; Wed, 16 May 2018 13:28:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrrHyjmV3yYmOFYPAsCnRcwoyZkmPtHgtbqYeRR77i3/dfUKVpihsYfKenZaXYN70oQny1V X-Received: by 2002:a63:7a5e:: with SMTP id j30-v6mr1898333pgn.145.1526502508727; Wed, 16 May 2018 13:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526502508; cv=none; d=google.com; s=arc-20160816; b=EI2PByTbuXXzyeVFl+ZBwwjNmfJYKijvvp07QQ1rGLye5T7lXIG5nxscfmd0BtA925 YgFV+ZZ2RV6wgqdKsOCpkd3LmB/m46PQFbOrYXzDSRqo5dV92uQQXKsaaKNm9s+RKrkn vobaLDTBUBSaOf5ltOH31ICW3LYChjSUDsWjD6YIvz9ZTeOWtwXGEpJzWgoHP2p7tmix V+AepCJO2iZLOSiKmDo9vlCEMtNd6lZcbGGGvAA2PTntrlzt6pLh3GtuNceqfNCaQmLI oR9Mgnjq6CL0/u94TzP9ZAMQnM4JOVMNT4wTC1yJ2eIQcc5pntPaD5u3rlqxCLx5eORY JQGw== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=pXM0G6W0Wvvm+JObGGfNtd5kzn1vlbH0MJCBKDBbhBI=; b=ZlhES61gjBn5NB16VWDW2E9y8oP5oQjatZtyfbh0drSS5xyA0f4jt9sONRqgaRhTKK jyayPNFWfQSrLzMI6HzuU0SqZxbN4w6WMLDLb5rqfpjKciXSmQsawOGPmxFM34eH73Qe ZscH1Gn8mAid+DlzoEyl8AEXs6r9cnVSZ7thzGDcxT6zaK1XeNFMLFRII+qlPs6GQEL/ rznSzQsiCkOLi9lDW0t5GckEKYhch8sGPLR+2CipLFrzENo6gU4IAy/GHsScGORCGp50 m96ROfhtBoEZYfQxUa1nPmWPOdbE/yG1PwMVs5vqNRICg9vtS+LAZdfYjBSQKYzcqXy+ o6kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=P6eAhD9w; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c20-v6si3304830pls.557.2018.05.16.13.28.13; Wed, 16 May 2018 13:28:28 -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=fail header.i=@gmail.com header.s=20161025 header.b=P6eAhD9w; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751375AbeEPU1s (ORCPT + 99 others); Wed, 16 May 2018 16:27:48 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34371 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbeEPU1q (ORCPT ); Wed, 16 May 2018 16:27:46 -0400 Received: by mail-wr0-f196.google.com with SMTP id p18-v6so3237893wrm.1; Wed, 16 May 2018 13:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pXM0G6W0Wvvm+JObGGfNtd5kzn1vlbH0MJCBKDBbhBI=; b=P6eAhD9w39SM/HXJdlAlymYrNSVbuZU3kwNyJcFehgUvi0xmUZODDYii77pIfnQKoR v/nT6nInjIrzFb5Fg/8xGNfGCt9mXJCWYYpg6xunvruR0oUT+zJoVxgphOQfvqngWA3V BnyN7x1ANZECbo1w+JG1ygOFkDOcrKMkfoi6P1W8X2BwUL1yFi7iwgYxiwpHCBbyxZ+o /KHpNjXXnk2NHwKHR5ChnuEE8/0lfugSf77041DnCTUOgLl+XyQYtvCDXDgdtirXvwwe Bvr1hjw86h+Tg8vvOVVP5xOLMiDQQjpToTcfE98SOYgaIs/5FVSp+w47wAm1VhoGcxRq OAmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=pXM0G6W0Wvvm+JObGGfNtd5kzn1vlbH0MJCBKDBbhBI=; b=T/WSQ6jizT5TYoJwCRleZmrZjlhm3nBLej62d1R9RZ81Yr9oYh7riMKLTmE6vhe8YJ UyQEmCxWG6rOAVIX7+bhS3257H5gizsv/uc3BU9Hqr8cGJOwqwGIENqtCxSUNbYwsqyN AWHbWXXOKxu1xR1XxF9enhNO4OdnhIT0l9VWXDFm9APCrplGm7IGqHyMBzld4smnyLLB iAuTy78Q6GoXQBnDwO7dpSSEZ5xV7tyrWRXoKvPEs0mCmVyh3yGpzZGgHDvAM//J5miN Z+PWEEaex3nylNB6C5LVME2zDgZZBNa5EdqhAF/xs39aN93OoWmiNiLC/TQ11kVFWhyI JS2w== X-Gm-Message-State: ALKqPwcaA/ZmTS8pXp2pWw/VtlQ6EsjtTAzI7tp1NVesPrVGpdi69Wes S3+FLlE3B9k2ewVvrA2I4AuaTH2b X-Received: by 2002:adf:8e44:: with SMTP id n62-v6mr1961295wrb.159.1526502465482; Wed, 16 May 2018 13:27:45 -0700 (PDT) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id 12-v6sm6019290wmn.27.2018.05.16.13.27.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 13:27:44 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 6207010C058D; Wed, 16 May 2018 22:27:43 +0200 (CEST) From: Mathieu Malaterre To: Alexei Starovoitov Cc: Mathieu Malaterre , Daniel Borkmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] bpf: add __printf verification to bpf_verifier_vlog Date: Wed, 16 May 2018 22:27:41 +0200 Message-Id: <20180516202741.20861-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __printf is useful to verify format and arguments. ‘bpf_verifier_vlog’ function is used twice in verifier.c in both cases the caller function already uses the __printf gcc attribute. Remove the following warning, triggered with W=1: kernel/bpf/verifier.c:176:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Signed-off-by: Mathieu Malaterre --- include/linux/bpf_verifier.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 7e61c395fddf..ebf78f8ddfa1 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -197,8 +197,8 @@ struct bpf_verifier_env { u32 subprog_cnt; }; -void bpf_verifier_vlog(struct bpf_verifier_log *log, const char *fmt, - va_list args); +__printf(2, 0) void bpf_verifier_vlog(struct bpf_verifier_log *log, + const char *fmt, va_list args); __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, const char *fmt, ...); -- 2.11.0