Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2172547pxb; Fri, 5 Feb 2021 10:38:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBiYBE4DPMwXy+6Uegb/f01u163uu+ZqBuD4FyjA8HK205VKOfxcSmnno7VmKkx6L3TzxW X-Received: by 2002:a05:6402:1d82:: with SMTP id dk2mr4689783edb.132.1612550291930; Fri, 05 Feb 2021 10:38:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612550291; cv=none; d=google.com; s=arc-20160816; b=wDveiGrbcHHsMvGkmfoqIst35tzVkUXv//K4RuPBigeicu4eWxG1xxotinXIzRaEz1 hPR+RjNmuEOQs7P2aqA6d50h6aA58KECaP0bVydRYragtmqM7ZT9yGuvAlLoYZDowq+a dqOrI3F7iwFaybhwNwVr5eD3mNXeI1s2nWPyCmsHpDBi93EDaL8d+wIF3ImQeI6yrj25 iA99xFATm5kg5PGRA9NGGFIah8lMF1t2euoHpb54eFbgOlTvNP/8RwPnAKvF9RIpZ1of nFllQBuQzRAPw7KaeCzzweJWkXpweh+Zo8x+oRsREoxmEnaX6kPpSPozj/CWt/RHbUai H/Ag== 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=umm5uE9W8mckFYPBamArgNGURzP1So7BI3Lz5XaDlzU=; b=krm8G4Y8rz1UbtQmoWWb9f8LoVMWCpReM+gHOhzNzgZYLkiqWw/vw81TjGgWfX5cpz M8FHrCgYVosmcqnQh+KDh5lpDyQVKceQHTscfGVqxe2bOvLMIuH3VSnpNUjX33PmVUhN 2RUjU+XUQQrTiBrMx3+aENv1k730DGEzowBXSso0vbEcA0Kk51/WS341EvALhtlRFOTU RXYoKZM+aL1B8HNAS5NpxnuCn9cjhwqYCGMwOFvU3EquX8AsfVLlSlF7q1oBFx7hQrDI rJyRR9GiZfFCiCDNmPISZLW/T2IlBpagaPrMvq6zVkj41CBX39+5JAgXZv0ixFt8tMSG N/AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eS0W03i6; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp21si5228363ejc.108.2021.02.05.10.37.45; Fri, 05 Feb 2021 10:38:11 -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=@kernel.org header.s=k20201202 header.b=eS0W03i6; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233294AbhBEQyJ (ORCPT + 99 others); Fri, 5 Feb 2021 11:54:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:46378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233549AbhBEQt5 (ORCPT ); Fri, 5 Feb 2021 11:49:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6BEE864E75; Fri, 5 Feb 2021 18:31:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612549899; bh=ZBO58XuSLGoSIwV7OGo7aZ3r+3zbKVqiVTGcBJc1TbA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eS0W03i6dAJPBLwrq1hqRWG6biv2ghW/VRQ95qDexIpMKku2X7JInKK9aImANrT2D OIpp4VGFTv5mFXwI49isItZfynX3QsYpbNxMKm04jlugWYzBF7vpsYa/8V84c9H/3Y USch21mY7kkgO1pAlCGhWmxfga1KFCS2oqfW9OPqrx0A9w3zcRcq6h7cI7UM8BHlSz r/WkI4uFNJ/qG6GRfSOGbX02JPPALfgg3C6fK08t1WKaOAe3urbp8Tcpz4Hp4VoEQl ymj9WAFGI+uXwioN9Mss9npgEPXxwKk0TVJk5E+ASgoVu+2BNkAlHlLJm9dws12AxD mnvmEMHLnW0pg== Date: Fri, 5 Feb 2021 11:31:35 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: Borislav Petkov , Ard Biesheuvel , Arvind Sankar , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , X86 ML , Nathan Chancellor , 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" , Kees Cook Subject: Re: [PATCH] x86: efi: avoid BUILD_BUG_ON() for non-constant p4d_index Message-ID: <20210205183135.GA3393009@localhost> References: <20210107223424.4135538-1-arnd@kernel.org> <20210118202409.GG30090@zn.tnic> <20210203185148.GA1711888@localhost> <20210205103457.GC17488@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 05, 2021 at 10:27:54AM -0800, Nick Desaulniers wrote: > On Fri, Feb 5, 2021 at 2:35 AM Borislav Petkov wrote: > > > > 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' > > ^ this one is https://lore.kernel.org/lkml/20201230154104.522605-1-arnd@kernel.org/. > Trying to get the last of these tracked down. I think there were some > changes to UBSAN configs that weren't tested with clang before merged. The rest of these should be resolved by https://lore.kernel.org/r/20210205023257.NJnJdyyZk%25akpm@linux-foundation.org/, which is currently on its way to Linus. Cheers, Nathan