Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp589925pxu; Thu, 7 Jan 2021 12:44:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhr/HFH/bi8G7sWzQe2tzyxvCmtrmAixAMD9qWBMHn88WbFBzRWMG7gYzmwi8h5gR38a9d X-Received: by 2002:a17:906:7146:: with SMTP id z6mr413105ejj.379.1610052265078; Thu, 07 Jan 2021 12:44:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610052265; cv=none; d=google.com; s=arc-20160816; b=kIsTWN73cKkGBcDjaDwfBGYVm23fEXs0Bn+9cRTJcHaHWEUj9K2SXcB4/N34cqFBXA TE2cJeFeWm+BHmtzD6Fa+2jsY+gzYfpdQSnjOECS5O6h8/hRj91W6LmVUhEbSlP+gXf5 1OdXzvjXDZ9C6QB+pUgAXYvRFJSMB7rnGIiG8F0pH/HSGVS+SLMkQF7FMOaZLTx7RRsa NoMYnsogZwIv6YT6r5fMDR8eVYCVtPHJElxKUCiehvifdKAxSEYI48H4vMY3BcpC+HGn Jow22afkVwY0m5VOdkUoNB+hb5fisXV+Z5bgDtUPWblBsNStlIBa1gsAEoosbd461qXu BlPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7rJE6Y6cV+wskdxyRf+9DO7rPHAl2YMxLT63Ome6GCk=; b=akkepO4bdxl1NxY7Nvi3APdwlnmjcciPdP37pTN2kxFUMkHZ+OR/afGZGXtqcoUFYv V7NE1jplNaY/yD02wEJwRAELaMu6XAPnw48vAlm8RHgKcpNGtJi0RqiiEZujz0+D221Y s7fVACMhuw/KikjT6kHw2z2RP7zEFTgw1w300rH4YEXvcUsauIamV8nvixKDbdWZGCa5 ErZZJiJMB6w7fhKN9IqW6YkQwt9nWyrlmDlos5or1QHrcJ1Ltl8GY44NmalYJF0sl/Ek nZbBpwkacUTgPOYMFrjNQvykmRLpIiwupBsjBvVx4MYa486YXYFm3O7i6axg3w0fe7pl XxFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="dFVG6+/j"; 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 g19si2688847edf.599.2021.01.07.12.43.59; Thu, 07 Jan 2021 12:44:25 -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="dFVG6+/j"; 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 S1727217AbhAGUmI (ORCPT + 99 others); Thu, 7 Jan 2021 15:42:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:57148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726073AbhAGUmH (ORCPT ); Thu, 7 Jan 2021 15:42:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4467D23444 for ; Thu, 7 Jan 2021 20:41:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610052087; bh=quFeoS85KK6uAfqcXYRLfEGPpBGjuv76Ns9tqjYkT7k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dFVG6+/jZ7czQ+YIq9S1Dq4kc64QJh8XwChO67CtzNBtcvwb1OCzIPlWK9EllSppf h2J6uiCWkazQvzusHwVi4tj5SvB9Rm8aquDQHq6mF4i8LKgnHyVTdKIvqNqLPAtaGH HcnSvXGcZQcjt8OhzmrcknrOC07aDnUW8lZ/BIgq6sVaH/sx7454whrINuGEXMkbo2 fIiGKu8H1/z0ga4pI9X+r/RSqOQ7sDJmWIey1nfgQPLaSXEyiFwknab/pzbexyEjuT eA7Q3ReJQyGW17kt8p//Ys+TtXBKhi1Zr3016bQjm1VMlOwmTDIi1iGdlpyLkuLl5C DNK3PygnSGQJA== Received: by mail-oi1-f174.google.com with SMTP id x13so8853966oic.5 for ; Thu, 07 Jan 2021 12:41:27 -0800 (PST) X-Gm-Message-State: AOAM530Wp/kXxWlBEh3WPr4Ll6P9C+Dc3QzzJmOnCNFaZocoitqQ6avR Turz0HUVZ4EbQLlDi7RXt5c+i5xffS+BGlEjsxM= X-Received: by 2002:aca:fd91:: with SMTP id b139mr258112oii.67.1610052086633; Thu, 07 Jan 2021 12:41:26 -0800 (PST) MIME-Version: 1.0 References: <20201230154749.746641-1-arnd@kernel.org> <202101061350.913E1FDF6@keescook> <202101070919.2E20432140@keescook> <20210107181547.GA436377@ubuntu-m3-large-x86> In-Reply-To: <20210107181547.GA436377@ubuntu-m3-large-x86> From: Arnd Bergmann Date: Thu, 7 Jan 2021 21:41:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ubsan: disable unsigned-integer-overflow sanitizer with clang To: Nathan Chancellor Cc: Kees Cook , Arnd Bergmann , Nick Desaulniers , Andrew Morton , Marco Elver , George Popescu , Stephen Rothwell , "linux-kernel@vger.kernel.org" , clang-built-linux Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 7, 2021 at 7:15 PM Nathan Chancellor wrote: > On Thu, Jan 07, 2021 at 09:22:00AM -0800, Kees Cook wrote: > > I think this is: > > https://github.com/ClangBuiltLinux/linux/issues/256 > > and that bug needs re-opening? Or maybe there's a new bug I can't find? > > The problem is that applying the fix for that issue does not work, nor > does converting p4d_index to a macro like mips and s390. I am not sure > what exactly is going on there, it appears that clang cannot reason > about ptrs_per_p4d because it is an extern variable with no assigned > value in its translation unit? Right, I tried the __always_inline trick already and concluded the same. Arnd