Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1836294pxb; Fri, 5 Feb 2021 02:42:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbdkrCUuq7OOQhVfJXadwCW4vTqqf0Rcw7vMU0rCzcNRodFJLzU2YEDmyl+nKLucvD2sBx X-Received: by 2002:a17:906:1c4b:: with SMTP id l11mr3450217ejg.155.1612521756242; Fri, 05 Feb 2021 02:42:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612521756; cv=none; d=google.com; s=arc-20160816; b=r0iNuStcm4AmbViqR0FYUq+oltx+GbKFeOIjydZXQzxnBBjJm9JFV9d7FPDyF+aEk0 x/K8bMLZ6H2GR7taRaRxMV4z1QQ97D7uwcgfhvdMmiJB56WIv3eEmjdrCcnYmkRVKsDl TQjADowaRiTi+eE/W2PBMjFg+lcfWhk4/5k3ovX3VBxFkXAGx+OJFGnnspvrSqIJgIWW jTqN13Sgm3WCCRDaUYhjhEOoZuX0EL/2WIiX8/hyYUNjJzPvjFYU9EZaW4xhugYwDwr5 e5YHEG+kqAzdUnQh9NmrEBqhz/5Ud5NoFBzX6CEK77pMLcPd+fDuvV97Er777q8QzsdK Eh4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mpQ2H03vRziBvKFdKZ6tUIGAARtxtvomCBNzTQhxNf4=; b=0ZkbWybnKLJueJ/UKVYSraNLJeHeYJAhz136vmjEAhfliumOuRNAduuIbo1zpSStkL t0KSn/jIr8yuxlXRfUbMhIjFO4/09aHHuyCCZt3DvT7gp+VoAbtY7cVNtERiN+JQh3qT AJmjBvl5u8+fD8+SpdZZX7HL5KmSg0AGZTKJamncfTySI6TlBMUXr+xKJuDgNv9BTG+z nl3KBpvJGM3rpkzREfQNALlJuxtztstM8SWtjzbQKByCxq31cZ8sK28TU703zHEe1K/M 2h6y5b7aimUxCSackMyuWx4k8NJ1ch5Fxnat0+xS3xCZ72VyQdIr6ORToHiSP3czOFbc LZTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=WvoLruU+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si4546097ejb.381.2021.02.05.02.42.11; Fri, 05 Feb 2021 02:42:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=WvoLruU+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229554AbhBEKjf (ORCPT + 99 others); Fri, 5 Feb 2021 05:39:35 -0500 Received: from mail.skyhub.de ([5.9.137.197]:43168 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231380AbhBEKfq (ORCPT ); Fri, 5 Feb 2021 05:35:46 -0500 Received: from zn.tnic (p200300ec2f0bad000b74c3ca4e4ea61e.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:ad00:b74:c3ca:4e4e:a61e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B044D1EC04DF; Fri, 5 Feb 2021 11:35:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1612521300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=mpQ2H03vRziBvKFdKZ6tUIGAARtxtvomCBNzTQhxNf4=; b=WvoLruU+FJx9oOsfBOQwESy/LzPtM5fuXxYRrxKyg2J3ZIJoKMGA6UCqtGykPujB7eGHCP CE43nzJ9O5fKaW0l9aiIQXwVgIfdePyE9JH+TBeUwj7RwBidSDOO+K8MSst2DcREHXcZA2 yNNV8rz8NpYhP3dQO7OwMudKDRYQmI0= Date: Fri, 5 Feb 2021 11:34:57 +0100 From: Borislav Petkov To: Nathan Chancellor Cc: Ard Biesheuvel , Arvind Sankar , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , X86 ML , Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , Darren Hart , Andy Shevchenko , "H. Peter Anvin" , linux-efi , platform-driver-x86@vger.kernel.org, Linux Kernel Mailing List , clang-built-linux , "Kirill A. Shutemov" Subject: Re: [PATCH] x86: efi: avoid BUILD_BUG_ON() for non-constant p4d_index Message-ID: <20210205103457.GC17488@zn.tnic> References: <20210107223424.4135538-1-arnd@kernel.org> <20210118202409.GG30090@zn.tnic> <20210203185148.GA1711888@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210203185148.GA1711888@localhost> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 11:51:48AM -0700, Nathan Chancellor wrote: > x86_64 all{mod,yes}config with clang are going to ship broken in 5.11. Dunno, it is still broken here even with those build assertions removed. And it ain't even an all{mod,yes}config - just my machine's config with CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y CONFIG_UBSAN=y # CONFIG_UBSAN_TRAP is not set CONFIG_CC_HAS_UBSAN_BOUNDS=y CONFIG_CC_HAS_UBSAN_ARRAY_BOUNDS=y CONFIG_UBSAN_BOUNDS=y CONFIG_UBSAN_ARRAY_BOUNDS=y CONFIG_UBSAN_SHIFT=y CONFIG_UBSAN_DIV_ZERO=y CONFIG_UBSAN_SIGNED_OVERFLOW=y CONFIG_UBSAN_UNSIGNED_OVERFLOW=y CONFIG_UBSAN_OBJECT_SIZE=y CONFIG_UBSAN_BOOL=y CONFIG_UBSAN_ENUM=y CONFIG_UBSAN_ALIGNMENT=y CONFIG_UBSAN_SANITIZE_ALL=y # CONFIG_TEST_UBSAN is not set and clang-10: lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x253: call to __ubsan_handle_add_overflow() with UACCESS enabled lib/strnlen_user.o: warning: objtool: strnlen_user()+0x244: call to __ubsan_handle_add_overflow() with UACCESS enabled ld: init/main.o: in function `kmalloc': /home/boris/kernel/linux/./include/linux/slab.h:557: undefined reference to `__ubsan_handle_alignment_assumption' ld: init/initramfs.o: in function `kmalloc': /home/boris/kernel/linux/./include/linux/slab.h:552: undefined reference to `__ubsan_handle_alignment_assumption' ld: init/initramfs.o: in function `kmalloc_large': /home/boris/kernel/linux/./include/linux/slab.h:481: undefined reference to `__ubsan_handle_alignment_assumption' ld: init/initramfs.o: in function `kmalloc': /home/boris/kernel/linux/./include/linux/slab.h:552: undefined reference to `__ubsan_handle_alignment_assumption' ld: /home/boris/kernel/linux/./include/linux/slab.h:552: undefined reference to `__ubsan_handle_alignment_assumption' ld: init/initramfs.o:/home/boris/kernel/linux/./include/linux/slab.h:552: more undefined references to `__ubsan_handle_alignment_assumption' follow ld: mm/mremap.o: in function `get_extent': /home/boris/kernel/linux/mm/mremap.c:355: undefined reference to `__compiletime_assert_327' ld: mm/rmap.o: in function `anon_vma_chain_alloc': /home/boris/kernel/linux/mm/rmap.c:136: undefined reference to `__ubsan_handle_alignment_assumption' ld: mm/rmap.o: in function `anon_vma_alloc': /home/boris/kernel/linux/mm/rmap.c:89: undefined reference to `__ubsan_handle_alignment_assumption' ld: mm/rmap.o: in function `anon_vma_chain_alloc': /home/boris/kernel/linux/mm/rmap.c:136: undefined reference to `__ubsan_handle_alignment_assumption' ld: /home/boris/kernel/linux/mm/rmap.c:136: undefined reference to `__ubsan_handle_alignment_assumption' ld: /home/boris/kernel/linux/mm/rmap.c:136: undefined reference to `__ubsan_handle_alignment_assumption' ld: mm/vmalloc.o:/home/boris/kernel/linux/mm/vmalloc.c:1213: more undefined references to `__ubsan_handle_alignment_assumption' follow make: *** [Makefile:1164: vmlinux] Error 1 -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette