Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2157375ybz; Thu, 23 Apr 2020 12:36:58 -0700 (PDT) X-Google-Smtp-Source: APiQypKYvClnycaQRZWb0SKCBzMntQBX2KSPJprsP7fzDKQmHsZIgtOGNTIWcvMvC+2IORdyC/Gd X-Received: by 2002:a50:c389:: with SMTP id h9mr4231237edf.1.1587670618009; Thu, 23 Apr 2020 12:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587670617; cv=none; d=google.com; s=arc-20160816; b=x2Ipb6fcieEhFahBIet1jSa5cxD0lsDYHDsx/0fSM1VPiOoja0EJw4jpusUjVf5CPN ybmHE1U6+vUdVbNpEkbDcIPnL4VeDWJo0gQduy0702ulf/sd237AIdDcy8wVGFXAcDZN YUnqiJrDcUboiaPq58dM8Ermj8GYzmr96ULHiA5HkmSgL57Elaqger5UqDQ+zIfo5va6 zG7Sx2PkCnz4BjTnBS4LJ3EuPUDIq/9U6jr0D2bFSIcaxJwp2Zl9REgSSnN5fLSP9+cR HMs7tmzBO5mA1L2VquVP0MYaGkNDruNqD1icnZuat8D+aHy0UDtoHz9V3gd3zC3yuePh VpZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aMzN8y43RzIeS+hGOjJQmVpyCdPMVYWSbPwa9BUqxsk=; b=yp3xdj9fUcsuj1zK94iWn4eutauWHKsSNvWJijvj5BS4+7mBez7FshCcrPT2vGUFqT kKeHhcflKmOZefsUXoT9b7fs96J9M+DZODGdFLWN9hJz7bMm8YPnUqcA9jGdvZ9I9LYO 3gks/ZF59PtIlLxX125ffuKV6dN2F8X5TS6he0VJvVEzwadv6yHEODQ50IiwN8hIsWB2 zLIg8vM+6RInPXAlMcxV7rvM9WxRBEjb/ObrIJW6jOYzZYBm4wOG5keqqrKe6hMRMrq/ ti9YMN75P/AU4ulQj3KI2sET930hlHpOoa9NfnnG2TodQsppnxpz+8YiKP8Bpt0erqe5 eHIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KQ7SwGEE; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b61si1634677edf.322.2020.04.23.12.36.34; Thu, 23 Apr 2020 12:36:57 -0700 (PDT) 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=@chromium.org header.s=google header.b=KQ7SwGEE; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730181AbgDWSGR (ORCPT + 99 others); Thu, 23 Apr 2020 14:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729901AbgDWSGQ (ORCPT ); Thu, 23 Apr 2020 14:06:16 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2EFC09B042 for ; Thu, 23 Apr 2020 11:06:16 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id y25so3351263pfn.5 for ; Thu, 23 Apr 2020 11:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aMzN8y43RzIeS+hGOjJQmVpyCdPMVYWSbPwa9BUqxsk=; b=KQ7SwGEE7BGDgi9nQDxn5/Qf+DVEwwXSpISshGAQFVxxqcofFWkLXI2M6EXYPngQWU PgnOirdnEL39LbXQdRpmdcipOkqc+kLm9yJ78NGGM14K3bEqEODuH4goJXgV5DrYzMPN 9J4hHpHGb1j4OqNvtIKczFHBEXOJQ3JNKWMyU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=aMzN8y43RzIeS+hGOjJQmVpyCdPMVYWSbPwa9BUqxsk=; b=t4EXBeiOQjUV9D+VtvCix5+BhVMTX2riTkZfx3fu0HUS2KbWlX3WuBkLhKQE5AykJR Oq+aALgy+iuJcnarDDY/vN4SM0I4byubpWlHrFOUJCU0sFziunDvPJS/DDpuT6Jr+EVx Fu0Q535T/vASk0jp9u38bf2M5zjcoX+AjTPQxdb+Pew5VRomWjOuE689lDKhdwo/DExT hO8lWorygUWXeOvnKmavCFq+ID8kdza0u65LEUQ8FG2l9FVZLVJmCRbKaMIrJ1bx/3GK eOL7wVk2MhXMcZxjFIo4GRvocTDbyCLf95DyWP7GtJJobNRF1QV3mQChCdtJuredrAdQ Qjog== X-Gm-Message-State: AGi0PuZxhVThku11YEqnqkZx29E4vbwjzaaeuXp7gl5BrVVJ+oP7KfiH ggYpgujKbkf5fEieWtzKuBbJL3hu9+E= X-Received: by 2002:a63:48a:: with SMTP id 132mr5156238pge.380.1587665176255; Thu, 23 Apr 2020 11:06:16 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f76sm3118222pfa.167.2020.04.23.11.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2020 11:06:15 -0700 (PDT) Date: Thu, 23 Apr 2020 11:06:14 -0700 From: Kees Cook To: Josh Poimboeuf Cc: Randy Dunlap , Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , Peter Zijlstra Subject: Re: linux-next: Tree for Apr 22 (objtool warnings) Message-ID: <202004231053.5E4F16C3E8@keescook> References: <20200422171016.484b031d@canb.auug.org.au> <2bf0635d-1406-23db-28c7-e55da9a07e05@infradead.org> <20200422164406.qhvd2my35wnjlzyg@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422164406.qhvd2my35wnjlzyg@treble> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2020 at 11:44:06AM -0500, Josh Poimboeuf wrote: > On Wed, Apr 22, 2020 at 08:35:29AM -0700, Randy Dunlap wrote: > > On 4/22/20 12:10 AM, Stephen Rothwell wrote: > > > Hi all, > > > > > > Changes since 20200421: > > > > > > > on x86_64: > > In both cases the unreachable instruction happens immediately after a > call to a function which is truncated with a UD2 (because of > UBSAN_TRAP). > > When I remove UBSAN_TRAP, the UD2s are replaced with calls to > __ubsan_handle_type_mismatch_v1(). Hrm, these are coming out of CONFIG_UBSAN_MISC, yes? It seems that the UBSAN checks that are non-recoverable all inject unreachable checks afterwards, from what I can see. > Kees, any idea? Isn't this another version of the earlier unreachable-ud2 issue? Regardless, the type_mismatch it triggered for misalignment and object-size checks, and the alignment check is likely going to always misfire on x86. The randconfig includes that config: CONFIG_UBSAN_ALIGNMENT=y So perhaps the config should be strengthened to disallow it under COMPILE_TEST? config UBSAN_ALIGNMENT def_bool !UBSAN_NO_ALIGNMENT depends on !COMPILE_TEST -- Kees Cook