Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp445188ybg; Mon, 1 Jun 2020 05:42:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMEnfr8peWVteEjf9y2wO0OhuFAQehcuvtFwxDRWFho0sSbj1BrKQC6jDVXTG2K/7mM8W1 X-Received: by 2002:aa7:c998:: with SMTP id c24mr16127482edt.250.1591015374732; Mon, 01 Jun 2020 05:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591015374; cv=none; d=google.com; s=arc-20160816; b=Gl2UO3YQ2mfaf0qlj/phyzApeYJS25vGqiqkc48/xTjBWWcUiGhEsJRqmenA3aw6d9 rI22IMbMRvG1TmliYAoq8fXQ8NYjTQVlPlBogEp7VCxRsaStmtGH81faTXhhJCRqDnS+ QFZH659TXCd7rIZ/WXFYzpW17w1wgEWHni7bwrTQwyKXOuKvRtRcM6LaLC37pfkEexFS dBHPoTAnyRatn1dTvkBNv7I/p5BbWjh0AJDouQ0fz+X9Zm5tfgb8krfcAR8elZ9jHQrx IVRTYYdStnbtua6K69T5pwd+tlkO4JVlq2kw8WSfW8lO4MmkJZMmdhK+VAADAiqCyxhQ 98jg== 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=/xqANHaGznl5Aocto0IQ3gq922jkx9zcNPs6wxjCx7c=; b=fuSW0a5fOg09lChnHxvVKGhUWDjWw774HJoIWHOPqkn6yugATd2GgHiu8fNWlOmf8u 8yf1Cf9RrkhBpnLsPIIUJRG8TBhql13q8SKx/myrPwAICEAGilSJvYvssvBTuEktSDcG gJbwAtJSVEf6Jp+5/7JxRPxfRLn/oO9cCnxaNVpm4ryUygOt53uyG8ulCEcKuoD8W65e ap6ijKEU7l0tbTSRF7FXiMdfq5QgoOEcPhbUJWDwQR87dBMkU9N4YSqTYwm3qqfySL58 auZM5WBK2hqgynesEVFHfWjrdxSf/2AZUxKp+lds2kNZgBDzDWH/XZIowMtaIu8yvIJq 2cYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=RZbZjQG6; 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 v21si3034280eda.307.2020.06.01.05.42.31; Mon, 01 Jun 2020 05:42:54 -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=RZbZjQG6; 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 S1726825AbgFAMkn (ORCPT + 99 others); Mon, 1 Jun 2020 08:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbgFAMkn (ORCPT ); Mon, 1 Jun 2020 08:40:43 -0400 Received: from mail-oo1-xc41.google.com (mail-oo1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43329C061A0E for ; Mon, 1 Jun 2020 05:40:43 -0700 (PDT) Received: by mail-oo1-xc41.google.com with SMTP id x17so1374939oog.6 for ; Mon, 01 Jun 2020 05:40:43 -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=/xqANHaGznl5Aocto0IQ3gq922jkx9zcNPs6wxjCx7c=; b=RZbZjQG6H1T25hcnE+y6/y5IN6IfGfJ3yRCWbk3fOF0Byu6FZDtlpLMaQRXA5n/wdY jM/Nbn0qrGaumoLUJtOQH36v8/lrTiv0K3Jgz9VtCU2F+vRq3zCYvrgzTIgIibEFRu3f H12LfpVUyGTLvJR72Yla1iPZaTX7S0i1yJC96p9FkZBIZ3OwtPA9dgkYwK6B96sbP0lr FFpXuNjkXXkzyCt5Qz6KcBGgc0Qdab8OAHnOJWPA/PzdmIqOo78fScBbKhSKoVtDK/oD 078PLLoYkRxcxYnQttjE9UWRuA6TgemEhRUUOCOjRlm1K2pT7eFaJ5DZbscDeCZsHWq5 vMGQ== 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=/xqANHaGznl5Aocto0IQ3gq922jkx9zcNPs6wxjCx7c=; b=RJnF5pK/53ZNSu3c2q/wp2pjKDl86N5TjQiVdli9AEc/V8gyP8H5WXtxrko6DEc3CF WUrMq0bb8eFRF7LMqVaYc0i3NBrt3VfGbTG3BVMAGgPTStJO7p/nEDN7LWQIzFToAaTE 12j1ROTwb+hpzlpmT9bIHrKCPLu57Gk/r67fJxFSfyilkxas4Zd7scUWuk7ppKQPukSZ xAo2fWLRpccIh80L+4poQ5Qityjhb5XJrGM5h9GUZHEJgIo7TjfOFFb6tCgCnD1nmJoT 8CA+Fq9YC+qATlTndPDKvmXT48qrLw2Gsz//vZeHJly61gYx48NaldJOwJXb074vEqSZ cr+Q== X-Gm-Message-State: AOAM532pAWhgwdJCsdU0b3lgNw55Ar6Pn2UbZL+8xXlRKNojDsQhI+wi RDvP9JPHc//ZMuo2N0u23CajYnBA9uJZ2V+ybCQUmA== X-Received: by 2002:a4a:b54b:: with SMTP id s11mr11444003ooo.14.1591015242422; Mon, 01 Jun 2020 05:40:42 -0700 (PDT) MIME-Version: 1.0 References: <000000000000d2474c05a6c938fe@google.com> <87o8q6n38p.fsf@nanos.tec.linutronix.de> <20200529160711.GC706460@hirez.programming.kicks-ass.net> <20200529171104.GD706518@hirez.programming.kicks-ass.net> In-Reply-To: From: Marco Elver Date: Mon, 1 Jun 2020 14:40:31 +0200 Message-ID: Subject: Re: PANIC: double fault in fixup_bad_iret To: Dmitry Vyukov Cc: Peter Zijlstra , Thomas Gleixner , syzbot , LKML , syzkaller-bugs , Ingo Molnar , Borislav Petkov , "the arch/x86 maintainers" , Oleg Nesterov , kasan-dev 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 Sun, 31 May 2020 at 11:32, Dmitry Vyukov wrote: > > On Fri, May 29, 2020 at 7:11 PM Peter Zijlstra wrote: > > > Like with KCSAN, we should blanket kill KASAN/UBSAN and friends (at the > > > very least in arch/x86/) until they get that function attribute stuff > > > sorted. > > > > Something like so. > > > > --- > > diff --git a/arch/x86/Makefile b/arch/x86/Makefile > > index 00e378de8bc0..a90d32b87d7e 100644 > > --- a/arch/x86/Makefile > > +++ b/arch/x86/Makefile > > @@ -1,6 +1,14 @@ > > # SPDX-License-Identifier: GPL-2.0 > > # Unified Makefile for i386 and x86_64 > > > > +# > > +# Until such a time that __no_kasan and __no_ubsan work as expected (and are > > +# made part of noinstr), don't sanitize anything. > > +# > > +KASAN_SANITIZE := n > > +UBSAN_SANITIZE := n > > +KCOV_INSTRUMENT := n > > + > > # select defconfig based on actual architecture > > ifeq ($(ARCH),x86) > > ifeq ($(shell uname -m),x86_64) > > +kasan-dev > +Marco, please send a fix for this I think Peter wanted to send a patch to add __no_kcsan to noinstr: https://lkml.kernel.org/r/20200529170755.GN706495@hirez.programming.kicks-ass.net In the same patch we can add __no_sanitize_address to noinstr. But: - We're missing a definition for __no_sanitize_undefined and __no_sanitize_coverage. - Could optionally add __no_{kasan,ubsan,kcov}, to be consistent with __no_kcsan, although I'd just keep __no_sanitize for the unambiguous names (__no_kcsan is special because __no_sanitize_thread and TSAN instrumentation is just an implementation detail of KCSAN, which != KTSAN). - We still need the above blanket no-instrument for x86 because of GCC. We could guard it with "ifdef CONFIG_CC_IS_GCC". Not sure what the best strategy is to minimize patch conflicts. For now I could send just the patches to add missing definitions. If you'd like me to send all patches (including modifying 'noinstr'), let me know. Thanks, -- Marco