Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp307108pxm; Fri, 25 Feb 2022 08:21:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzj7PuqUyTW9bHnsn1F4VnQuCaW5jjgvKHIC0wuUkKIOMiccIWlcbIeNHTWzMm1VQeiTxet X-Received: by 2002:a63:64a:0:b0:36c:6d40:5688 with SMTP id 71-20020a63064a000000b0036c6d405688mr6747444pgg.554.1645806074696; Fri, 25 Feb 2022 08:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645806074; cv=none; d=google.com; s=arc-20160816; b=iHZldc85ZO8ObzMMghPagD3Q/2EfMjSEnh89+i7ny8703maTOD+6cEO/JGHfKmjc9p M5EulZWis1hgEHkhjDHXyFTX+2n9iZzhWmE84yHBKeEEk2U2D7fcQ/HsrSjCFPsWQtDP 6I1NZN0mhuK5riLHd4Pe1DHtIpeedtSZ4FfgkgR8vpaunyIjOtVYy18dvV3K/cM4SeI1 1590Dz4mlQed2BglFkG8LGcqXp/bFNcYdFwr53E2R+4bk/rRwmrwDya2d9VQxN6vXSfz pX6i5witsQtiT31NwXa3JQ1GFCxfID8Zfd8q12UAQyWrvALdxr0+m3VSmInT+I9HLJzV Z90Q== 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=EdlAiChWlSjnHqMEl5+rYYw1D6uhL90FBdNameorEkY=; b=JRjt2bse930F3cHzyGnusFJCkWngkGEs/WKe38M44yycUivJe0LUNlNi8ExGN9DPxL NK1HWlgvPRn5VCazoTMmwCFKu83KXq6JRGoQAgqJtEtVNuB7i5wh4Qbg68YLOYDxCaqS 0mZMuSePX8c1EptrUkuYsafuqNtWMlyyPtq+2JrsrjjdrwDT9I5gotFEThqNsG/ZDkUd WlMFkKBjxVPsVPIV5FhAVz4rixc2eaphMNNffaCdCAkX1HpDyWX9mNrNzNRynCoAl+ap 3nclfilzJodAKJhktWq7yhe2gbg1wx6SqE2P8oS6wDOVKHdF3uI/01lns6LiZBcHKkfO 9VGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=m1l0dzVf; 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=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q75-20020a632a4e000000b0037843b0a6dasi1075049pgq.3.2022.02.25.08.20.58; Fri, 25 Feb 2022 08:21:14 -0800 (PST) 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=@canonical.com header.s=20210705 header.b=m1l0dzVf; 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=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233181AbiBYOFG (ORCPT + 99 others); Fri, 25 Feb 2022 09:05:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbiBYOFE (ORCPT ); Fri, 25 Feb 2022 09:05:04 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C61181AA069 for ; Fri, 25 Feb 2022 06:04:31 -0800 (PST) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4966F3FCAD for ; Fri, 25 Feb 2022 14:04:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645797870; bh=EdlAiChWlSjnHqMEl5+rYYw1D6uhL90FBdNameorEkY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=m1l0dzVf8w1Zu+gnZs/TAnoE1EpMKEsbLzsyJK8jptGTHc6BXyRnAK3BX8Y6qqA0M zWwVrfcaMZwOz50+cj056w97z3Bhiahn2+8LGSObf51pf8/V7gJ2FUmZvkNlk1XXDj 4x1pLEOLEPqVTBO3KlXNGya51fGV9DOFwskJk4eZwqv5nEpyxgcHYJSGawsQ2cQnyP jC1olzt8mgPouZ7a03X9qdWnebpLyZ9wvrOB47afKRpBKvxr/SId9+Ak33M5Y4as/6 rj4+Uv0w7RkEKM7fFOf1k0jyzK+xuAKHLPD+CMSdXov6Z+5pUmpHWRkHC5cPtiC1I8 WhFnEFzYcKSSw== Received: by mail-ej1-f69.google.com with SMTP id ga31-20020a1709070c1f00b006cec400422fso2687119ejc.22 for ; Fri, 25 Feb 2022 06:04:30 -0800 (PST) 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=EdlAiChWlSjnHqMEl5+rYYw1D6uhL90FBdNameorEkY=; b=OAgSlOwlXELaW/VdqffdrQj5N0je3eQREQf5Z5Mvh0gZe22erZ4uaE4+NwJoISuMJM 3+oc/7K6SdsIfsU5jDbHxpsqlmg01hpeOlkRQQpOHxvO8P3xrcUJeLhuwo38hGKHAzjq yeJ9ijCazHk0vRByw8UNVu7rdJBWz9rvgB8VEIdekrpFanSoVzK/YwgW0UEKAqgBBhfX 9SjsC3pmt1j/bxo5jramsuGPyzRGhcbe+7Y1243x+G8SK/ABbs9hxjNq7L537SFptzkC 0eUxf73YEfM7XD+gocxPwJJY6EXSQXBzuR7tUyruz3tPLM2WNtJW5tBLIHKYEOvU3DqY fZWw== X-Gm-Message-State: AOAM533WeypEfDr/ZJu2NPLqg8iao20Ck65RkDLlFehoNuw2uUiS54TD Ye4JNcsQPK47r65tQctrrTbERg6oeazXPxg76bNgKuE/kesfgYmLft5H5/EaxADAMb6ciJG9Khh 7d9Tbly6+2eP8uQ1kZnxrPKy5j/5Gtp7dB5QECZM1z9qlNlZGwS/++kpLHQ== X-Received: by 2002:a17:906:80c7:b0:6cf:9c76:1404 with SMTP id a7-20020a17090680c700b006cf9c761404mr6139740ejx.207.1645797869862; Fri, 25 Feb 2022 06:04:29 -0800 (PST) X-Received: by 2002:a17:906:80c7:b0:6cf:9c76:1404 with SMTP id a7-20020a17090680c700b006cf9c761404mr6139716ejx.207.1645797869620; Fri, 25 Feb 2022 06:04:29 -0800 (PST) MIME-Version: 1.0 References: <20220225123953.3251327-1-alexandre.ghiti@canonical.com> In-Reply-To: From: Alexandre Ghiti Date: Fri, 25 Feb 2022 15:04:18 +0100 Message-ID: Subject: Re: [PATCH -fixes v3 0/6] Fixes KASAN and other along the way To: Marco Elver Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Aleksandr Nogikh , Nick Hu , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Fri, Feb 25, 2022 at 2:06 PM Marco Elver wrote: > > On Fri, 25 Feb 2022 at 13:40, Alexandre Ghiti > wrote: > > > > As reported by Aleksandr, syzbot riscv is broken since commit > > 54c5639d8f50 ("riscv: Fix asan-stack clang build"). This commit actually > > breaks KASAN_INLINE which is not fixed in this series, that will come later > > when found. > > > > Nevertheless, this series fixes small things that made the syzbot > > configuration + KASAN_OUTLINE fail to boot. > > > > Note that even though the config at [1] boots fine with this series, I > > was not able to boot the small config at [2] which fails because > > kasan_poison receives a really weird address 0x4075706301000000 (maybe a > > kasan person could provide some hint about what happens below in > > do_ctors -> __asan_register_globals): > > asan_register_globals is responsible for poisoning redzones around > globals. As hinted by 'do_ctors', it calls constructors, and in this > case a compiler-generated constructor that calls > __asan_register_globals with metadata generated by the compiler. That > metadata contains information about global variables. Note, these > constructors are called on initial boot, but also every time a kernel > module (that has globals) is loaded. > > It may also be a toolchain issue, but it's hard to say. If you're > using GCC to test, try Clang (11 or later), and vice-versa. I tried 3 different gcc toolchains already, but that did not fix the issue. The only thing that worked was setting asan-globals=0 in scripts/Makefile.kasan, but ok, that's not a fix. I tried to bisect this issue but our kasan implementation has been broken quite a few times, so it failed. I keep digging! Thanks for the tips, Alex