From patchwork Mon Jun 3 09:11:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 165593 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4209916ili; Mon, 3 Jun 2019 02:17:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGnpFpc31QdvZakEfOeil+MfIrSdp8IkI3zAGK//7e6OQfv79nALLxZtQLdnIIiC2KAVlU X-Received: by 2002:a65:5347:: with SMTP id w7mr26807677pgr.375.1559553422639; Mon, 03 Jun 2019 02:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559553422; cv=none; d=google.com; s=arc-20160816; b=F5Nwri9p+eUeROFnJv2AIQ6iUW3ATqzHE9RDp0N17Fuu57wAcHWyObHOVwzGqVXYQp F4befgC84rU+PGg3wDiNkzw3CgG67UgqSBclp7j88W76Hf6ydWQl/8im1aLTdOFXMxw/ nHG8jwzAoyYIkiQBy68dGFO4kj/ASHmtgF71tQIXQj9YMkR88mmg3ZvDfaEe7cfCbRUw ivdd7bo4h2e81fYmPom+lqysejqM46N5EYqgaXOMTULrNcQdVSR8Z45UPtlI6TqVwkE3 2m3VSGZ8LpAx5b1DoqQpFT+Dxrvf3OsD9wRH+r2BOf3rhorabIuPwty1N0cOm1PWNqWq herQ== 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; bh=5XNaoGruNIsOtSVFYVpHUufh5QsS/no9n1jDse4Rp8w=; b=uGCLMH9jXe9G6aYHioNjEVJYlffMSq5fmDyAx2KOLDtsZySvkjWoapy8xtlgR9NJ+T 9SLwj9h0QoPqAfl5SHEnb4449WZcm7GHEq8M94KEBczHLteLSYlgf1siI1oCBrhF36dv l7nxbmTH31J9qrkckkczW/P2KKAwE9p+41hE0itJ+rc1b/iA0W0MUJE1Mi5Z5hPAC/8A 2Hs9L6wGFaEjc2he+cywFXVQUMLtWteT95rr8G1QHlPnANQeIaDRHbdtMWpJ7WZre18/ B+8wC8hMMEtqlxINBlUvUks9IT/HxGERpvYDuM8gH1ohM/uYVJc9auoCJsN+X/yp+vhm Fxcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m8TntvGG; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q20si7827253pjp.24.2019.06.03.02.17.02; Mon, 03 Jun 2019 02:17:02 -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=pass header.i=@linaro.org header.s=google header.b=m8TntvGG; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728935AbfFCJRB (ORCPT + 30 others); Mon, 3 Jun 2019 05:17:01 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46553 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728531AbfFCJL4 (ORCPT ); Mon, 3 Jun 2019 05:11:56 -0400 Received: by mail-lj1-f193.google.com with SMTP id m15so7126030ljg.13 for ; Mon, 03 Jun 2019 02:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5XNaoGruNIsOtSVFYVpHUufh5QsS/no9n1jDse4Rp8w=; b=m8TntvGGhp0nYiHzaLLgTeZH1zwY5/yRgl2nyz0ER5PyLel0dSm+tojV8of8NrYXdJ ROgD6B+fEUl11Un8LTOvnK0YL4ds+DV47qkf7zOGLYh6wdxK8n9kXbpwYFjBIFTlaFy/ 1uCrd7uKIBnt9W56O4f46yzLjALCSg0JRomG/rMTW7uDkv6GC/YbQkPUzHmGgxjnNee4 wWqlpepwZGd3i5/tiyZxjndumPxjtBYxA3m6Dl7QX0egpCHIWc3oXuK9c5O9vXTH9ti9 zVKRf77SGa+OKdPBJ//O0CfKalF8FMz9GDRFiOvoJffLCLwlwy+ccbi6HjbSDdJj4aVL M31g== 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:mime-version :content-transfer-encoding; bh=5XNaoGruNIsOtSVFYVpHUufh5QsS/no9n1jDse4Rp8w=; b=Oq1nq9tTDdb2OeGpqK8XRWtGnBcrKIII1lhEkxGLNNx2xoABloL3wtL6tcLZ1x0eup //uxTc/3CwLArLtLgMZUkkKnTduybjS0u6xXkWypjxW9IOChq1rsM4fx+mQEeaX0XCZO OBMv2LSoMv+NA2PSDsk6tTACk96O7LAi/w6ewWX8Kqjbldaaer6eZ6lJqDbQgEqCFWIr vYdhpJMt4wVsgGSCs5hPsEQD1Im+9p+Fx8C/dh6bye3Rp4L0W99hEobzC/eDR209+ppC 6EuaHO7343DGXft4A3BmF8OTyCwQwX5pJ62RmrO67vEng1p5bMWnvOdsNhLhiHINvPRS 151g== X-Gm-Message-State: APjAAAXOVtod2Z9nCNz0wjM/Ib8/hLfHlNIlKUCwGozL7v5sUjf/tFP7 8bdAYPBWwaT+43UwqQT0i4bzAw== X-Received: by 2002:a2e:984a:: with SMTP id e10mr5408494ljj.113.1559553114060; Mon, 03 Jun 2019 02:11:54 -0700 (PDT) Received: from localhost (c-1c3670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.28]) by smtp.gmail.com with ESMTPSA id y127sm3040022lff.34.2019.06.03.02.11.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jun 2019 02:11:53 -0700 (PDT) From: Anders Roxell To: aryabinin@virtuozzo.com Cc: kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, Anders Roxell Subject: [PATCH] mm: kasan: mark file report so ftrace doesn't trace it Date: Mon, 3 Jun 2019 11:11:48 +0200 Message-Id: <20190603091148.24898-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __kasan_report() triggers ftrace and the preempt_count() in ftrace causes a call to __asan_load4(), breaking the circular dependency by making report as no trace for ftrace. Signed-off-by: Anders Roxell --- mm/kasan/Makefile | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 Acked-by: Dmitry Vyukov diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile index 08b43de2383b..2b2da731483c 100644 --- a/mm/kasan/Makefile +++ b/mm/kasan/Makefile @@ -3,12 +3,14 @@ KASAN_SANITIZE := n UBSAN_SANITIZE_common.o := n UBSAN_SANITIZE_generic.o := n UBSAN_SANITIZE_generic_report.o := n +UBSAN_SANITIZE_report.o := n UBSAN_SANITIZE_tags.o := n KCOV_INSTRUMENT := n CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_generic.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_generic_report.o = $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_tags.o = $(CC_FLAGS_FTRACE) # Function splitter causes unnecessary splits in __asan_load1/__asan_store1 @@ -17,6 +19,7 @@ CFLAGS_REMOVE_tags.o = $(CC_FLAGS_FTRACE) CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) +CFLAGS_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) obj-$(CONFIG_KASAN) := common.o init.o report.o