From patchwork Tue Sep 15 21:16:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11777777 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 3CD7B59D for ; Tue, 15 Sep 2020 21:17:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EC5032078E for ; Tue, 15 Sep 2020 21:17:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="gGShhG9R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC5032078E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E6AB090008A; Tue, 15 Sep 2020 17:17:41 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E40FD900070; Tue, 15 Sep 2020 17:17:41 -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 D55EB90008A; Tue, 15 Sep 2020 17:17:41 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0195.hostedemail.com [216.40.44.195]) by kanga.kvack.org (Postfix) with ESMTP id BFF2F900070 for ; Tue, 15 Sep 2020 17:17:41 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8B11E362B for ; Tue, 15 Sep 2020 21:17:41 +0000 (UTC) X-FDA: 77266557522.08.line68_5c155e827114 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 0F6271819E621 for ; Tue, 15 Sep 2020 21:17:40 +0000 (UTC) X-Spam-Summary: 1,0,0,7afaccb675700ccb,d41d8cd98f00b204,3cs9hxwokcfyyb1f2m8bj94cc492.0ca96bil-aa8jy08.cf4@flex--andreyknvl.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1260:1277:1313:1314:1345:1359:1431:1437:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2693:2895:3138:3139:3140:3141:3142:3152:3352:3865:3866:3867:3868:3874:4250:4321:4605:5007:6261:6653:6742:9969:10004:10400:11026:11232:11473:11657:11658:11914:12043:12048:12296:12297:12438:12555:12895:12986:13069:13311:13357:14096:14097:14181:14394:14659:14721:21080:21365:21444:21451:21627:30012:30054:30070,0,RBL:209.85.221.73:@flex--andreyknvl.bounces.google.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100;04ygf4trtch9y6c5hmfgyu5es7p1sypji41r768xic3feaq5jsgewdckjmoafam.xf4btg7y56fsjydgw4b76twzprhjkuqwiuenbthxhoe9gy8bqw6rsfrgj7xm7s8.s-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:n eutral,C X-HE-Tag: line68_5c155e827114 X-Filterd-Recvd-Size: 4926 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Sep 2020 21:17:39 +0000 (UTC) Received: by mail-wr1-f73.google.com with SMTP id y3so1697540wrl.21 for ; Tue, 15 Sep 2020 14:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=gJaj9HJzY/xay7XUoLkj6R2OGJl/aiV7rlwVCZ5wZTg=; b=gGShhG9RfzxUJORAJUGoVV6FU0vEowbn6auu7yKf41CX89p6/5xtaqWfZfXtwdZseO ZZkWleubVSVVwvcV7jdnoJqptNYV+oLuntmAJqV8koLWbiNMEzMMeiBZLrXD4AyJdKlV QAdI2WRzVXOEXSqdulCZ22bdnCSfJlMn+TSKTjmlwBNAFLWjBb4QZ9nUDXs/geDhodZF lHdn/CMNBDNzl6HPU3g6w5p110DUQ4p6Q3/NxDbK5DQ5dFZSe3FkhOBElojem+jjPsqq Vf2OAk+IONfZnGJx+bpkcYWy8P79TampsVQtbxCtLDNbAJD1++c+8rwz1LKrIQwGojKw KgQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=gJaj9HJzY/xay7XUoLkj6R2OGJl/aiV7rlwVCZ5wZTg=; b=oZFF9LL7tFpCCJY5xUrD8LNfjwmyWeNohoOB7tcL+wwaXWaWuFX7/Pcq5a7ndl03HK S0jzhaCKTEqi2RRVHXc+GS/bUE+0Z+gvGHefM6g3ILuoH5lMYJk5C1kBx9MZWajcs3pc 88eJd6iYSeidhGPjqMWmXktaUgoWXcG8/syFuXmOQCKhtxNsLf4Xsu0iJXPkTa5sRx4/ tIVR9Xnnpkm/O7lYC7o5wDrDlRHAJXjQwBFDMa1OdI46bwPwPzA/WnE48lNmE2gZ0prY 0LUL/Mhwmq8YqGil5gF7YOS3NaCMZRgzXf5kL6zNPCsBzu0K34tHw3Cl8g0htvQ2khC0 R/OA== X-Gm-Message-State: AOAM533pLEqpc6AMAi/tBSD6ZdUj1n/tWuaK3dDKl4DZTTfb3FWqLu8U hjOrY7dxmxD/+CJUD5sWohspYRVk57NNneIX X-Google-Smtp-Source: ABdhPJz5Xohf4ARkglaPkRRJQxL2SqgjcqjnN5AC/Am00hGW5Wrd6XlIFiWLgi6EalEXv6txBloeoUIiPWUmpXXK X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a7b:c14f:: with SMTP id z15mr181253wmi.1.1600204657873; Tue, 15 Sep 2020 14:17:37 -0700 (PDT) Date: Tue, 15 Sep 2020 23:16:13 +0200 In-Reply-To: Message-Id: <0a35b29d161bf2559d6e16fbd903e49351c7f6b8.1600204505.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.28.0.618.gf4bc123cb7-goog Subject: [PATCH v2 31/37] kasan, x86, s390: update undef CONFIG_KASAN From: Andrey Konovalov To: Dmitry Vyukov , Vincenzo Frascino , Catalin Marinas , kasan-dev@googlegroups.com Cc: Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Will Deacon , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov X-Rspamd-Queue-Id: 0F6271819E621 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: With the intoduction of hardware tag-based KASAN some kernel checks of this kind: ifdef CONFIG_KASAN will be updated to: if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS) x86 and s390 use a trick to #undef CONFIG_KASAN for some of the code that isn't linked with KASAN runtime and shouldn't have any KASAN annotations. Also #undef CONFIG_KASAN_GENERIC with CONFIG_KASAN. Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino --- Change-Id: I2a622db0cb86a8feb60c30d8cb09190075be2a90 --- arch/s390/boot/string.c | 1 + arch/x86/boot/compressed/misc.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/s390/boot/string.c b/arch/s390/boot/string.c index b11e8108773a..faccb33b462c 100644 --- a/arch/s390/boot/string.c +++ b/arch/s390/boot/string.c @@ -3,6 +3,7 @@ #include #include #undef CONFIG_KASAN +#undef CONFIG_KASAN_GENERIC #include "../lib/string.c" int strncmp(const char *cs, const char *ct, size_t count) diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index 726e264410ff..2ac973983a8e 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -12,6 +12,7 @@ #undef CONFIG_PARAVIRT_XXL #undef CONFIG_PARAVIRT_SPINLOCKS #undef CONFIG_KASAN +#undef CONFIG_KASAN_GENERIC /* cpu_feature_enabled() cannot be used this early */ #define USE_EARLY_PGTABLE_L5