Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2176519rwl; Thu, 13 Apr 2023 02:45:23 -0700 (PDT) X-Google-Smtp-Source: AKy350YC7DE1S4ROdYhylsnWJPt7CJE4ZIirD/fqXaXYaALSaVLBfSk8C267sSZiWks/BsAm5bKf X-Received: by 2002:a05:6402:14d7:b0:504:a140:7f15 with SMTP id f23-20020a05640214d700b00504a1407f15mr2090028edx.9.1681379123267; Thu, 13 Apr 2023 02:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681379123; cv=none; d=google.com; s=arc-20160816; b=Mq1Zq6w+j64ZO4n4OG0kaY8WETMaCaIQiS2pyUtqHqC8k05syW07jVskV5L0ySEUk7 G+BVyA7Td83ZETMeW7NMhQl5xCtnYToM/0pUKjcimCADqt7EFgUIFqOlfyDnU9Af0qua I3pOEFjZzvO1lf1lPcNniW8kbWkDjBkt/fi9Nr5kWStcrEl8+7EUGuNqe3tG4jZN6YyR Tt1+yGXiuzNIJzVdeKs7anfvEqZics2GnNYznnH9gdJiOaQYjDMCRu0B9rMGgJhXQYTF bYsjHvxtkU4GtBfDC88+cVol8BkkYqjBu9El/gBTXWg7P34ZX4y7IQanG0s/oiycODNi +apw== 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=FXuvR6IorGk+vc4Sbx2+ljSRa/GREptQBSmjgKoDNBQ=; b=PyN+Vf+cas9KdCQSF4NK+XIAUlnC3XCDVDs0GtN2lW2gdMFGOfkorv0bLyd/mqImSj PZlpl9KFzqEylpVQIGL2FW2DMEWKdJfYuy//d1ZkxlRGrNcjZiUPUjyyQ4+2ltus3Hzo h2I7kTGw8OCGnnIewz0nxB/QpIaTKxSyylWCUC8jt9jRsetE0RC9HsfzcO36Pt/7r37l IjxrBJa0MMBhy6OhScFgxxVe8i2hT0ACbY8W37bI90gP4jI73W3cOiB+tL2iXqze1hlM dokEndbfj1tuhARVPMUblc0QmUzRjdxOFnKOiPn2hrQyuqWpcoQWn3T/EgRzsgA/SCxP VXSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=p5qruo+v; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020aa7d48d000000b0050646e99503si182769edr.198.2023.04.13.02.44.58; Thu, 13 Apr 2023 02:45:23 -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=@google.com header.s=20221208 header.b=p5qruo+v; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229618AbjDMJmm (ORCPT + 99 others); Thu, 13 Apr 2023 05:42:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbjDMJmk (ORCPT ); Thu, 13 Apr 2023 05:42:40 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC544EF2 for ; Thu, 13 Apr 2023 02:42:39 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id f188so46454645ybb.3 for ; Thu, 13 Apr 2023 02:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681378958; x=1683970958; 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=FXuvR6IorGk+vc4Sbx2+ljSRa/GREptQBSmjgKoDNBQ=; b=p5qruo+vwLOmiKdo9zfjlw8oOGsiW3ZhyU3s5t1eTAZWl1pBeBkTL6t40YHwQn3GFI NI2QEtrQ6G8kh5BFWJMngPiODpBFNej8mvd08VDINHZXAboshyC0dYi1xCG71aNdWeOA 5MnmtW90zfH0DuhAQS2cJmGWyzQBx9Q+MkqvLvGxJ7jH+UwoAW89+VS2PcKvui2PvGn2 Q+JKo81qMBYyAgUglWmMWLpwyByA/OgQQOUdHZir1BQHuF8oyUwcII7JzB3oyXxNkHOf AMSZYJ2XapdoXefH7JHc+a/P1YL5WtIb8e4TeAMQj45qzAbP8ApdjZDDLJJOo4FWnMC8 8nlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681378958; x=1683970958; 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=FXuvR6IorGk+vc4Sbx2+ljSRa/GREptQBSmjgKoDNBQ=; b=MDasMfM6VTwN4feZn1An+UIXNgJElTqX3ixBx491oLCTAiNEwnKp1Pgpzk7k8XaayX PBIQGnMf0vEGK5dj9aY0mYnF6lHU4B++zSlhNS/RIfRUewN6iJWulRbzorzTK0GZaONs GeJjzd0ifGymqaU++Dlb+DMSFcvJLjyipKQYcHKU41apYnzGnHLaSK3znA+Rj0dkYDrG OqVKPdKdPKgsAaUUMbUmE8WgWBIZyhv6A5wOnd89MXZ3KVZ/o8f1SJSNP9Oj5TIKv3o2 RwsYhzD3CSwLq/3CMmdm0/IbMvow11QpysWARG3mH3Zory960S/aHWtVzbzwlQ9BKspp ukoA== X-Gm-Message-State: AAQBX9cq4wKdSwevkP0XM0FinFBM0l4c+etTRfUHbIloyJrK6z7FTXI2 mr16BqZR3EYIiodbCbquQE06n4fbFIjwdkDaXb2XaQ== X-Received: by 2002:a25:ae45:0:b0:b8f:62b7:e03c with SMTP id g5-20020a25ae45000000b00b8f62b7e03cmr190745ybe.1.1681378958351; Thu, 13 Apr 2023 02:42:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alexander Potapenko Date: Thu, 13 Apr 2023 11:42:01 +0200 Message-ID: Subject: Re: Possible incorrect handling of fault injection inside KMSAN instrumentation To: Dipanjan Das 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=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 8:24=E2=80=AFPM Dipanjan Das wrote: > > 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/b793a6d5a1c1258326b0f53d6e3ac= 8aa3eeb3499 > > - for kmsan_vmap_pages_range_noflush(); > > - https://github.com/google/kmsan/commit/cb9e33e0cd7ff735bc302ff69c022= 74f24060cff > > - 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/cb9e33e0cd7ff735bc302ff69c02274f2= 4060cff#diff-6c23520766ef70571c16b74ed93474716645c7ba81dc07028c076b6fd5ad27= 31R181) > should also be assigned to `mapped`. With this modification, the patch > works. Good catch, thanks! I'll send an updated version.