From patchwork Tue Mar 3 19:28:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qian Cai X-Patchwork-Id: 11418703 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06B6B14BC for ; Tue, 3 Mar 2020 19:28:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BCF68208C3 for ; Tue, 3 Mar 2020 19:28:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="W392SK/v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCF68208C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EE2166B0005; Tue, 3 Mar 2020 14:28:54 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E92156B0006; Tue, 3 Mar 2020 14:28:54 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA74F6B000A; Tue, 3 Mar 2020 14:28:54 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id C0A856B0005 for ; Tue, 3 Mar 2020 14:28:54 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 38D338248D52 for ; Tue, 3 Mar 2020 19:28:54 +0000 (UTC) X-FDA: 76555038588.07.crowd35_6accd3e673500 X-Spam-Summary: 2,0,0,b549facd811ff549,d41d8cd98f00b204,cai@lca.pw,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3871:3872:3874:4250:4321:5007:6261:6653:8603:8660:10004:11026:11658:11914:12297:12438:12517:12519:12555:12895:13069:13148:13230:13311:13357:14018:14096:14181:14384:14394:14721:21080:21433:21444:21627:21966:30054:30079,0,RBL:209.85.222.193:@lca.pw:.lbl8.mailshell.net-62.14.0.100 66.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:60,LUA_SUMMARY:none X-HE-Tag: crowd35_6accd3e673500 X-Filterd-Recvd-Size: 3703 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Mar 2020 19:28:53 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id p62so4639675qkb.0 for ; Tue, 03 Mar 2020 11:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id; bh=qmv//PLMnUie9B7qaPX/qU2EmGiQx3aYNQaNo0ftsto=; b=W392SK/vElOUsNDyI6oHepG0UtGX6m0kYX6/Ow+4A6i7y0LVFCm1v+UBtAfyNJ9aXU DjP2f7Jg4CvPNJTx6RZL+hRzsqi9lvIOBjqkvqEqmF8+tqp7DEOZ5EDY0AUWkzl4ZLoP qqeAF9/nY+siFpQQcUQ9+H4PwygVUezWzgo212OOraDbStRhKECFfnV51wKzz/gpf5am V19kFvO8Rn4F7gtCw1otjZPiV5yXW5wyPzWYKD+V/yMKxHK1LMAHn/f3BAw4KnNluKp8 +lzv2mgJ50tJbCviVeOVdaaiZPAfb7zQ+SilPSVt2gW8COEko5S6x+hwbsFuIzJTsfzF syTg== 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=qmv//PLMnUie9B7qaPX/qU2EmGiQx3aYNQaNo0ftsto=; b=KkvwzqgYFEMr35XjseuhYo70fE0UyfADtYMPfPOnQhktcAauRwiXN+1/fFFfmV1vbu TnOyY/AhSnLkcLMwx7ENeHXfYZ29eJabnlPEa4pCxnlIFglDs1zAFEEQ68HnsK2H71/a LGRyWAZQWuBt4WMpor5tzK2ExJtapfTjC8wOB+Rom4vK3+7kjPwEkVbgqk1A5096mCbO MIUCqtCOo6Jbx+vMq5Dh6g1dOg0swshf75J7CKZPP2DnP5E1OBxKQTgHGLkOYsSihtEz GloBBHmeb3xWOwEw+rEEZr6SgQYOY/vC1bHnNLQIt20vsSU7rnpuYZ62yMUz2/D0sujf /NUQ== X-Gm-Message-State: ANhLgQ0mhqi3ocm0LvUCdK37VfFkmfFpvtNHg6cpvZJAGU1mnUCdnNZ1 uLGNfSPpRgG81i7k2CTq07+IzA== X-Google-Smtp-Source: ADFU+vtdkDuYLw9tLxiNdRRm718gud7ooWVb+GAm8SnQTcSZTLUEJwlmx9EJniPmpYaDg+cSpfidqA== X-Received: by 2002:a05:620a:747:: with SMTP id i7mr5469399qki.375.1583263733297; Tue, 03 Mar 2020 11:28:53 -0800 (PST) Received: from qcai.nay.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id j7sm8872582qti.14.2020.03.03.11.28.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Mar 2020 11:28:52 -0800 (PST) From: Qian Cai To: akpm@linux-foundation.org Cc: elver@google.com, catalin.marinas@arm.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH -next 1/2] mm: disable KCSAN for kmemleak Date: Tue, 3 Mar 2020 14:28:35 -0500 Message-Id: <1583263716-25150-1-git-send-email-cai@lca.pw> X-Mailer: git-send-email 1.8.3.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000159, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Kmemleak could scan task stacks while plain writes happens to those stack variables which could results in data races. For example, in sys_rt_sigaction and do_sigaction(), it could have plain writes in a 32-byte size. Since the kmemleak does not care about the actual values of a non-pointer and all do_sigaction() call sites only copy to stack variables, just disable KCSAN for kmemleak to avoid annotating anything outside Kmemleak just because Kmemleak scans everything. Suggested-by: Marco Elver Signed-off-by: Qian Cai Acked-by: Marco Elver Acked-by: Catalin Marinas --- mm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/Makefile b/mm/Makefile index 946754cc66b6..6e263045f0c2 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -14,6 +14,7 @@ KCSAN_SANITIZE_slab_common.o := n KCSAN_SANITIZE_slab.o := n KCSAN_SANITIZE_slub.o := n KCSAN_SANITIZE_page_alloc.o := n +KCSAN_SANITIZE_kmemleak.o := n # These files are disabled because they produce non-interesting and/or # flaky coverage that is not a function of syscall inputs. E.g. slab is out of