Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4530795rwb; Tue, 6 Sep 2022 08:46:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR7ghflcN73jAFRLVyRGrTSd9MLtgy+ikvjvV3w0eafukq5dH5RwRVnKkaTzd5iN6Ex0PlvV X-Received: by 2002:a17:90a:6783:b0:1fd:ab56:5af7 with SMTP id o3-20020a17090a678300b001fdab565af7mr26171857pjj.39.1662479191797; Tue, 06 Sep 2022 08:46:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662479191; cv=none; d=google.com; s=arc-20160816; b=NBRZnX392XG4WEO3UUccQO+vgj1o0CtdWs2cbuKm3aH3fxQXJLMOZs8veHZCLwZntL G1s8i3oZ8l8XOfcg64f0kVu3oo4r+hp8zFHUm6mT4xIjKuLTKP9hShd4PXDIrqyuyZRV wHqYVYAT/kIsDY+SauvPcSAMU3izmeDZ9r6L19I0v69mUbqIxjq8FIUvCgmNcROfcnhX Bl9aUxcuOtkihApLWOwd+LX7RQ7CUJK+cxqeDyi45M6ke0aqEz/6IB7pVqa71bvZ2jhl ANbLKbd9AZgn/97JnLinalhNS8MNAZQ2ginu8Nl9TMgIAA6782E2VIsXJe7ep5noa6iE p25g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UJM5srF8hEIXQkbrFMWMpqfmvKyMTxPhXcroonaQ7aQ=; b=tbyDP3dKI0j/dj+k8f3Gc8yqO4r7/rc6Qca3QETbPb61UHaCVWTSBvRdymmz3lwK7r zJOXgSg3bQkOvZJ0IIT+2UrNPUcIfSh5c8tKsSj2BYnMzuhZqoECi3x/1b/Oh33p3AOa gaSkGPcsvts1Hki6gL0lLqL9UpIeU5MekEXFUE3ZKuNaK0ufwV4QE07xBN9Mv2nShDHn yMTyV0dAkxKp2rw+E5yYLu+RolXiOCX1+CoIelzHzVXrh3+rwtTZAmleqCawSYDka6/k hKA8YePvON+5DsgPYr33fBPP2ssOYdNm26tRht8pJnSCZ/jg4/GynwMwky7tkJJ3/UVc LQ8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=epwK90jy; 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 d12-20020a65620c000000b0041db5a647a9si13230330pgv.744.2022.09.06.08.46.20; Tue, 06 Sep 2022 08:46:31 -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=20210112 header.b=epwK90jy; 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 S231846AbiIFPa7 (ORCPT + 99 others); Tue, 6 Sep 2022 11:30:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233466AbiIFPag (ORCPT ); Tue, 6 Sep 2022 11:30:36 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 703B89C205 for ; Tue, 6 Sep 2022 07:41:41 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id j6so8262873qkl.10 for ; Tue, 06 Sep 2022 07:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=UJM5srF8hEIXQkbrFMWMpqfmvKyMTxPhXcroonaQ7aQ=; b=epwK90jy61HZNipHj8B/Tf8YmC7Qsc3IQVW+IlHHrLXfo8k5D7ZxivfiRbzUQLHUUd wLtaPMkqKiEE/Dbedbqv8XPxEnrBV/w/G5Xd1/wVjJba6ZfKbKacxZe1uFkYLfZHY8gc 5Cg1Oyp96V5d94RRdwEqDgBG5iiWJH2JpMVSo6r0F39OFCHdfBzUI7clZPLo7QFHFbPU PSTQiTW4VEfeLMb2IknBj9pjs9T6/edDMMoMjMfxxQ8x0merJzV9oqMLzj7gpki1hd2O kurkxImGxOykfUkGrFXkFkwxqp+OiDexOmKn/p58f9mZmq0T/e+8+5j4bqEUp0dRA4R9 JoXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=UJM5srF8hEIXQkbrFMWMpqfmvKyMTxPhXcroonaQ7aQ=; b=Ggr5aDU3OiBHt93dB50smqIN3gdSMMP3XdIVfZMR7zlnivjb4zkMlT84DnFqWulyiC mvwhA4hH6NU6L75ddTSNraA//pHoyLnzPGCv8quzSPDVhrPLki93VQPAdRAkilrx/Mds aa97ihDxno5DLmeBhsTIMU3D1Kg01esXgmy3WclMh3j3w0ewhMOtDLupQjoI3NiyvEPe ZKWnMU3YpJGOFYqnctejT5rlhEk4oO4/2GL4o/GbghuLlannHLnOokEXHLwGFwlOyHW0 VUZfqnrUU4mIUyH2PvqdBgWZEZ14lktHT9q3NJKkJiTtsgJqvEEvZd16SdlQQfOs/xx6 KvIQ== X-Gm-Message-State: ACgBeo0W/dscdWvunLv5pK1NhCCUNHlWwAI7+hzjklcRlHbxAfAIhqwH Zv6AOuWH1oghDULUsvnFwZMfxeGdawuAu2FQIwM= X-Received: by 2002:a05:620a:254f:b0:6bc:5763:de4b with SMTP id s15-20020a05620a254f00b006bc5763de4bmr34905718qko.207.1662475208646; Tue, 06 Sep 2022 07:40:08 -0700 (PDT) MIME-Version: 1.0 References: <0000000000004387dc05e5888ae5@google.com> In-Reply-To: From: Andrey Konovalov Date: Tue, 6 Sep 2022 16:39:57 +0200 Message-ID: Subject: Re: [syzbot] KASAN: invalid-access Read in copy_page To: Catalin Marinas Cc: Dmitry Vyukov , Linux ARM , LKML , syzkaller-bugs , tongtiangen@huawei.com, Vincenzo Frascino , Kefeng Wang , Will Deacon , syzbot , Evgenii Stepanov , Peter Collingbourne Content-Type: text/plain; charset="UTF-8" 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,T_SCC_BODY_TEXT_LINE 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 Tue, Sep 6, 2022 at 4:29 PM Catalin Marinas wrote: > > > > Does it take long to reproduce this kasan warning? > > > > syzbot finds several such cases every day (200 crashes for the past 35 days): > > https://syzkaller.appspot.com/bug?extid=c2c79c6d6eddc5262b77 > > So once it reaches the tested tree, we should have an answer within a day. To be specific, this syzkaller instance fuzzes the mainline, so the patch with the WARN_ON needs to end up there. If this is unacceptable, perhaps, we could switch the MTE syzkaller instance to the arm64 testing tree. > That's good to know. BTW, does syzkaller write tags in mmap'ed pages or > only issues random syscalls? syzkaller doesn't write tags. Or, at least, shouldn't. Theoretically it could come up with same way to generate instructions that write tags, but this is unlikely. > I'm trying to figure out whether tag 0xf2 > was written by the kernel without updating the corresponding > page_kasan_tag() or it was syzkaller recolouring the page. Just in case, I want to point out that the kasantag == 0xa from the page flags matches the pointer tag 0xf5 in the report. The tag value is stored bitwise-inverted in the page flags. Not that this matters in this case though.