Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1697434rwn; Fri, 9 Sep 2022 02:37:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR6rnnueuUw87J8xjd5aLQFlhzDERDJOBZhyQiSPJ67PiJbETpkPRPfIMLjI7IW1CdI65fkN X-Received: by 2002:ac2:5208:0:b0:497:aadf:eac7 with SMTP id a8-20020ac25208000000b00497aadfeac7mr3718757lfl.315.1662716276762; Fri, 09 Sep 2022 02:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662716276; cv=none; d=google.com; s=arc-20160816; b=fGoIX2PR0sfIKiT6bOq6sb22t+hYKVkV46P/tBWNAaRiYeFqmkfhe/t428S0EjwzaU IAHed6HrG9betvauSKH/lmCq2AfG4tA8tL1tyfyx2P04GFAkvMUc+FrxhlaMnY1mz7S3 sJ7a0yeWIvU9vslVqo6Qr7l/NChabMxdhfQf8KSEyW9YDRNBI8lAUVX1DTm1fUpT7xva h1Hi1xjxIw/LF0s5YFic85FCft3iQ9JPs/5Q4Z7PYAOUCVq+sOJDe1Ssaaes+m8n/7CO icEoo3mHckcujOfXb7YLSmDCIxl0v6NZNrVA6o31m9uVR7D74Rr893WIaWkHHJPTaAjY sTBg== 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=BA7v9By/PKm8Lb5EGh75hqx3B2NthlRyqEiydr+9MIw=; b=ejju2GM5rR399MnG8fT8CSyujBOeJiBl4QkWD3UKvm/g6wpvXlbS3gr79/jcWYQLP4 CydfVwhk8jGXxhyREtP412gwttLAKlHchj+87fnMD6YadEfk4SVHMIp3R4AkElhzFFOP DNBEqd+hP+UCoiktqf7rwcHehzOBVefmjbGNV0uoeZN9HEXK4mfK85QxFc9qWVOqNP93 mmSOKC2jfysfhtosdNGXAFKGK3KN9PhVU6capZ4UDC4FGwc8Tiy+I+ywg4UUCmWk9u64 j2dO/igDfs0Alt9xW+Be9K4XausajIkvKPR0Ept9Y95/BXG6IjOGD2+rBr/V5Nq+pAgM ZebQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=goGwbFEz; 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 b23-20020ac24117000000b004961d5297a1si34364lfi.117.2022.09.09.02.37.26; Fri, 09 Sep 2022 02:37:56 -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=20210112 header.b=goGwbFEz; 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 S230094AbiIII7E (ORCPT + 99 others); Fri, 9 Sep 2022 04:59:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231206AbiIII6Z (ORCPT ); Fri, 9 Sep 2022 04:58:25 -0400 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C330E1365DA for ; Fri, 9 Sep 2022 01:57:46 -0700 (PDT) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-324ec5a9e97so11456557b3.7 for ; Fri, 09 Sep 2022 01:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=BA7v9By/PKm8Lb5EGh75hqx3B2NthlRyqEiydr+9MIw=; b=goGwbFEzBCu6ZReNVsQFXEaSFbARIBvytLuNW4v5IzfqaOxEddum2eMnFGd4n1giOm 12yr+tkvZlEG8nCUA88s5hp100Jh85VNfSeMZi+Aq6wwHb9IOv/FFX1jCussxyGiaJ5U Nxmc1qPjqj8jpEfcvVPhcAgsqpQiA8h9e32psMV1REa/fw4xpH7NmtwCwq0Y3Dt9YILC 176tLQDsChJoJCd8+GYPQmm5OjJtrlmbnNDXKD8AX6dyKzZgJPWyMxrYwLc7vOjaOYBI O9WJIH6/NkpPX9UbGKPOwAa8jlb13aKJ3GYGRyRTRCnNMOKLHvbAfbfKvl8FcfN+moBm H51Q== 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=BA7v9By/PKm8Lb5EGh75hqx3B2NthlRyqEiydr+9MIw=; b=aLDDthgbfbh6O1rwT41LzWI8iFuCyShxP8tLmcXBTxn2VP0m0Rcu1RwgllquB4IDq+ RMT7lDyXTxPZPuzSZ8rIhiP4bfiPciiG/emm5cVTaKI/WdsmffrlbbranFSjto42YVmt UfZT/B9zq8MzWHOTb4metp95NVQwvcRQIc2bG9YktWw+SeiQcbVqkBTD/rncH9G99yo9 hrF+n0KF5sRHpwi8bwOry/D1dBf6RpN1BVfec1xFr6FdRvSrfy41kwEYcAJfcr1pU5ZT KFBnpK80yoXmqgq3Ibl9uC2DP9hH+gIggB0NwNtu5zIq1BpbuYZgF0zpHY8lAXTlsUw2 ma9w== X-Gm-Message-State: ACgBeo0DhkirqFf3K5zjIwS2blg3VM7aTfGfWZoUJ+NpgWaKpC86PmV5 lPio1HSRRMWHeG9k9ysOykwQ7Dp+QXJ4ne44s3tBeg== X-Received: by 2002:a0d:c7c3:0:b0:31e:9622:c4f6 with SMTP id j186-20020a0dc7c3000000b0031e9622c4f6mr10866606ywd.144.1662713865771; Fri, 09 Sep 2022 01:57:45 -0700 (PDT) MIME-Version: 1.0 References: <20220905122452.2258262-1-glider@google.com> <20220905122452.2258262-41-glider@google.com> In-Reply-To: <20220905122452.2258262-41-glider@google.com> From: Alexander Potapenko Date: Fri, 9 Sep 2022 10:57:09 +0200 Message-ID: Subject: Re: [PATCH v6 40/44] x86: kmsan: don't instrument stack walking functions To: Andrew Morton , Stephen Rothwell Cc: Alexander Viro , Alexei Starovoitov , Andrey Konovalov , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Christoph Hellwig , Christoph Lameter , David Rientjes , Dmitry Vyukov , Eric Dumazet , Greg Kroah-Hartman , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jens Axboe , Joonsoo Kim , Kees Cook , Marco Elver , Mark Rutland , Matthew Wilcox , "Michael S. Tsirkin" , Pekka Enberg , Peter Zijlstra , Petr Mladek , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Vlastimil Babka , kasan-dev , Linux Memory Management List , Linux-Arch , LKML Content-Type: text/plain; charset="UTF-8" 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, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 Mon, Sep 5, 2022 at 2:26 PM Alexander Potapenko wrote: > > Upon function exit, KMSAN marks local variables as uninitialized. > Further function calls may result in the compiler creating the stack > frame where these local variables resided. This results in frame > pointers being marked as uninitialized data, which is normally correct, > because they are not stack-allocated. > > However stack unwinding functions are supposed to read and dereference > the frame pointers, in which case KMSAN might be reporting uses of > uninitialized values. > > To work around that, we mark update_stack_state(), unwind_next_frame() > and show_trace_log_lvl() with __no_kmsan_checks, preventing all KMSAN > reports inside those functions and making them return initialized > values. > > Signed-off-by: Alexander Potapenko Hi Andrew, Stephen, I've noticed this particular patch is missing in -mm (and, as a result, in linux-next), which results in tons of false positives at boot time. Could you please add it as well?