From patchwork Tue Oct 11 19:05:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 13004267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2F74C433F5 for ; Tue, 11 Oct 2022 19:05:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1DE5A6B0073; Tue, 11 Oct 2022 15:05:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 168556B0074; Tue, 11 Oct 2022 15:05:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F235E8E0001; Tue, 11 Oct 2022 15:05:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id DA8BC6B0073 for ; Tue, 11 Oct 2022 15:05:54 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 9AECC8013C for ; Tue, 11 Oct 2022 19:05:54 +0000 (UTC) X-FDA: 80009598228.12.1A11522 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf11.hostedemail.com (Postfix) with ESMTP id 0320B40024 for ; Tue, 11 Oct 2022 19:05:53 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 16666B8161C; Tue, 11 Oct 2022 19:05:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8853AC433D6; Tue, 11 Oct 2022 19:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665515150; bh=ODHx9TW1R0DNxJe9ifRLST7AHBUBOdF+OZpirGF8FL0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aMz05sO0s6UGqiZQacsgQpXGjClkqOx8sQLzSH3vIt49HhKC0i+B+Z+4fssQXq0b4 00S+4RQjeiJYsw2p688732UayPfQukF1wcY46jNLHsREM9avaAnXOxyaD8cUVUxrGR pptN0uVjoEk1KWLe0gJtb8kqhJrus0Rg/OTAMbUBKvMryLX6ETM3ee+aFDnaZefZ+c bcXRZ9NJIQxvaXjmH76ymH3ACT8kvTZqc5T+k5OpW1pw5M+wcfSg0XjgSAIOrivKnU qbk51fk74ONUwne1ShIFKrTSYjA5P+N6AdE4HsyYmKxy4hk7vyMXTCYcoYAn3QGr3A SDqYwfsIBnN5w== Date: Tue, 11 Oct 2022 12:05:48 -0700 From: Josh Poimboeuf To: Peter Zijlstra Cc: Linus Torvalds , Andrew Morton , Alexander Potapenko , Andrey Konovalov , mm-commits@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] kasan: disable stackleak plugin in report code Message-ID: <20221011190548.blixlqj6dripitaf@treble> References: <20221008132113.919b9b894426297de78ac00f@linux-foundation.org> <20221011184444.npthr2pmzqb32x6z@treble> <20221011185907.s3kakdlrxcqr6boh@treble> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221011185907.s3kakdlrxcqr6boh@treble> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665515154; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=H8tZS9MY7PGJlYfGfGSgVvBjCnXvoGRF3BJyAE3HRxk=; b=EyqjH3PVhfbz8G4hUvgx6gb3zfHWbMbtm5d9iUyoMqOtx3JNRRmtUnlYjWKjXAr9LXDNI5 UKGK8pZ0f7XAHKbeZw3lYwqfFSBrE3cLThc2KJnOqZZ8bF3tN5iWZtln4LeIAeamRH/jVg 3p0TEP43jAZGuNBxIZAVyaQUXeQ//1M= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=aMz05sO0; spf=pass (imf11.hostedemail.com: domain of jpoimboe@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=jpoimboe@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665515154; a=rsa-sha256; cv=none; b=OrWtaqOJmzYXuKA9+2KJORStpKMjF2n2oBwZMt7vEl6kudD+28SEYXDoGJ/90kBhCqPpxV Mg8DoQmZgGSMkdj5vHyV8jpB/PQcbXQCF0TmqpbHxaS/duYcLeap1seRdcGWoM2upGlNz0 1VsOKgqKlqGWMbl2rQzFQgKb3n/1w70= X-Rspam-User: X-Rspamd-Queue-Id: 0320B40024 X-Stat-Signature: roc6whg9rbjpjd93me5576pafrjnce1q Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=aMz05sO0; spf=pass (imf11.hostedemail.com: domain of jpoimboe@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=jpoimboe@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam10 X-HE-Tag: 1665515153-401757 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: kasan_report() has a uaccess critical section which can't have any instrumentation calls in the middle. Disable the stackleak plugin for the report code. Fixes the following warning: vmlinux.o: warning: objtool: kasan_report+0x12: call to stackleak_track_stack() with UACCESS enabled Reported-by: Linus Torvalds Signed-off-by: Josh Poimboeuf --- mm/kasan/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile index d4837bff3b60..da2976365197 100644 --- a/mm/kasan/Makefile +++ b/mm/kasan/Makefile @@ -27,7 +27,7 @@ CFLAGS_common.o := $(CC_FLAGS_KASAN_RUNTIME) CFLAGS_generic.o := $(CC_FLAGS_KASAN_RUNTIME) CFLAGS_init.o := $(CC_FLAGS_KASAN_RUNTIME) CFLAGS_quarantine.o := $(CC_FLAGS_KASAN_RUNTIME) -CFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME) +CFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME) $(DISABLE_STACKLEAK_PLUGIN) CFLAGS_report_generic.o := $(CC_FLAGS_KASAN_RUNTIME) CFLAGS_report_hw_tags.o := $(CC_FLAGS_KASAN_RUNTIME) CFLAGS_report_sw_tags.o := $(CC_FLAGS_KASAN_RUNTIME)