Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5249914imb; Thu, 7 Mar 2019 11:04:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzuixk1PiG+hWxevpxXM/kaWrYLQtfswG2gGYp9PkCnQ2wwhswSc9/vq1eymYdqwQbtdwgI X-Received: by 2002:a17:902:142:: with SMTP id 60mr9820950plb.191.1551985470563; Thu, 07 Mar 2019 11:04:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551985470; cv=none; d=google.com; s=arc-20160816; b=qAXhe9OXSCPPav6i34xu1C2UbXDcA/AML21l7zvxtxne8VfNnjJtkw1RQ+KcdC4fBI H14nCFOPND3OMKUVdP2D24E6W0KE9g9igXakIjwBxFAEmMsBAvQ6m68wBGNb9MtIe8hR Nm12o5+jL0PUrrwXraCwg12iciXnSjwqWtq40NyT0+cjlNbTjPfNpfV0FNqQ3HI3gX+P 3xW+yglM00oHHOm7siDDz/c5ps3QYPOxYKSJ4zAfmFxnS3gw91h9yMCidYRgdHZNez4V n3QfO5vpT3W8rgXrblylNSOLK2RfsbJLSWPPTNxmwNJrkP+X2ooEC7fPqgRr+JJ27Cjh ZenQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZfrfQvfHDXYd3CUHVVspVqjLPuUt9M5N9AH11BPHM8g=; b=FUF8LZr6AHzH7syriluSg35rqOd5WToKOXECID+/WiJ/bSNUjl/NWYhXQQGJPPQqKS LgzSnkSEgGlDG8qLMXTHuHVwhRfjMi43V1SVj5DrR8yEIIRUBqan8e5ZmMy0K5ZAOIcz AofTPzxv6lyhb2PPDVZtRCLJoYg8sOh/kCV0i1QVzF/NnGZ6crjMa3mxV+I9qFmXJYiN onWOOxtfyqD8oWC1iklDu6KffjsVZ/z742UhG0RJEi0YkK+KSpgbusIhaOF8J3E08BbC lpE1CHSACZLC0WjCGqcn8kmwYwNLVo6OVV6uH3pmNSwtHxGFhywqk1YmZcA6kJkD3PTW K9Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YLnKy32p; 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 j16si4659918pfa.197.2019.03.07.11.04.14; Thu, 07 Mar 2019 11:04:30 -0800 (PST) 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=@infradead.org header.s=merlin.20170209 header.b=YLnKy32p; 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 S1726639AbfCGTD0 (ORCPT + 99 others); Thu, 7 Mar 2019 14:03:26 -0500 Received: from merlin.infradead.org ([205.233.59.134]:55664 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726286AbfCGTD0 (ORCPT ); Thu, 7 Mar 2019 14:03:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZfrfQvfHDXYd3CUHVVspVqjLPuUt9M5N9AH11BPHM8g=; b=YLnKy32poWN/dRGO02MhpChAb nR8jFWadgAYChKIXCrolGuBrLqiANl/4XmucMqb841HTSh9JvEtrRmZsCKVIOLIYK5IoG8u9EL6lU 7mtpEmKTIyoA+GhMmTo935STlgOh6osHmaaGaxAjvlh8cJHB+xvUhWd2AwTqJc22Xy24i30/E721e J35Z8cjLXPOcazcccBLSfpalsr3wWEaUsYiKnoYqid3pqp3xIwJyNLH8yJkOjySCHRXHVtUdCIvJq w1muLR0v0abdGChhbt78zlg3YSjU000HkhUVD3vUvpPi7zw/5H6qXnU0jy/aNOwQOuS28vclrYRdG 1EOW1fjFQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1yIV-0000i7-42; Thu, 07 Mar 2019 19:03:15 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 3C5939837F2; Thu, 7 Mar 2019 20:03:13 +0100 (CET) Date: Thu, 7 Mar 2019 20:03:13 +0100 From: Peter Zijlstra To: Linus Torvalds Cc: Thomas Gleixner , Peter Anvin , Julien Thierry , Will Deacon , Andy Lutomirski , Ingo Molnar , Catalin Marinas , James Morse , valentin.schneider@arm.com, Brian Gerst , Josh Poimboeuf , Andrew Lutomirski , Borislav Petkov , Denys Vlasenko , Linux List Kernel Mailing , Dmitry Vyukov , Steven Rostedt Subject: Re: [PATCH 18/20] objtool: Add UACCESS validation Message-ID: <20190307190313.GA4572@worktop.programming.kicks-ass.net> References: <20190307114511.870090179@infradead.org> <20190307115200.697533978@infradead.org> <20190307174135.GJ32477@hirez.programming.kicks-ass.net> <20190307184813.GL32477@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190307184813.GL32477@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 07, 2019 at 07:48:13PM +0100, Peter Zijlstra wrote: > On Thu, Mar 07, 2019 at 09:54:14AM -0800, Linus Torvalds wrote: > > On Thu, Mar 7, 2019 at 9:41 AM Peter Zijlstra wrote: > > > > > > > > What's the call site that made you go "just add __memset() to the list"? > > > > > > __asan_{,un}poinson_stack_memory() > > > kasan_{,un}poison_shadow() > > > __memset() > > > > Ugh. I think I almost just agree with your decision to just let that > > memset go unchecked. > > > > I'm not saying it's right, but it doesn't seem to be a fight worth fighting. > > One think I could do; is add a filter to each function and only allow > __memset from the kasan code, and not from anywhere else. Ah.. how about I feed objtool a text file with all these symbol names; and I have Makefile compose file that from fragments. Then only KASAN builds will have memset whitelisted, and any other build will still flag memset abuse. Now I only have to figure out how to make Makefile do something like that :-)