From patchwork Tue May 12 06:37:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 11542091 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 C242914B4 for ; Tue, 12 May 2020 06:37:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8623A20714 for ; Tue, 12 May 2020 06:37:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="k6mn2kkb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8623A20714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B4DCB900096; Tue, 12 May 2020 02:37:43 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AFDEC900036; Tue, 12 May 2020 02:37:43 -0400 (EDT) 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 9C60C900096; Tue, 12 May 2020 02:37:43 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id 88D51900036 for ; Tue, 12 May 2020 02:37:43 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 46FEE2C89 for ; Tue, 12 May 2020 06:37:43 +0000 (UTC) X-FDA: 76807111206.15.move25_435eac07b7c62 X-Spam-Summary: 2,0,0,9b423658a0c28714,d41d8cd98f00b204,leon@kernel.org,,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1541:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3867:4250:4321:4385:4605:5007:6261:6653:7576:7903:8603:9592:10004:11026:11658:11914:12043:12296:12297:12438:12517:12519:12555:12679:12895:12986:13069:13311:13357:13894:14096:14181:14384:14394:14721:21080:21324:21451:21627:30054:30075,0,RBL:198.145.29.99:@kernel.org:.lbl8.mailshell.net-62.2.0.100 64.100.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:25,LUA_SUMMARY:none X-HE-Tag: move25_435eac07b7c62 X-Filterd-Recvd-Size: 3459 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 May 2020 06:37:42 +0000 (UTC) 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 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: 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(-) -- 2.26.2 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);