Received: by 2002:a6b:8b52:0:0:0:0:0 with SMTP id n79csp29337iod; Mon, 2 May 2022 11:18:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVSmLcnw4K8mqjdHCc19OVKcZseSqGNl/hZyxwfpMH6gYg2WaZ/FhcL3CVGftDtjg1inQh X-Received: by 2002:a05:6512:3305:b0:471:fbfa:5e5 with SMTP id k5-20020a056512330500b00471fbfa05e5mr9422885lfe.221.1651515507885; Mon, 02 May 2022 11:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651515507; cv=none; d=google.com; s=arc-20160816; b=xiNkHg/bVfug/lHlr41Wj5kPd6TSgGz6DOOP31vi1j4l4pSkY186SYhRDTPpT1CDVV zGupQihSeRCgMypBLzhTYSIzsIwC1eYhjB2+yyP5iP6Ri/yinvGtdYbcbpxwkpmfMVJu wkZIVQx4B2POaxkNklvdlWA+v7+PbS/bDPtGfJb+8J0/7DxY8E4OFMtkKQvE/hpzUqdT vgAHBUZCfOSupkPCAaEMfY2ilItUg5ewAPEk8Gyxd270pgP+AYkHw6DeNMOAQwkUY2Aw IyeNKMUDpxsCAZ/WyYHq4PEoU6xep9w2Tln4z0VPF3IYzWNk0sA3CAgVkWevdMEjMw5K cZ7Q== 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=Zmt/HybSZxPjdQpw7T2VvzfrhcZdhwr2P1u1idPPwIg=; b=Tg+k0hI9G0EWp0ndjQA8VF5EXHJbIiE05MhgwY+xkGogAuTQ0qBwQsXN2xa6d+Wh8E /+9iaA8Zypbp+1cX7/+x6I9uacdfDKpEjii/SXOoCaBcwMNGbOHFg+dAX4t52jdhopp3 AUGpCGlBg8jfTXnimXsbekAX7O2/fuH8p8OwaYy1Aiy/yaVdRO2eg76HqGLDctJAEmq8 iKnWbfPhu/aLwoyO5XXf8hwVy/G2F1M2m0u1orVLFqO1EkU3KRtjtI/groXEEkgf5iNN iaoEnE5ou4Lb+FFiAuLNXAZG8+m/JDblgFMRGZaMTYMevr7k6C+7SHOn7m8Q7m8ZGimQ R5vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Z/o1bp8J"; 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 h24-20020a0565123c9800b0047262ac9696si3277473lfv.306.2022.05.02.11.17.58; Mon, 02 May 2022 11:18:27 -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="Z/o1bp8J"; 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 S1349177AbiD1Pbm (ORCPT + 99 others); Thu, 28 Apr 2022 11:31:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349182AbiD1Pbk (ORCPT ); Thu, 28 Apr 2022 11:31:40 -0400 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6F81B6D1A for ; Thu, 28 Apr 2022 08:28:23 -0700 (PDT) Received: by mail-il1-x12a.google.com with SMTP id b5so2208944ile.0 for ; Thu, 28 Apr 2022 08:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Zmt/HybSZxPjdQpw7T2VvzfrhcZdhwr2P1u1idPPwIg=; b=Z/o1bp8J2CxNyPkfD0bNdMwfrKTJnVGI67o0Z9ewpEphoFQw+7EW3TivV3VyVy4Oz8 togmpB1Regk1FPiIV7+JowaLfnnyq5N3jIgRpAFVsiseEdDeiDDeQWHvHBC1azbgk5ns sQ/eaHxlG2HmON9b56GZlmSxShfbaTCLqtfNB7lDF3Vyt9rGnZT9id5KB/h4II7lIRD/ 9ykEfNFVLpneu98OCUZAaj1cuqnl5/gkAPveztMGbCU9dvZ12T5hQ4bGiF8gdE9d9Pfx BJvcYyFGAPGNLBpbgYc9hxc0aOqSD86ZammNwSrpvuOLGPaSu9McS1USYxOTC0fOLFII gG/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Zmt/HybSZxPjdQpw7T2VvzfrhcZdhwr2P1u1idPPwIg=; b=cYM3SAqhXIw3wvKoTAazNCQ3nDgx2IF3yT+fSuzAMIzMPifSMAeYps206F1ExVVw51 1Ig/T2uEPz2dtPRywzSdoYKHuEu2GSz/biUtQJIoRtKbToGOe1/1d3xmosyvgrmBaUeQ 64gt7AQtsLtM5TYK37CczyxGmpKlHKn4C0oP/F5XpQ/ddKuskVFiPi+918kPgcj+9c5Z cwV+PCfmdeZ157oOuq7QuTdpG4Zwm9dfgT1mK4XcVTkspVTnKFZWc8PcYlqqcZY5GbYK p1gebdGi3MIuVJz170mhqQkyGzY2b7M9rQLxO7Wmh7sY20Me3fYoDIzHOkd56tz6zdyu KkJQ== X-Gm-Message-State: AOAM532i4zwZEUREEaioRFZHH/2/d7+4b6Vam9EMwG6FEbB0vYYtCCI3 WwbGtNz8b4jIIhK1+MdcjZxw2Wn0E3c0F4ljTlE= X-Received: by 2002:a05:6e02:1c24:b0:2cd:96ad:8b8a with SMTP id m4-20020a056e021c2400b002cd96ad8b8amr8162420ilh.235.1651159703117; Thu, 28 Apr 2022 08:28:23 -0700 (PDT) MIME-Version: 1.0 References: <20220428141356.GB71@qian> In-Reply-To: <20220428141356.GB71@qian> From: Andrey Konovalov Date: Thu, 28 Apr 2022 17:28:12 +0200 Message-ID: Subject: Re: [PATCH v6 00/39] kasan, vmalloc, arm64: add vmalloc tagging support for SW/HW_TAGS To: Qian Cai Cc: andrey.konovalov@linux.dev, Andrew Morton , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev , Linux Memory Management List , Vincenzo Frascino , Catalin Marinas , Will Deacon , Mark Rutland , Linux ARM , Peter Collingbourne , Evgenii Stepanov , LKML , Andrey Konovalov 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 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 Thu, Apr 28, 2022 at 4:14 PM Qian Cai wrote: > > > SW_TAGS vmalloc tagging support is straightforward. It reuses all of > > the generic KASAN machinery, but uses shadow memory to store tags > > instead of magic values. Naturally, vmalloc tagging requires adding > > a few kasan_reset_tag() annotations to the vmalloc code. > > I could use some help here. Ever since this series, our system starts to > trigger bad page state bugs from time to time. Any thoughts? > > BUG: Bad page state in process systemd-udevd pfn:83ffffcd > page:fffffc20fdfff340 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x83ffffcd > flags: 0xbfffc0000001000(reserved|node=0|zone=2|lastcpupid=0xffff) > raw: 0bfffc0000001000 fffffc20fdfff348 fffffc20fdfff348 0000000000000000 > raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 > page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set > page_owner info is not present (never set?) Hi Qian, No ideas so far. Looks like the page has reserved tag set when it's being freed. Does this crash only happen with the SW_TAGS mode? Does this crash only happen when loading modules? Does your system have any hot-plugged memory? Thanks!