Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1754260ybb; Thu, 9 Apr 2020 08:24:33 -0700 (PDT) X-Google-Smtp-Source: APiQypJrMvI4LGSW1Ku5XH54vnhC7PzV6VR/JI+o5Go0/zgFzI5JSFNzf5CChFEzDAEXleqwVdlP X-Received: by 2002:a05:6214:18c1:: with SMTP id cy1mr590737qvb.142.1586445873519; Thu, 09 Apr 2020 08:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586445873; cv=none; d=google.com; s=arc-20160816; b=QD2v48HPbKGbFisFlvn8mbrJSJaIWmO6lzQp19utitIuMKrmatf5Akg3M5fqreqADs BpBo9jMll5FAN7naB8ke1BCOou7Q7hPJJkheCH2i1I5jBbH++FHALhzu4J3Ixi+UzMLc CQSF8hMSE/2ickYL/k1LYnH+AJxHPWuTXdGJY6hg0hsf03yGuqbNixnSdb3WF60cePDm r7QtmOLm/loij9ScddUN8eGeRWM/tlgSuGHIFDabEYtEgeLt0LAVCymLGxDlCywgtYIQ 2BKMNHBYqs/waPLdNi+ws3UZJsI/wrEUtTD9TzV9J6CM5/OMfbQCqZH6VpXv8JDx573h 7Qug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vgEQvvnJoquOGzGtJREDN5USMlXV+4P/x5EsAI2d6zc=; b=ks6mFfeArMUgx+n/hEaBb6G6Ex6kr/knorEQVxNg4fQwx1irRCPL2KQRcJyCYnUckJ G+qiG9Mnq1B+OU5Bhikc5Y/zVUYjgEhPQC4sJcoz2oSSaMW6hr9FdVbufZKnuyfXWJCZ 559/ePdEqbGt4UPjvgKQhy78WsWbAZEAXP6+tbysj4GrArbQDxD3w9DKRaHX+U8xUv7a ptzO/0iTy9irYN6q2KDHYAuoYYAzfeScv/btrrkxKYKszC+MVdombHJwI/IKck5hP4Rg sQLkxighVlE1arPSuhHVE9SR5yQarjaftNVcTtT2W4V11K6+InlmmJOslwXsG0NQDckF H0aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CSr6492W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id g2si6140558qkl.155.2020.04.09.08.24.11; Thu, 09 Apr 2020 08:24:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CSr6492W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728186AbgDIPXC (ORCPT + 99 others); Thu, 9 Apr 2020 11:23:02 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:45124 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbgDIPXC (ORCPT ); Thu, 9 Apr 2020 11:23:02 -0400 Received: by mail-ot1-f67.google.com with SMTP id 60so7945103otl.12 for ; Thu, 09 Apr 2020 08:23:00 -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:content-transfer-encoding; bh=vgEQvvnJoquOGzGtJREDN5USMlXV+4P/x5EsAI2d6zc=; b=CSr6492WZ0/6vPLAPxMxzzM42U3DllbebcNqQ2ZLUGYDbje3VkNh4OEX3PKcco5B1F aI5WZ1HGy0kwZiRNxRMKr37ICaRvMivASl1MFsOYI14Qf40WnLlZweFp9W48x2aY/xrC yDPoLUnRJbZ6z2Yomz6ryfKpgh4tfDtNMBIGNK87M6eKxZguH5o35TjaH+OY4XoyTXF6 sBhzDw2qyzpKTyA6MPpGPJrIOS550tOA88yblwbGi4ocFCLFYhJHvMyttn6ejkiwOtJ0 gVOvke+jeOVJk8pYuWmUx1Hhrc7d5VLtkcsOTehiL1El13AoS5GxnPkMaCmQjAosKxUK 5N6A== 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:content-transfer-encoding; bh=vgEQvvnJoquOGzGtJREDN5USMlXV+4P/x5EsAI2d6zc=; b=D8Y8/7jc4R+3A9QWW1hIPelQMZd+d2qYN8zah8WYTl8LYh1x5b6P30q87HjsHv7PAi AH9r3xqjG//ujpLfLcVfaZsCXWqAgT1udKUgC2JNRfy2UeqgokFjfpHT027IXWJbPolB 0EwgoNQZcaa3rg9JlqkvUXZByH0QjB3QZybYuyJ3ObvFdkg0C3xPVmS++FR7QW1IxF4q iTCLWj97iiU62Ntk/6rqvWtHVCJyYt2bfpRpemNsT6lARCpj5uyzsu+RSJzUON2Pozwq cnvRo86BPDcOxPRIQLjSt8ED8AloElOwd+9lHDn/vPu4sY6ANLhmYAZ4e9brbuxSRiM4 fagw== X-Gm-Message-State: AGi0PubagsMgM1AREgwspa7Yi+ikQEbZXOHtaUIjJKM3mAbCUxgSyiLl zsOiEVq/ZrWlgqbz/SzB2beZxp2mB0rRokYurxh+UQ== X-Received: by 2002:a4a:d516:: with SMTP id m22mr355695oos.72.1586445779925; Thu, 09 Apr 2020 08:22:59 -0700 (PDT) MIME-Version: 1.0 References: <017E692B-4791-46AD-B9ED-25B887ECB56B@lca.pw> In-Reply-To: From: Marco Elver Date: Thu, 9 Apr 2020 17:22:48 +0200 Message-ID: Subject: Re: KCSAN + KVM = host reset To: Qian Cai Cc: Paolo Bonzini , "paul E. McKenney" , kasan-dev , LKML , kvm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 9 Apr 2020 at 17:10, Qian Cai wrote: > > > > > On Apr 9, 2020, at 3:03 AM, Marco Elver wrote: > > > > On Wed, 8 Apr 2020 at 23:29, Qian Cai wrote: > >> > >> > >> > >>> On Apr 8, 2020, at 5:25 PM, Paolo Bonzini wrote= : > >>> > >>> On 08/04/20 22:59, Qian Cai wrote: > >>>> Running a simple thing on this AMD host would trigger a reset right = away. > >>>> Unselect KCSAN kconfig makes everything work fine (the host would al= so > >>>> reset If only "echo off > /sys/kernel/debug/kcsan=E2=80=9D before ru= nning qemu-kvm). > >>> > >>> Is this a regression or something you've just started to play with? = (If > >>> anything, the assembly language conversion of the AMD world switch th= at > >>> is in linux-next could have reduced the likelihood of such a failure, > >>> not increased it). > >> > >> I don=E2=80=99t remember I had tried this combination before, so don= =E2=80=99t know if it is a > >> regression or not. > > > > What happens with KASAN? My guess is that, since it also happens with > > "off", something that should not be instrumented is being > > instrumented. > > No, KASAN + KVM works fine. > > > > > What happens if you put a 'KCSAN_SANITIZE :=3D n' into > > arch/x86/kvm/Makefile? Since it's hard for me to reproduce on this > > Yes, that works, but this below alone does not work, > > KCSAN_SANITIZE_kvm-amd.o :=3D n There are some other files as well, that you could try until you hit the right one. But since this is in arch, 'KCSAN_SANITIZE :=3D n' wouldn't be too bad for now. If you can't narrow it down further, do you want to send a patch? Thanks, -- Marco > I have been able to reproduce this on a few AMD hosts. > > > exact system, I'd ask you to narrow it down by placing 'KCSAN_SANITIZE > > :=3D n' into suspect subsystems' Makefiles. Once you get it to work wit= h > > that, we can refine the solution. > > > > Thanks, > > -- Marco >