From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3F581108 for ; Sat, 3 Sep 2022 05:17:28 +0000 (UTC) Received: by mail-pl1-f169.google.com with SMTP id f24so3768323plr.1 for ; Fri, 02 Sep 2022 22:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=UoOKaDK2nS3AZIYDtNGH/RyN8NdgueaNUM8dFk57hT0=; b=K0CZJOEzy7vYbA5Yucyikhh4g5ui71445ZrxyBYzmjXLV8CtIVhZks7hR9QO4qWuST odWoaAsxgAvqy0GEWNKwhFvpEyn1az2iGvSW6ThmtspBIu9iNA53BQr3xv78s/7j+I6q fyYIEcDOURf+xHNMsuu+mXyNl+v2pyCaaoLq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=UoOKaDK2nS3AZIYDtNGH/RyN8NdgueaNUM8dFk57hT0=; b=Rktd+R4WIJzDUOBHvzGfnFJjGTaiQulf0ynyudnIV8GSjSxbwWnnAc5a37zZYUuD2g 5XUl8sB5brZcs2Xuv0Vxjq0c2xY0HgsaZbR2CY1NmgA5SUUnSJzQDdO4hdeDPnJ6e5IS y/B1Fjtbmf4vgQbdl3pIjeEshCCQQztK1LJrSdniWMmRq9KSSm8X0DE1C0PRdAnM7adm iBKNLYJ6AAxjouOK/OkaJbfwpUr0gwvZLKd9ZoXjF9pWlbnR+F7Iq8l7TZciuRz2VWDv 7ajtuwPL2ij7mi3bYdLBcT7QVi5QlkPhdj66lIPOPzSedtcKyXaij9J3ClNejwWQjsry HKDw== X-Gm-Message-State: ACgBeo0ubAfqEG2sRepAI4wxmdhS77oaUN7c6T/Pdn6cwFaww+NB0vx+ YdULQuJDdqVA+qUihpm+UwiR+w== X-Google-Smtp-Source: AA6agR6CCouVq+A/WFSKpb9zc6xD/C8MabDfeRf1OmrkfU1dlIUK4F/7i892w96Vp+7QqaJ6Gh+WBQ== X-Received: by 2002:a17:90b:4acc:b0:1f5:7f05:12e8 with SMTP id mh12-20020a17090b4acc00b001f57f0512e8mr8193494pjb.92.1662182248375; Fri, 02 Sep 2022 22:17:28 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y2-20020a170902ed4200b00172c298ba42sm2583448plb.28.2022.09.02.22.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 22:17:27 -0700 (PDT) Date: Fri, 2 Sep 2022 22:17:26 -0700 From: Kees Cook To: David Gow Cc: Jeff Dike , Richard Weinberger , Nick Desaulniers , Nathan Chancellor , Tom Rix , Andrew Morton , Vlastimil Babka , "Steven Rostedt (Google)" , Yury Norov , Masami Hiramatsu , Sander Vanheule , linux-hardening@vger.kernel.org, llvm@lists.linux.dev, Peter Zijlstra , Josh Poimboeuf , Dan Williams , Isabella Basso , Eric Dumazet , Rasmus Villemoes , Eric Biggers , Hannes Reinecke , Linux Kernel Mailing List Subject: Re: [PATCH v2 2/3] fortify: Add KUnit test for FORTIFY_SOURCE internals Message-ID: <202209022215.FA016FA6@keescook> References: <20220902204351.2521805-1-keescook@chromium.org> <20220902204351.2521805-3-keescook@chromium.org> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sat, Sep 03, 2022 at 10:59:24AM +0800, David Gow wrote: > On Sat, Sep 3, 2022 at 4:43 AM Kees Cook wrote: > > > > Add lib/fortify_kunit.c KUnit test for checking the expected behavioral > > characteristics of FORTIFY_SOURCE internals. > > [...] > > Overall, this looks good. It's a bit of a shame FORTIFY_SOURCE doesn't > work under UML, but I tested it on everything else I had to hand and > it looked good. It looks like this was never picked up: https://lore.kernel.org/lkml/20220210003224.773957-1-keescook@chromium.org/ I suppose I could take it via the kernel hardening tree? > One tiny typo in a comment below, but otherwise this is: > > Reviewed-by: David Gow > > [...] > > +/* > > + * Runtime test cases for CONFIG_FORTIFY_SOURCE that aren't expected to > > + * Oops th kernel on success. (For those, see drivers/misc/lkdtm/fortify.c) > > Nit: Oops _the_ kernel Thanks! I'll get that updated. :) -- Kees Cook