Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4014360rdg; Wed, 18 Oct 2023 12:13:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiOzoK7xSCPeuA3+E1g96xuNbr9UCl99XlkU6rCnyptWZ/hCEPUqcTUQv+X5uik1q2eZA7 X-Received: by 2002:a9d:7445:0:b0:6c4:ae52:9596 with SMTP id p5-20020a9d7445000000b006c4ae529596mr187714otk.18.1697656382988; Wed, 18 Oct 2023 12:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697656382; cv=none; d=google.com; s=arc-20160816; b=xfOaELrpYJ2Kk/loYyGveR+3D9IeaKT95lTvETnQ0U6l4GDlsQNqs/y30laKk8dICP hBwKB4Vkta77eGvm+3uFFECOQKcBXqA810haqHpL5K6rrWhE7oYD9+M5XEH5o8sv/BsQ inPw0gdSZJkhi/YDAYEXiULdtvhPb/kNHU27MfjabAl3xsA7U5dqc7NNe4KFgnGdBAJ/ N7/7vQXTAYOHIiSWvtOeeyNpZnInpX0uXML4Co/Xvu35ptoPnNGQ4p6O5VTKbTNqimk3 8WrLJkPVtFYtvZgTcpLafJqdozT1Dr0L1lLEOGYWSfJ2V2ZUaWuHYoZ8ic5u9NImEqqq gg9Q== 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; bh=+EtHVhQeRBovdm2UVqVNRNzdQv3NlpgKyJnS9Vmh0gI=; fh=wbLruE4i3EU/Yb5+9h40yaEB7IBp8n/LRkqGO1A13HY=; b=kQTMhwOiWs0xtPkEz3OMa7W5jMeAUCEzC0kZbDXha7XbtvOsLffVaiRi7+HOEDMqzj olhh5J+H/TgOvC6Sf6QjdgCHsHGp+RaE0NIPw+2j7fV3M5XCa/OeYdePE1icCavVvQit ZDqd750+0g/FMAUeuEu9OtBBt2walYbhXdQAb67VCldRdzSua8wNqZOpNDHuB2LOtqBp NYW1NMnGj68544ZRYbooV+zMPXFrWCeE23Lf8cwpktfOxGnggQGmitT8QzB7+1DdgOgF n1XqwR+40x4CUwSvOwF+Ye7GKsxFSL6FidpCkijIRRohW1TD3Gp1AnCVRLolM3O4weOt G+pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id o3-20020a056a0015c300b006b618af5cd5si4963817pfu.300.2023.10.18.12.13.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 12:13:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BFE8081143F2; Wed, 18 Oct 2023 12:12:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230421AbjJRTMp convert rfc822-to-8bit (ORCPT + 99 others); Wed, 18 Oct 2023 15:12:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjJRTMo (ORCPT ); Wed, 18 Oct 2023 15:12:44 -0400 Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B72C109; Wed, 18 Oct 2023 12:12:42 -0700 (PDT) Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-d9ac43d3b71so7809959276.0; Wed, 18 Oct 2023 12:12:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697656361; x=1698261161; 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=Bm/QitVoXGxf3ERCz3VJAvR9l7hSVdW0OvjmYyP6n1s=; b=D3+z/My+TkaEJ83wkraPBqL4quLG4CY8GUcezwYaQfS0CYJnh9g/WB7c9o0lVRh0HE HgbhmQBu6G9fW8HUu/FO8fWM3eUA4cBwduiNXqoVYAz/qSv79q9+DKLMJkjy9r+Re0wf 6zmWSflv6THq+y/ewY7lTc9gvVR3PZIJV7LXb8N6kr+hHIlu70ZW0ZHwD6AxaBG5z8au erKVbDWzIJw5OV079YWkajwsheUsau2b59cyR1nJHELa7tKhy4Ydw53p7+thc8fwgf0p cDtLAAhAv7o3+G485MDQZtBQI4fNk1c8FQKDeSwCVpBi8zQLQG5Iuz7u+CTvQwH/BOnf N8pQ== X-Gm-Message-State: AOJu0YyN3y6aW+CzJGnxFXLtl7iNUSnYf9Icb21iA6TpDO5ecoQgj/bd SSgA+j3T/LjSuxX7MeeExiP8vB0wankJzA== X-Received: by 2002:a25:50c7:0:b0:d9a:e337:b6a with SMTP id e190-20020a2550c7000000b00d9ae3370b6amr259861ybb.61.1697656361368; Wed, 18 Oct 2023 12:12:41 -0700 (PDT) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id l12-20020a25bccc000000b00d749a394c87sm1487247ybm.16.2023.10.18.12.12.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Oct 2023 12:12:41 -0700 (PDT) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-d84f18e908aso8157338276.1; Wed, 18 Oct 2023 12:12:40 -0700 (PDT) X-Received: by 2002:a25:d7c7:0:b0:d80:1604:f6e9 with SMTP id o190-20020a25d7c7000000b00d801604f6e9mr285943ybg.44.1697656360583; Wed, 18 Oct 2023 12:12:40 -0700 (PDT) MIME-Version: 1.0 References: <20231018182412.80291-1-hamza.mahfooz@amd.com> In-Reply-To: From: Geert Uytterhoeven Date: Wed, 18 Oct 2023 21:12:29 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] lib/Kconfig.debug: disable FRAME_WARN for kasan and kcsan To: Hamza Mahfooz Cc: linux-kernel@vger.kernel.org, Rodrigo Siqueira , Harry Wentland , Alex Deucher , Arnd Bergmann , stable@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Nick Terrell , Nathan Chancellor , Nick Desaulniers , Tom Rix , Andrew Morton , "Masami Hiramatsu (Google)" , Randy Dunlap , Kees Cook , Zhaoyang Huang , Li Hua , Alexander Potapenko , Rae Moar , rust-for-linux@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 18 Oct 2023 12:12:56 -0700 (PDT) Hi Hamza, On Wed, Oct 18, 2023 at 8:39 PM Hamza Mahfooz wrote: > On 10/18/23 14:29, Geert Uytterhoeven wrote: > > On Wed, Oct 18, 2023 at 8:24 PM Hamza Mahfooz wrote: > >> With every release of LLVM, both of these sanitizers eat up more and > >> more of the stack. So, set FRAME_WARN to 0 if either of them is enabled > >> for a given build. > >> > >> Cc: stable@vger.kernel.org > >> Signed-off-by: Hamza Mahfooz > > > > Thanks for your patch! > > > >> --- a/lib/Kconfig.debug > >> +++ b/lib/Kconfig.debug > >> @@ -429,11 +429,10 @@ endif # DEBUG_INFO > >> config FRAME_WARN > >> int "Warn for stack frames larger than" > >> range 0 8192 > >> - default 0 if KMSAN > >> + default 0 if KASAN || KCSAN || KMSAN > > > > Are kernels with KASAN || KCSAN || KMSAN enabled supposed to be bootable? > > They are all intended to be used for runtime debugging, so I'd imagine so. Then I strongly suggest putting a nonzero value here. As you write that "with every release of LLVM, both of these sanitizers eat up more and more of the stack", don't you want to have at least some canary to detect when "more and more" is guaranteed to run into problems? > > Stack overflows do cause crashes. > > It is worth noting that FRAME_WARN has been disabled for KMSAN for quite > a while and as far as I can tell no one has complained. ROTFL... > >> default 2048 if GCC_PLUGIN_LATENT_ENTROPY > >> default 2048 if PARISC > >> default 1536 if (!64BIT && XTENSA) > >> - default 1280 if KASAN && !64BIT > >> default 1024 if !64BIT > >> default 2048 if 64BIT > >> help Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds