Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4783139ooa; Tue, 14 Aug 2018 10:29:16 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyrMjhAtZ9Jd6ZNCzgeJ0Pg3qLU0Fq1itClwudNCP8HTyv1wY0jyM8JxzhP/BJOyhDthv6F X-Received: by 2002:a65:6699:: with SMTP id b25-v6mr22135996pgw.426.1534267756354; Tue, 14 Aug 2018 10:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534267756; cv=none; d=google.com; s=arc-20160816; b=05bSaohnP0IQ3igM4C+dHIQFWkOeLE2l2AhLLvedmUGsEpJSRleyoX+aXNWLav6sKw v1aru+9ww+SouOcVuggBiBwHdORiE5NyJ52IKCo4wmQVFKOmESq4iFqDXIh0ekHS+zFt d6RJwGwXjYn8B8FSocBlDpSkEQW6LXXGEzIIOKdNxGLWBsf/0O2nRY6MbNekXRxPXUH1 MR/fYU1qMMumvHlj2zK+3AxbnEoyG0N1GZvx8QjQ77bqFYKuqkd9oD/jWgDX9a/R51jD YEywUHY1EQV/wC7hh8g5QD+m3jWqjoBg0w65x/6JQuUcIE4cwU81uAJMTQBvTEAxIawH krZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=jgAiZ+tctBr2E+ihgItV5cKj5YO7fFwi3eosj/bmp0E=; b=MpY28tnEBUaizyO1J+c0M5DABtco7qs/j/A0/A7uLP0bpvUgeB7bhc/IY3Dhh527g4 D9CjyuHniogCcGcfze27M7SBYQSL6EqjgiX7MmwJtjBxhI/Z1zntGXb3mNw/JXQwW3PQ qgB0BIrJ5TkuOu1BCZu7c31fi4/uJIGFQFPlo+ShDNpn5p3T++TcZttmwDNyuHJ2FPUs nOhlRa81/tAWF5D2eL7HClpWjVPEAd/yLE1lD8jirrlKWNGaIV/5BbvYKL2F+QmGsLwV 4D/a5BFzY5OJjevcjLDUxtu0XK3/HjqL8ZhBxepSInyPGwpJF9amu88eTIn8jSnTUoVz h70g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b82-v6si24649483pfb.18.2018.08.14.10.29.01; Tue, 14 Aug 2018 10:29:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388533AbeHNUOv (ORCPT + 99 others); Tue, 14 Aug 2018 16:14:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52072 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387824AbeHNUOu (ORCPT ); Tue, 14 Aug 2018 16:14:50 -0400 Received: from localhost (unknown [194.244.16.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 489FAC5C; Tue, 14 Aug 2018 17:26:43 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiri Kosina , Thomas Gleixner Subject: [PATCH 4.18 57/79] x86/speculation/l1tf: Unbreak !__HAVE_ARCH_PFN_MODIFY_ALLOWED architectures Date: Tue, 14 Aug 2018 19:17:16 +0200 Message-Id: <20180814171340.052011732@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180814171336.799314117@linuxfoundation.org> References: <20180814171336.799314117@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiri Kosina pfn_modify_allowed() and arch_has_pfn_modify_check() are outside of the !__ASSEMBLY__ section in include/asm-generic/pgtable.h, which confuses assembler on archs that don't have __HAVE_ARCH_PFN_MODIFY_ALLOWED (e.g. ia64) and breaks build: include/asm-generic/pgtable.h: Assembler messages: include/asm-generic/pgtable.h:538: Error: Unknown opcode `static inline bool pfn_modify_allowed(unsigned long pfn,pgprot_t prot)' include/asm-generic/pgtable.h:540: Error: Unknown opcode `return true' include/asm-generic/pgtable.h:543: Error: Unknown opcode `static inline bool arch_has_pfn_modify_check(void)' include/asm-generic/pgtable.h:545: Error: Unknown opcode `return false' arch/ia64/kernel/entry.S:69: Error: `mov' does not fit into bundle Move those two static inlines into the !__ASSEMBLY__ section so that they don't confuse the asm build pass. Fixes: 42e4089c7890 ("x86/speculation/l1tf: Disallow non privileged high MMIO PROT_NONE mappings") Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- include/asm-generic/pgtable.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -1083,6 +1083,18 @@ int phys_mem_access_prot_allowed(struct static inline void init_espfix_bsp(void) { } #endif +#ifndef __HAVE_ARCH_PFN_MODIFY_ALLOWED +static inline bool pfn_modify_allowed(unsigned long pfn, pgprot_t prot) +{ + return true; +} + +static inline bool arch_has_pfn_modify_check(void) +{ + return false; +} +#endif /* !_HAVE_ARCH_PFN_MODIFY_ALLOWED */ + #endif /* !__ASSEMBLY__ */ #ifndef io_remap_pfn_range @@ -1097,16 +1109,4 @@ static inline void init_espfix_bsp(void) #endif #endif -#ifndef __HAVE_ARCH_PFN_MODIFY_ALLOWED -static inline bool pfn_modify_allowed(unsigned long pfn, pgprot_t prot) -{ - return true; -} - -static inline bool arch_has_pfn_modify_check(void) -{ - return false; -} -#endif - #endif /* _ASM_GENERIC_PGTABLE_H */