Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1354622rwl; Wed, 12 Apr 2023 11:29:14 -0700 (PDT) X-Google-Smtp-Source: AKy350YoVMxtT0txvTxgLmHVSXvsTZvq3HLK56+buE2HzdNZ/tyBzSAd54/K/6mZjdVeKJtZKOhX X-Received: by 2002:a17:906:1294:b0:91f:5f9c:5db6 with SMTP id k20-20020a170906129400b0091f5f9c5db6mr16714002ejb.52.1681324154080; Wed, 12 Apr 2023 11:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681324154; cv=none; d=google.com; s=arc-20160816; b=KZEKBtTAPQo85UEin6TLv5BHijlxqeUfJd6KdJ2lg2eYTmDt/Iq7+xvrbE1RpZTqJm nBJ2H0YmCxxA5kRm/JOag2vRT/EHaJ8SuTZ0/JAQYlF3cRTDm3qIUkKrL8Zu82Q8Cbb8 dDO302ucPQ8Bkf0jReZvse8fGnBqn1KAusWCuqFzsGP6R91sNO+/ffcSgoL/vIPMRuZS 59/orfFNrUAACVzCJb9g8n5fHqUuHV5ChJm6dVsOOVgbThAchbP95+sWT/wpx+0KuvRP FbACIkhqKUtA2g28ZD58lFqPrkKbdTa31oP/FgCBSpmsCPiIjqXEWY6u8Zs/g3bKGW2T 97Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VezbKOf2ys8mmlrW6/XtyNOzwlQ4f87v3oaLK1/JLPM=; b=Qj/WvPgyDw5U43T1uu5n4pXQiEKtkG2x/3HSU89Kyt5Y/VetJVpqBYMs+kElz2Ht69 hbPnxe44egz9ynEE6OYnYcdPLvDvgR76HrnBLvlYxH0vPjA4zOGv/Ngd9+8q7JC5miA4 jq26zstijZHfOqhnfQLV+Uy514ptF3woAV9D0KiHbPC55xOoHizqDrsZAzgisXEuW/Zg OZBZv29oTR4JkJl59etGOtptDAxlKB7ufFGw7bsK3VEyHB0Buy3LxdHVITbtroiPmwY7 gmR6243M9G1+wMg7VVdT5g9chH/NbXxKkzVYS03ppgb0YemvaS2wy3okt6uSw4AaKx40 3l7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=MKMmL4qs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp17-20020a170906c15100b00924b50d1f25si1727915ejc.353.2023.04.12.11.28.46; Wed, 12 Apr 2023 11:29:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=MKMmL4qs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbjDLSYo (ORCPT + 99 others); Wed, 12 Apr 2023 14:24:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjDLSYn (ORCPT ); Wed, 12 Apr 2023 14:24:43 -0400 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC9ED40F2 for ; Wed, 12 Apr 2023 11:24:42 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id v9-20020a05683024a900b006a42896c456so936183ots.8 for ; Wed, 12 Apr 2023 11:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681323882; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VezbKOf2ys8mmlrW6/XtyNOzwlQ4f87v3oaLK1/JLPM=; b=MKMmL4qsxYweKgbBB8dZXQi1smZzm0GDc189NTjo11JN2ANzLN30asgL0PsSjobj98 ZxF8tZYGp5md2wpMol9mZsLAm1pcYoTl9OQl/STRTATgbygj+M+t0on8MSi2UPplq/Ze jqqtVG0YW07aRRlYzeF/bu5RtDnrWc/MldeaZStwdz3vGEPCYSuEWd4Nkh0pRcrdZB4q hK9rxct2rIWOvChr7iAPe8Gzxy9j6QZT/nC/bByo/iZAExQA0iogpaIB4IQUahrr0x14 KRpZayB70+dPEgYiCkAbV8r2ldkXR1+Nc3diuC21RMhL4twCHV7vZU3eB68ME1v+mxVZ /How== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681323882; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VezbKOf2ys8mmlrW6/XtyNOzwlQ4f87v3oaLK1/JLPM=; b=JOwSffV8pYSAMkfBciOJoa/lvbdwKKJyE4c+4o8psbgBmbWox19+n2DfF1K4JHKl0A s2eCXFRJS7yOO9JL4l0ZW3Kfmx4MLwb91xmiH8NK1BIQK10Pjx9TK/KcuaUV2eYnkqM/ 5WsMHPWis8/GHNR+O7YYtrKLoWdK1j2C6n/zZEoKhhw77W90FEmVYIk8do+WrgI3m4W4 NLl7VizuRVC3HURqg5sHIO/2IqK2rZ798Vw4KFrVhF8hc0SASC51YFBv2kB1uygG+Erf wpz18vSiSrTDnrdg5nhnXtVHB3GjZt0oZIYOiwuIpBICqxFQTKSJDZXc/nZ7Eaw7r8GE tobA== X-Gm-Message-State: AAQBX9dX0zCtdqQI+UbksmmhR6JpL6rGIR6bozLqHw7XQJKbqCsxVnFc muhfh4mkWavnH4+tzgC7uWfjE61BXDbpRnfr54E= X-Received: by 2002:a05:6830:114e:b0:6a1:3fd6:5a0b with SMTP id x14-20020a056830114e00b006a13fd65a0bmr4189583otq.2.1681323882121; Wed, 12 Apr 2023 11:24:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dipanjan Das Date: Wed, 12 Apr 2023 11:24:31 -0700 Message-ID: Subject: Re: Possible incorrect handling of fault injection inside KMSAN instrumentation To: Alexander Potapenko Cc: Marco Elver , Dmitry Vyukov , Andrew Morton , kasan-dev@googlegroups.com, linux-mm@kvack.org, Linux Kernel Mailing List , syzkaller , Marius Fleischer , Priyanka Bose Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 12, 2023 at 7:39=E2=80=AFAM Alexander Potapenko wrote: > Here are two patches that fix the problem: > - https://github.com/google/kmsan/commit/b793a6d5a1c1258326b0f53d6e3ac8a= a3eeb3499 > - for kmsan_vmap_pages_range_noflush(); > - https://github.com/google/kmsan/commit/cb9e33e0cd7ff735bc302ff69c02274= f24060cff > - for kmsan_ioremap_page_range() > > Can you please try them out? The second patch needs a small modification. The return value of `__vmap_pages_range_noflush` at Line 181 (https://github.com/google/kmsan/commit/cb9e33e0cd7ff735bc302ff69c02274f240= 60cff#diff-6c23520766ef70571c16b74ed93474716645c7ba81dc07028c076b6fd5ad2731= R181) should also be assigned to `mapped`. With this modification, the patch works. --=20 Thanks and Regards, Dipanjan