Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp890186rwe; Wed, 31 Aug 2022 12:58:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR41VyKU2yz6rSyb0C9STQ1W4f/j0jDh3mVHQ+DefIDU/XFbu/WTMxTmkuWrMQh/QKGOIYfP X-Received: by 2002:a05:6402:b71:b0:448:7785:c918 with SMTP id cb17-20020a0564020b7100b004487785c918mr13180379edb.216.1661975914573; Wed, 31 Aug 2022 12:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661975914; cv=none; d=google.com; s=arc-20160816; b=fZ2a3WEnkL7k+VQP7OvfGXhK3fGIms/rG9EuWVqgxjI+UcktPyEuclwsowH5XjUuws Igf8hR5uJ/PvNP2cL98nVE7NF2XYDWCeKDX2tGCKV7rhUS9cF+V10dfo3AdzYzpH2eAt boXNZtHobBSmJLsyLAqRpQdTCbcQ1LXFpZX8TUZzH1bYvkgxfso9dBDitZ3mJhFvkzZb /8dS3TE3+39SIuiKTgQ5NUxHpb9WrBzDs5yvw/0lANJ2+6wYztBznxraJQKDe9em1KuW OOvxGto/M3I+Ih5J568TebKoPogiafrMo+TGjGiz4xsf9o+J2vRCSmnmR/4ddsVUGFnG z21w== 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=0guvX6CdC6+lkNNlrZup+CjHGuoRwmgwPktN8aSa5Dg=; b=008RHWwZWtIPNCcnb4HezQ31SrHrW+TyTIVcCaPFGf5gFSq4gXiRA7iBhPFrpj4ae5 CiqVKvO0joUUR7oj7DQMo29uNhWMhVJZKQsskn/DHATXxjrJ13EJO/9tte2DFOegwSgo UQyyyHodpUaXJu+LoGx7oaE/gsfC3iGFRcZRNTEzqT7z5dw1uXwre5X6CcVQD7i1r7AE vkAvWv5hQtVvo3LIHTR6FWZBnUqHHyEfC6qam8GDBFRV5p9og/I78hxJYdoiPLErM4TQ Z3HtDP30Win0JB+8/qxFzKYhpK4k5BgVDB4gtuUFUQIxXHFawB0NWRbqqF/Aads6hWd3 SMgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=cW7QRE50; 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 d5-20020a1709061f4500b0073097bd94ebsi10258408ejk.473.2022.08.31.12.58.09; Wed, 31 Aug 2022 12:58:34 -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=cW7QRE50; 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 S232967AbiHaTCH (ORCPT + 99 others); Wed, 31 Aug 2022 15:02:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233203AbiHaTBl (ORCPT ); Wed, 31 Aug 2022 15:01:41 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A83FB7773 for ; Wed, 31 Aug 2022 12:01:29 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id u9so30288046ejy.5 for ; Wed, 31 Aug 2022 12:01:28 -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; bh=0guvX6CdC6+lkNNlrZup+CjHGuoRwmgwPktN8aSa5Dg=; b=cW7QRE50uRd1u3+fTEsX8n3iPW03Ajb4IjDv4d12ILcNWH6K4Wl3TLUWfUjqQQjukT inHeaIkzIB8xjOmMh/4xBOXxYmse3IBrP0LiIZc0bAzKqYA4XxgYeXhiE1/yPLcBIMs7 Jij2tNtEBtAdZ2xMJl/rG3GghtwopHPetwqPxsl6YqudSKBAyf24ZAK6LBpfUyoyuPEO iHkERF6Np6lC7bcqR7kL8CkHgsMffRThNmsJ7mNxIOD+Fw/uoWGJ/YhZlVt4ECZPGOAZ iwtRzjFHNEd7PUILk6YglflgGfBIZ2tuA3IKYNKil4ZNrXTzAjZu9HPqqg+J75c7sjKh 8dwg== 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; bh=0guvX6CdC6+lkNNlrZup+CjHGuoRwmgwPktN8aSa5Dg=; b=x2pin4JGG1o81LCh5g+kQdWpStPzAbosMlXx9SXhVhqD60K2EM8N+Yy3DSj9eAcU2E fMBTS1vn2PCcPjdIAvy1Mo8AhfKkGwjYl+D2JNgw7s71WWGJ/UEwM9VeWNEKPRIdcwn0 5SdNcmdA5oB19x8KKiRv4ev+EXt4NNe/Ec9Zx5dx2PqsVYuRxM0oL2RB3c4SlD2xY5QC 33c3LcodrGghQMXcvzcOompCZsJYnJMv2JKd9Ek1ZGY+7IFlYA/+8Mf4r/4xlKL2WiQK lvZGqCCPQIpBQe+tYnjhHnxKDjyfyJChaFAtjLgOjCec4yl+rtKUqSvxv5iWzrARLBCr 5z/Q== X-Gm-Message-State: ACgBeo1NraF8A+11UayS/1X/Y/AmufVpWPA1ucxrlCtg6cbfHAXNo9rp XgBFU9jcwO7nGhX49GJHrzMnrzVAWeQP6BwCdNzEMg== X-Received: by 2002:a17:907:2724:b0:741:4a1f:6159 with SMTP id d4-20020a170907272400b007414a1f6159mr14075478ejl.542.1661972487230; Wed, 31 Aug 2022 12:01:27 -0700 (PDT) MIME-Version: 1.0 References: <20220831181140.842093-1-keescook@chromium.org> In-Reply-To: <20220831181140.842093-1-keescook@chromium.org> From: Daniel Latypov Date: Wed, 31 Aug 2022 12:01:16 -0700 Message-ID: Subject: Re: [PATCH] overflow: Split up kunit tests for smaller stack frames To: Kees Cook Cc: Rasmus Villemoes , Vitor Massaru Iha , "Gustavo A. R. Silva" , Nick Desaulniers , kernel test robot , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org 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=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 Wed, Aug 31, 2022 at 11:11 AM Kees Cook wrote: > > Under some pathological 32-bit configs, the shift overflow KUnit tests > create huge stack frames. Split up the function to avoid this, > separating by rough shift overflow cases. > > Cc: Rasmus Villemoes > Cc: Daniel Latypov > Cc: Vitor Massaru Iha > Cc: "Gustavo A. R. Silva" > Cc: Nick Desaulniers > Reported-by: kernel test robot > Link: https://lore.kernel.org/lkml/202208301850.iuv9VwA8-lkp@intel.com > Signed-off-by: Kees Cook Acked-by: Daniel Latypov It's sad that we're forced to do this to eliminate such warnings, but I like this organization a bit better, actually. I wasn't able to reproduce the stack size warnings in the past, so I haven't tried to do so here and can't give Tested-by/Reviewed-by. But I did run the tests and they all still worked for me.