From patchwork Tue May 12 06:37:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 11542089 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 0F1D714B4 for ; Tue, 12 May 2020 06:37:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D080220733 for ; Tue, 12 May 2020 06:37:40 +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="XLI8Ef5w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D080220733 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 002F5900095; Tue, 12 May 2020 02:37:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F1F17900036; Tue, 12 May 2020 02:37:39 -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 E3494900095; Tue, 12 May 2020 02:37:39 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id CE2EC900036 for ; Tue, 12 May 2020 02:37:39 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 7FD691264 for ; Tue, 12 May 2020 06:37:39 +0000 (UTC) X-FDA: 76807111038.27.error27_42d137d2c3918 X-Spam-Summary: 2,0,0,a58436e389286345,d41d8cd98f00b204,leon@kernel.org,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1542:1711:1730:1747:1777:1792:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3866:3867:3870:4321:4605:5007:6261:6653:7576:8603:10004:11026:11473:11658:11914:12043:12297:12438:12517:12519:12555:12679:12895:12986:13255:13894:14093:14096:14181:14394:14721:21080:21451:21627:30003:30054,0,RBL:198.145.29.99:@kernel.org:.lbl8.mailshell.net-64.100.201.201 62.2.0.100,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:26,LUA_SUMMARY:none X-HE-Tag: error27_42d137d2c3918 X-Filterd-Recvd-Size: 4356 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 May 2020 06:37:39 +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 8C24E20752; Tue, 12 May 2020 06:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589265458; bh=XaJzdYSi4MgUFXsfxFcBr/AwcDZLznlRsdGp3exbcNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XLI8Ef5wYzdiOUNT5ZDhMCz6RpIyQ/FIhTvFlehqtejKfgzBujoAANi1ywV5vIk8N nV+tpEiDxm2wksUhZxNFg1Q6JcXBX9OlnNFfF5nbbU+PH8Il9oyDtgf7RUAo1LrUIq DgK5hy83Lxi/GN0Uj2TYYbucRYwzlFuNSezb7Usk= From: Leon Romanovsky To: Andrew Morton , Andrey Konovalov , Andrey Ryabinin Cc: Leon Romanovsky , kasan-dev@googlegroups.com, linux-mm@kvack.org, Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH rdma-next 1/2] kasan: fix compilation warnings due to missing function prototypes Date: Tue, 12 May 2020 09:37:27 +0300 Message-Id: <20200512063728.17785-2-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 __asan_report_* function generates the following warnings while compiling kernel, add them to the internal header to be aligned with other __asan_* function prototypes. mm/kasan/generic_report.c:130:6: warning: no previous prototype for '__asan_report_load1_noabort' [-Wmissing-prototypes] 130 | void __asan_report_load##size##_noabort(unsigned long addr) \ | ^~~~~~~~~~~~~~~~~~ mm/kasan/generic_report.c:143:1: note: in expansion of macro 'DEFINE_ASAN_REPORT_LOAD' 143 | DEFINE_ASAN_REPORT_LOAD(1); | ^~~~~~~~~~~~~~~~~~~~~~~ <...> mm/kasan/generic_report.c:137:6: warning: no previous prototype for '__asan_report_store1_noabort' [-Wmissing-prototypes] 137 | void __asan_report_store##size##_noabort(unsigned long addr) \ | ^~~~~~~~~~~~~~~~~~~ mm/kasan/generic_report.c:148:1: note: in expansion of macro 'DEFINE_ASAN_REPORT_STORE' 148 | DEFINE_ASAN_REPORT_STORE(1); | ^~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 0b24becc810d ("kasan: add kernel address sanitizer infrastructure") Signed-off-by: Leon Romanovsky --- mm/kasan/kasan.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.26.2 diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index e8f37199d885..d428e588c700 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -230,15 +230,27 @@ void __asan_load16(unsigned long addr); void __asan_store16(unsigned long addr); void __asan_load1_noabort(unsigned long addr); +void __asan_report_load1_noabort(unsigned long addr); void __asan_store1_noabort(unsigned long addr); +void __asan_report_store1_noabort(unsigned long addr); void __asan_load2_noabort(unsigned long addr); +void __asan_report_load2_noabort(unsigned long addr); void __asan_store2_noabort(unsigned long addr); +void __asan_report_store2_noabort(unsigned long addr); void __asan_load4_noabort(unsigned long addr); +void __asan_report_load4_noabort(unsigned long addr); void __asan_store4_noabort(unsigned long addr); +void __asan_report_store4_noabort(unsigned long addr); void __asan_load8_noabort(unsigned long addr); +void __asan_report_load8_noabort(unsigned long addr); void __asan_store8_noabort(unsigned long addr); +void __asan_report_store8_noabort(unsigned long addr); void __asan_load16_noabort(unsigned long addr); +void __asan_report_load16_noabort(unsigned long addr); void __asan_store16_noabort(unsigned long addr); +void __asan_report_store16_noabort(unsigned long addr); +void __asan_report_load_n_noabort(unsigned long addr, size_t size); +void __asan_report_store_n_noabort(unsigned long addr, size_t size); void __asan_set_shadow_00(const void *addr, size_t size); void __asan_set_shadow_f1(const void *addr, size_t size); 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);