From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757454AbdJKIco (ORCPT ); Wed, 11 Oct 2017 04:32:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7558 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932684AbdJKI2M (ORCPT ); Wed, 11 Oct 2017 04:28:12 -0400 From: Abbott Liu To: , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , Subject: [PATCH 05/11] Disable kasan's instrumentation Date: Wed, 11 Oct 2017 16:22:21 +0800 Message-ID: <20171011082227.20546-6-liuwenliang@huawei.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171011082227.20546-1-liuwenliang@huawei.com> References: <20171011082227.20546-1-liuwenliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.54.198] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.59DDD541.008C,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1e400f4c4c9d9667450fc621b4ec872f Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Ryabinin To avoid some build and runtime errors, compiler's instrumentation must be disabled for code not linked with kernel image. Cc: Andrey Ryabinin Signed-off-by: Abbott Liu --- arch/arm/boot/compressed/Makefile | 1 + arch/arm/kernel/unwind.c | 3 ++- arch/arm/vdso/Makefile | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index d50430c..ab5693b 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -23,6 +23,7 @@ OBJS += hyp-stub.o endif GCOV_PROFILE := n +KASAN_SANITIZE := n # # Architecture dependencies diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index 0bee233..2e55c7d 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c @@ -249,7 +249,8 @@ static int unwind_pop_register(struct unwind_ctrl_block *ctrl, if (*vsp >= (unsigned long *)ctrl->sp_high) return -URC_FAILURE; - ctrl->vrs[reg] = *(*vsp)++; + ctrl->vrs[reg] = READ_ONCE_NOCHECK(*(*vsp)); + (*vsp)++; return URC_OK; } diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile index 59a8fa7..689dfec 100644 --- a/arch/arm/vdso/Makefile +++ b/arch/arm/vdso/Makefile @@ -29,6 +29,8 @@ CFLAGS_vgettimeofday.o = -O2 # Disable gcov profiling for VDSO code GCOV_PROFILE := n +KASAN_SANITIZE := n + # Force dependency $(obj)/vdso.o : $(obj)/vdso.so -- 2.9.0