Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2472101ybk; Mon, 11 May 2020 23:40:12 -0700 (PDT) X-Google-Smtp-Source: APiQypIn/oSTunS3lDxJaH+EPkYyeCq93uSW3LYzzcZCCjzoE3oD445LabzgFJKQiog25zadqBNP X-Received: by 2002:aa7:d2d0:: with SMTP id k16mr17092916edr.354.1589265612237; Mon, 11 May 2020 23:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589265612; cv=none; d=google.com; s=arc-20160816; b=WSZE26ZJKjjcRZPvLf1XNScC1kH9DibJcNxKVzagU7Tme+ZXsaBSyldkArCmB2KoYT 2vchRiVvsamqg3fKdS2TsLqh11V/JPY60XfTOMd07djkTznNUE+IN6m0Yvq5dfxIPVL7 MKcpMLwDn/x2kr59RyfUbe9Wxi/tRQWBCF7edjRrJBiBioTdaFNE4RBKtbEXV9pBSzAq FnkCdWG03n1zw1MI2cJ/85XU/LVIgBcLtKFoZojRQOOMQW5nong2cxszqopmjXC9tlQh 1nWgD79l46KJqhOpfS51mH+MT9JnyHEIl8hw1UfX1yQte9DKE6XNmpqXUtRWQLgJ2ElL BF3Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O+mK+whApmmZCIgaUGywGIf3tiE/s+BUdS5NHNOMy9w=; b=Zo+92puFNEMRXxk7wc7bQIHcTonbFyM3NIBrBA88q2aK34SL+9kOf3sqFX6xTm0ScY /5K9er/xjKwpIOeeuD/DPg11ubOQrLGED5RU/0X8/OAsAay7m0xTVYEy2/LRDi/eGG0W NeefytuLf6LPiXnCSyb1R9BxIQV+SZYLYF9U0I/9VvAjxCelI3Q2RRTnWO0RUT2NFWw6 utb+k4A+hdYENcQ5fF89uj7VKEt2m8gb8751UGH49iauAAgu9uWxdbdfEgO/6QoNbs6v Q3CdtkRLH+UZufdX07WRvrdJtAG2sPj1v70M9QOgQ48Y4r6ELiDAhdLoUEa3lNjxECXx 1UiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k6mn2kkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dv9si897019ejb.127.2020.05.11.23.39.49; Mon, 11 May 2020 23:40:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k6mn2kkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728840AbgELGhn (ORCPT + 99 others); Tue, 12 May 2020 02:37:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:41972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbgELGhm (ORCPT ); Tue, 12 May 2020 02:37:42 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D46E20733; Tue, 12 May 2020 06:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589265462; bh=dtOykIWdlo6UzWclrcAiB6mjg5q5DPJDz1k6M/Lo4y0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k6mn2kkbxT6O4BTldBDkMmCC6VUbI9c/qM3UDDIQ6MVHhxampn+SD9Hw0UrnOFtf4 vlm60XWZismBxKxRsXGzBmn+91HP5sVfdhsf9lokKiUNgNuuK9FGC9dAWfqICsPFL/ EyHGAL0tHlhZvy0roKLBQj/Ont3kpt9rdHjcgr3k= From: Leon Romanovsky To: Andrew Morton , Andrey Ryabinin Cc: Leon Romanovsky , Ingo Molnar , kasan-dev@googlegroups.com, linux-mm@kvack.org, Peter Zijlstra , linux-kernel@vger.kernel.org Subject: [PATCH rdma-next 2/2] kasan: add missing prototypes to fix compilation warnings Date: Tue, 12 May 2020 09:37:28 +0300 Message-Id: <20200512063728.17785-3-leon@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512063728.17785-1-leon@kernel.org> References: <20200512063728.17785-1-leon@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky Use internal kasan header to declare missing prototypes to fix the following compilation warnings. mm/kasan/report.c:457:6: warning: no previous prototype for 'report_enabled' [-Wmissing-prototypes] 457 | bool report_enabled(void) | ^~~~~~~~~~~~~~ mm/kasan/report.c:482:6: warning: no previous prototype for '__kasan_report' [-Wmissing-prototypes] 482 | void __kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip) | ^~~~~~~~~~~~~~ Fixes: 57b78a62e7f2 ("x86/uaccess, kasan: Fix KASAN vs SMAP") Signed-off-by: Leon Romanovsky --- mm/kasan/common.c | 3 --- mm/kasan/kasan.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/kasan/common.c b/mm/kasan/common.c index 2906358e42f0..cbb119224330 100644 --- a/mm/kasan/common.c +++ b/mm/kasan/common.c @@ -613,9 +613,6 @@ void kasan_free_shadow(const struct vm_struct *vm) } #endif -extern void __kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip); -extern bool report_enabled(void); - bool kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip) { unsigned long flags = user_access_save(); diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index d428e588c700..02d54a1d0b2d 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -153,6 +153,9 @@ bool check_memory_region(unsigned long addr, size_t size, bool write, void *find_first_bad_addr(void *addr, size_t size); const char *get_bug_type(struct kasan_access_info *info); +bool report_enabled(void); +void __kasan_report(unsigned long addr, size_t size, bool is_write, + unsigned long ip); bool kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip); void kasan_report_invalid_free(void *object, unsigned long ip); -- 2.26.2