Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752248AbdLKAvV (ORCPT ); Sun, 10 Dec 2017 19:51:21 -0500 Received: from mail-vk0-f42.google.com ([209.85.213.42]:38779 "EHLO mail-vk0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbdLKAvS (ORCPT ); Sun, 10 Dec 2017 19:51:18 -0500 X-Google-Smtp-Source: AGs4zMYEBPdg+r7snHTeA8RylKjFto4/Ra5SWAMngfhwWwbOuGEXEkfXWphkNTDlaom4VBundxqcNm1+c2MedL0eU5E= MIME-Version: 1.0 In-Reply-To: <20171209114819.yuncnn4ccsgvffcg@mwanda> References: <1512524729-16051-1-git-send-email-me@tobin.cc> <20171207234402.GT2191@eros> <20171208004627.GW2191@eros> <1512768157.1845.30.camel@perches.com> <20171209012736.GC2191@eros> <1512785925.26342.4.camel@perches.com> <20171209114819.yuncnn4ccsgvffcg@mwanda> From: Kees Cook Date: Sun, 10 Dec 2017 16:51:15 -0800 X-Google-Sender-Auth: CsIHUnIRuTxzt5XLaaoeNQoKxzM Message-ID: Subject: Re: [PATCH] doc: convert printk-formats.txt to rst To: Dan Carpenter , Rasmus Villemoes Cc: Joe Perches , "Tobin C. Harding" , Dan Carpenter , Laura Abbott , Jonathan Corbet , Randy Dunlap , linux-doc@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1304 Lines: 35 On Sat, Dec 9, 2017 at 3:48 AM, Dan Carpenter wrote: > On Fri, Dec 08, 2017 at 06:18:45PM -0800, Joe Perches wrote: >> On Sat, 2017-12-09 at 12:27 +1100, Tobin C. Harding wrote: >> > On Fri, Dec 08, 2017 at 01:22:37PM -0800, Joe Perches wrote: >> >> > > Outside of the documentation, what could be useful is for >> > > someone to add a tool to verify %p extension to >> > > the typeof address actually passed as an argument. >> > >> > This sounds interesting to work no. At first glance I have no idea how >> > one would go about this. Some form of static analysis would be a good >> > place to start, right? I'd like to allocate some cycles to this, any >> > pointers most appreciated. >> >> A gcc-plugin would likely work best. >> >> There was some discussion about such a thing here: >> http://www.openwall.com/lists/kernel-hardening/2017/02/14/38 >> >> I vaguely recall someone else doing a broader use tool >> which I believe was not smatch, but my google-fu isn't >> finding it. > > Yeah. Smatch has a check for this. Rasmus Villemoes wrote it. There's been some other work on format strings by Rasmus too. Thread is here, which I still haven't caught back up on: http://www.openwall.com/lists/kernel-hardening/2017/11/08/25 -Kees -- Kees Cook Pixel Security