Received: by 10.223.164.202 with SMTP id h10csp4897870wrb; Wed, 29 Nov 2017 13:53:41 -0800 (PST) X-Google-Smtp-Source: AGs4zMZkCIhWrU8lhE64+cqohNsuYY3yusBnzV7s6Y5XXAHDRQF1e4BkgDhSufqTqYJU8xfpQ+sM X-Received: by 10.101.64.203 with SMTP id u11mr323622pgp.44.1511992421742; Wed, 29 Nov 2017 13:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511992421; cv=none; d=google.com; s=arc-20160816; b=09o1Occnc2eFdsJIYlMoVXVVh0RB+BvmcYqkYdI7nkANhMa/+G8LtDQI47dEz9FHoM s4cb6UvXPEP1QMlHug7pOIgC6IOI1yWk4uAuyMb4KGw1TB3LjE4HIWlr+A/bYC9j9vt/ CLOq1UNzJ28y0PfaW7PE737KxmtMyf1W1uNtEFobdvuZXVgALI5hIE6z/dv39k1hHH6F wpED05srBD/WpS4HwYdapXKwwYAN+bCUBUtnFLvKXrEpqFkNUXoYoEgRnpEzNIp0UHl8 QmanxXwkGpXsAqXAIJpl1JfobmYh2ZCX1p1NLkop3pv+vnGSN2rShpxDQQERj44OreLe wCkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=DRlVuqNudYClI4gKqJnPyNpJOZKo1aZN37jQ1m8k3RM=; b=iOcpwLVnxsGwwEGUOVO2Orrqj++6l7jXUnxgDv/p2tmXonp3/J5GtNEu7qtRbxyMS1 EULw+Pv+zWcHvVSVl0zm/1YUR0BCBiQyKSv3FM4h8B56sAmzCwfYFOfeN+4TlCa3Ckas +SnrFcgLjgoonNTBYXj8rS4QFFvCUhzqwQ5tSEwQkGigBpnhsXm/DNZ7IaJT1YIEVL// zeQSkFkfE9bURVYUNvvoF1yxY3C3Ga/Kl0ptkUPDUH877FYVZYC8xUV177DlRtg9428a sv6+rHOz9uFGz7USw09ory2tSZzPvTLzPN7SN1+IM7vwP3BzPZF/buKh4I/4W/fJ8TFG omEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=sFlKFreF; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si1839546pgo.401.2017.11.29.13.53.27; Wed, 29 Nov 2017 13:53:41 -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=pass header.i=@google.com header.s=20161025 header.b=sFlKFreF; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbdK2VvM (ORCPT + 99 others); Wed, 29 Nov 2017 16:51:12 -0500 Received: from mail-io0-f170.google.com ([209.85.223.170]:45295 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751596AbdK2VvK (ORCPT ); Wed, 29 Nov 2017 16:51:10 -0500 Received: by mail-io0-f170.google.com with SMTP id e204so5303194iof.12 for ; Wed, 29 Nov 2017 13:51:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=DRlVuqNudYClI4gKqJnPyNpJOZKo1aZN37jQ1m8k3RM=; b=sFlKFreF4i/3u3JKJBCJ5k/xYlkYY9M+o2rm45j7/lBLMMty6M8ezmOYtv9rubDp1y cCFJjwBSGDcgTCStr7wnPqEolXpJWYfYaxvr0y3hqDHFXupzChqqfWSf8RjDXpZMazi7 GpYk5zIOsyADQQ25C98bNBa4IYgA1cWao9MD7y9PFDMFshBIa4uXYZVbbkdl35dMeJe+ 1qNpobn8x4lBRLzvcy+uMCXdFbryakrv8xuT3MD+Hw/NuxOlUKYuQD4274A9YEK93Cx3 GBoO1dwSBX4LY3TepQ+vOsKOsMBQTWlLrXXWpC6+pRlAZQZSuVgmHV7enqsEme5iEplS CYdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DRlVuqNudYClI4gKqJnPyNpJOZKo1aZN37jQ1m8k3RM=; b=I03LR6PR+lHiVmxaJ4jFdqIvCe5xyLdQ4lS2elRWsKezZtqiDMhtF/akItWSfr05d8 ewM7149+uuCkrFx2DoN7Ff+kdEZZg5sR4oFM4181zgj4ItQdaqvcC6cwLDehBGmhVL/Q tiLjnB2+8x4sQXKx+tzQ6m/xXWEjuYScsXV0kowq1Pzb4d/JyKznHgQmNXLTDYUP5tgO pw0VLG/1kOus/x2LwTdouv6A1wlfvGWrcY/SjDJ9Aj9PEGXwkajX1CYQC/FrgSHrkeid ngx7VJDbv8RtLb/Mt6+WD1x3Q+YpQRx5WeqAVCyW73E78ua+8ddCj8cDt7juCYRMJ44V 23jw== X-Gm-Message-State: AJaThX66KfIZXvhfs2jP9whD2MroWwYVd9080ZPl4Vh5Re4iKTAHzqq1 qwdMLzS5SgK5bbXsYVJl0zHi8A== X-Received: by 10.107.182.6 with SMTP id g6mr5209815iof.101.1511992269446; Wed, 29 Nov 2017 13:51:09 -0800 (PST) Received: from paullawrence.mtv.corp.google.com ([172.22.120.84]) by smtp.gmail.com with ESMTPSA id x72sm1438438ite.43.2017.11.29.13.51.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Nov 2017 13:51:08 -0800 (PST) From: Paul Lawrence To: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Masahiro Yamada , Michal Marek Cc: linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kbuild@vger.kernel.org, Matthias Kaehlcke , Michael Davidson , Greg Hackmann , Paul Lawrence Subject: [PATCH v2 0/5] kasan: support alloca, LLVM Date: Wed, 29 Nov 2017 13:50:45 -0800 Message-Id: <20171129215050.158653-1-paullawrence@google.com> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding kasan alloca support using clang Also adding support for clang, since needed for this feature gcc has kasan alloca support, but only post 7.2 [Patch v2 1/5] kasan: support alloca() poisoning Tests moved to patch 2/5 __asan_alloca_unpoison(): Use precalculated rounded-up-size Warning added if bottom is not aligned as expected Parameter check added to make sure gcc builds don't fail Now unpoisons partial chunks get_shadow_bug_type(): Missing break added [PATCH v2 2/5] kasan: Add tests for alloca poisonong Tests moved here kasan_alloca_oob_right(): No longer rounding up [PATCH v2 3/5] kasan: added functions for unpoisoning stack variables No change from v1. clang builds need f8 [PATCH v2 4/5] kasan: support LLVM-style asan parameters Rejigged whole file. Old approach would not work except with ToT gcc or clang. All parameters would be rejected if one was not known. Also if both were empty, CFLAGS_KASAN would be " " which mostly disabled kasan on older compilers. Added support for gcc, tested on ToT compiler [PATCH v2 5/5] kasan: add compiler support for clang Made comments single line Paul Lawrence (5): kasan: support alloca() poisoning kasan: Add tests for alloca poisonong kasan: added functions for unpoisoning stack variables kasan: support LLVM-style asan parameters kasan: add compiler support for clang include/linux/compiler-clang.h | 8 +++++++ lib/test_kasan.c | 22 ++++++++++++++++++++ mm/kasan/kasan.c | 47 ++++++++++++++++++++++++++++++++++++++++++ mm/kasan/kasan.h | 8 +++++++ mm/kasan/report.c | 4 ++++ scripts/Makefile.kasan | 39 ++++++++++++++++++++++++----------- 6 files changed, 116 insertions(+), 12 deletions(-) -- 2.15.0.531.g2ccb3012c9-goog From 1585512537469620322@xxx Thu Nov 30 17:23:05 +0000 2017 X-GM-THRID: 1585484488483145453 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread