From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8327ACA9EA1 for ; Fri, 18 Oct 2019 09:43:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 444A820820 for ; Fri, 18 Oct 2019 09:43:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="M1OHTJFs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 444A820820 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 E9FF88E0021; Fri, 18 Oct 2019 05:43:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E6F758E0003; Fri, 18 Oct 2019 05:43:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5E7F8E0021; Fri, 18 Oct 2019 05:43:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0231.hostedemail.com [216.40.44.231]) by kanga.kvack.org (Postfix) with ESMTP id B611A8E0003 for ; Fri, 18 Oct 2019 05:43:32 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 5B085FB7D for ; Fri, 18 Oct 2019 09:43:32 +0000 (UTC) X-FDA: 76056417864.02.drain46_7627fb41a9548 X-HE-Tag: drain46_7627fb41a9548 X-Filterd-Recvd-Size: 5867 Received: from mail-qk1-f202.google.com (mail-qk1-f202.google.com [209.85.222.202]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Oct 2019 09:43:31 +0000 (UTC) Received: by mail-qk1-f202.google.com with SMTP id v143so4911393qka.21 for ; Fri, 18 Oct 2019 02:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=5sJ27FR/T7ltMjmEdKxnPYRQomCfdE3/RtdupJGc9Xw=; b=M1OHTJFs+TZpQ19jfDEAmHPoTbxVEF+/eF74bWLnxpDUcAqRT+sBul+V3jnyqrTZqk RauYRUDnMBALHzWc5grRJ2RA4ZVbGoVebmr2vsvUVDUx67VF1Ob5O7FKbBOkoQ3Yz5fV vmoGOPuaFJEY4lOkWMRNcd1bX+VgVPgwRb/ehjwdxqr3ndaEZS89wXfwYVIwqUfTzDEP EcHZgq35GaIfXl6AM3kF20q9B1CvDT0q4QJcZEtCl7JG16nX8gTS8Nut7iHTX7B275Ho ufgJ3rEMCfWPzzmYqL1m18q6nyTxKxj6KwXQoDB7qQfiqqJa9nv9wO2oE8Ut01YbS8ah KdPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=5sJ27FR/T7ltMjmEdKxnPYRQomCfdE3/RtdupJGc9Xw=; b=E1ZdgRcvISxvkQzk3xAPi1qGelL+hM9JkvUjGhkqUp334autaR8frFI2C+qqFD/tAb vLErik9SY/OmhDq3+4kaz+MGTnRX910QzWGP80MTgs6ot/PpC6TeKIIrlU+iVM0c6h40 LnH/GzpV8SOoDdIQrVo4TSO2UdPjuEE/khUm8O8CLu8siQ/zPGy5pVwGQAwSg7HPTInF HANxSzxSgyBglkwKIFrMs0rnZ04S0knl2twfjqn1dAePLa80XYf8erPu/jsB9mdL+3Zq Bdx/v2JrCtlRTW4kqoHtnyK8BR8S3h1Ue7NMsS9B+N3/auV+QUxn+k8I0r3Qluglg/7H qYDw== X-Gm-Message-State: APjAAAXj8rRGrulPAc/XKUU3SWT+z2ainNY0yyxYCXbelZv6jeRzRcFT BkMG6NrZ8U0HefI46e84mZBAWwMgDgE= X-Google-Smtp-Source: APXvYqyavxHEp1nzbSg6Ww9DlPfuLJHY0wvX/cPVxTvlVuC/U/WnhHWLdFAe0N6I+KNl8mE/kPDX71PoUHw= X-Received: by 2002:ac8:47c7:: with SMTP id d7mr9020364qtr.29.1571391811179; Fri, 18 Oct 2019 02:43:31 -0700 (PDT) Date: Fri, 18 Oct 2019 11:42:44 +0200 In-Reply-To: <20191018094304.37056-1-glider@google.com> Message-Id: <20191018094304.37056-7-glider@google.com> Mime-Version: 1.0 References: <20191018094304.37056-1-glider@google.com> X-Mailer: git-send-email 2.23.0.866.gb869b98d4c-goog Subject: [PATCH RFC v1 06/26] kasan: compiler.h: rename __no_kasan_or_inline into __no_memory_tool_or_inline From: glider@google.com To: Alexander Potapenko Cc: Vegard Nossum , Martin Schwidefsky , Andrey Ryabinin , Dmitry Vyukov , linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" 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: As we use it for KMSAN as well now, let's change the name to be more generic. Signed-off-by: Alexander Potapenko To: Alexander Potapenko Cc: Vegard Nossum Cc: Martin Schwidefsky Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: linux-mm@kvack.org --- Note that __no_kasan_or_inline is currently used only on S390, and KMSAN patches don't introduce uses of __no_memory_tool_or_inline, so this patch can be landed later if needed. Change-Id: I842d88b841bf1c75ab659b0016a808c6dcf7cdae --- arch/s390/include/asm/processor.h | 4 ++-- include/linux/compiler.h | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 51a0e4a2dc96..6bee92331fcd 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h @@ -214,7 +214,7 @@ static inline unsigned long current_stack_pointer(void) return sp; } -static __no_kasan_or_inline unsigned short stap(void) +static __no_memory_tool_or_inline unsigned short stap(void) { unsigned short cpu_address; @@ -253,7 +253,7 @@ static inline void __load_psw(psw_t psw) * Set PSW mask to specified value, while leaving the * PSW addr pointing to the next instruction. */ -static __no_kasan_or_inline void __load_psw_mask(unsigned long mask) +static __no_memory_tool_or_inline void __load_psw_mask(unsigned long mask) { unsigned long addr; psw_t psw; diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 5e88e7e33abe..4a594bd1bc47 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -199,19 +199,21 @@ void __read_once_size(const volatile void *p, void *res, int size) __READ_ONCE_SIZE; } -#ifdef CONFIG_KASAN +#if defined(CONFIG_KASAN) /* * We can't declare function 'inline' because __no_sanitize_address confilcts * with inlining. Attempt to inline it may cause a build failure. * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 * '__maybe_unused' allows us to avoid defined-but-not-used warnings. */ -# define __no_kasan_or_inline __no_sanitize_address notrace __maybe_unused +# define __no_memory_tool_or_inline __no_sanitize_address notrace __maybe_unused +#elif defined(CONFIG_KMSAN) +# define __no_memory_tool_or_inline __no_sanitize_memory notrace __maybe_unused #else -# define __no_kasan_or_inline __always_inline +# define __no_memory_tool_or_inline __always_inline #endif -static __no_kasan_or_inline +static __no_memory_tool_or_inline void __read_once_size_nocheck(const volatile void *p, void *res, int size) { __READ_ONCE_SIZE; @@ -274,7 +276,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s */ #define READ_ONCE_NOCHECK(x) __READ_ONCE(x, 0) -static __no_kasan_or_inline +static __no_memory_tool_or_inline unsigned long read_word_at_a_time(const void *addr) { kasan_check_read(addr, 1); -- 2.23.0.866.gb869b98d4c-goog