Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp735970ybg; Wed, 3 Jun 2020 12:12:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu6sStmj/02I4JHTv4xER0wW+RsZHKDzNiDin5UahNXW2rA97r4L+tIB2TtOMK4LkgRWDP X-Received: by 2002:a17:906:560b:: with SMTP id f11mr733299ejq.11.1591211579274; Wed, 03 Jun 2020 12:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591211579; cv=none; d=google.com; s=arc-20160816; b=VPBoJbGe0OKdOSHPonQQrIiU1XHT1kw51NUuyupuli1HglOEqJzs5FC0FlQ089u5Zo yIQJzTcxEvcPz1zHSwI7wF7PFnz1ZRLiLUFXhzok2vtrxBci5g2Rtfl1pvXuP6YtJB9v 5x1EI2erRnf6BbF7p46aUW7yh4kmIxDY1ZiKnvJW4BB+UD4KAzENfbxRSlC0PCNNUYRc /D75es4SdSRVyCpY+1aM7gWNHUMmw7rH0+E8BU9o7K+ZAj0LzDeiBmBoe+Wq6jDPgO7Q QeoH+0Kv6KJ6sZ5vvH2GYpes5Wpq0vKlh6tegHywMpnA1eiWTeW2bHDXABLUzHy16uwQ 6GNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=67IcpGYjCT+FsM7zbHjM+OI8M/GSYi0Apdlq92IAtKw=; b=MaQLkOxLe71v/uWwCtET97xJ45ItIPqfdImH5qaW0NrLS3sYSDvXMUpZhA1LjGPfPj HFuZ8opivnk4JPdNjzJKW30jQUDhpitinqMm1jn+ZEYP81UIcF2p1p2Mr8yrRln22SIs 38wESJMB3938Obi5oofe4G8UR0uTwHAizlBlO2XAw66qBueVlAhMQrcUR4xV4JlSb86q 5dAksvqO2peF6zg+Aj1Q1fRHWpweVFgUgIF8YbzEseTI2yk9B/UhJGL1u1ExC3Eo7VXX lSHmYcH+mCpP/3TVepco8c8+gZ8jmvSEzQ7XZEFHtKW3W/ffHC7FEjaIY0dpFeLkSFSV mF6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=egSBgEUc; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si266780ejh.152.2020.06.03.12.12.34; Wed, 03 Jun 2020 12:12:59 -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=@google.com header.s=20161025 header.b=egSBgEUc; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726087AbgFCTKQ (ORCPT + 99 others); Wed, 3 Jun 2020 15:10:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbgFCTKQ (ORCPT ); Wed, 3 Jun 2020 15:10:16 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1813C08C5C0 for ; Wed, 3 Jun 2020 12:10:15 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id g5so2783914otg.6 for ; Wed, 03 Jun 2020 12:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=67IcpGYjCT+FsM7zbHjM+OI8M/GSYi0Apdlq92IAtKw=; b=egSBgEUck8UQz5o9i/JnEEmHXFwrBxadOEmq90yGlgKOu+HCgL5g3nxhkf5b6Ovq/l HHq+upRNTN4uvWeyXA+HcQbpRHcBwfO+afkekfPvRDARUDeF7lYUHUiQXNU/OK+kUsa/ Wjpvp00faAf7t58EoAULDOx6dfR5UW+c/lSislNu47WzHAxohV6EBMXjSEPj/5tt7//I dOlQ0E0vg0RbtuKExus+nzXYEnur3oKWSqGe58pYn31Zhs5unANTt1O4/tNh7i2Ggupy pvGrbz17Uh5a2cb7eeYmSYupyOKiNb5SXeb0bbX7SSl3DIaZHrm1Wh8igIJLEo5rLG2T kOKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=67IcpGYjCT+FsM7zbHjM+OI8M/GSYi0Apdlq92IAtKw=; b=Bsm8MahG4WhgITaU/IUscPqiXA1T0qDtCNu43er7T2mi/jV8/6ORvohfikGr2CLCma Cbr8gJSSlTYcMoNPWlrtX0FlFa9DMhtC2a8kai5LfzBDyYFq2bKvC+/kUl/CzsqHNCzW MnBlj0adeWxZozkdSWjp+dQDpWFM7cbgs4KEP2QHYU6Mttqnlgbz/TgefADJi1gBjm+4 yuloQteih/ZQoIXgWBXsYYZnasaIyUpnOW5OMsseDxHW3ZnVJ+MouGu40ONetQCWkLae 3RFohaXdvHWwye44oefVcaPM4wC5mJxct5T1O+29QgpCadegjZ4eBdBmza0cAjpxMzWM CI9w== X-Gm-Message-State: AOAM5329kg35FJoM0nL4w5TbI9lVDXsyqZriAwVX/oJQ1WvQtVOjhUq1 4lnhGvrafNSEROKx3mCpc1sMQetWNDjbdO1QCRmuxn82+YE= X-Received: by 2002:a9d:7dc4:: with SMTP id k4mr988102otn.251.1591211414645; Wed, 03 Jun 2020 12:10:14 -0700 (PDT) MIME-Version: 1.0 References: <20200603114014.152292216@infradead.org> <20200603120037.GA2570@hirez.programming.kicks-ass.net> <20200603120818.GC2627@hirez.programming.kicks-ass.net> <20200603121815.GC2570@hirez.programming.kicks-ass.net> <20200603160722.GD2570@hirez.programming.kicks-ass.net> <20200603181638.GD2627@hirez.programming.kicks-ass.net> In-Reply-To: <20200603181638.GD2627@hirez.programming.kicks-ass.net> From: Marco Elver Date: Wed, 3 Jun 2020 21:10:02 +0200 Message-ID: Subject: Re: [PATCH 0/9] x86/entry fixes To: Peter Zijlstra Cc: Thomas Gleixner , "the arch/x86 maintainers" , "Paul E. McKenney" , kasan-dev , LKML , Will Deacon , Dmitry Vyukov , Alexander Potapenko , Andrey Konovalov 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 On Wed, 3 Jun 2020 at 20:16, Peter Zijlstra wrote: > > On Wed, Jun 03, 2020 at 06:07:22PM +0200, Peter Zijlstra wrote: > > On Wed, Jun 03, 2020 at 04:47:54PM +0200, Marco Elver wrote: > > > > With that in mind, you could whitelist "__ubsan_handle"-prefixed > > > functions in objtool. Given the __always_inline+noinstr+__ubsan_handle > > > case is quite rare, it might be reasonable. > > > > Yes, I think so. Let me go have dinner and then I'll try and do a patch > > to that effect. > > Here's a slightly more radical patch, it unconditionally allows UBSAN. > > I've not actually boot tested this.. yet. > > --- > Subject: x86/entry, ubsan, objtool: Whitelist __ubsan_handle_*() > From: Peter Zijlstra > Date: Wed Jun 3 20:09:06 CEST 2020 > > The UBSAN instrumentation only inserts external CALLs when things go > 'BAD', much like WARN(). So treat them similar to WARN()s for noinstr, > that is: allow them, at the risk of taking the machine down, to get > their message out. > > Suggested-by: Marco Elver > Signed-off-by: Peter Zijlstra (Intel) This is much cleaner, as it gets us UBSAN coverage back. Seems to work fine for me (only lightly tested), so Acked-by: Marco Elver Thanks!