From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAC65ECAAD2 for ; Thu, 1 Sep 2022 20:05:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234177AbiIAUFb (ORCPT ); Thu, 1 Sep 2022 16:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232420AbiIAUF2 (ORCPT ); Thu, 1 Sep 2022 16:05:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ACD653014; Thu, 1 Sep 2022 13:05:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AE28B61EB8; Thu, 1 Sep 2022 20:05:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CCA9C433C1; Thu, 1 Sep 2022 20:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662062726; bh=iOc9+0GNgABm7fesjder0qm3JUPhsUZuIxj/BUlS0DY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uLCKRs84bnUbq3xsodIbWHV1rtb9Yjdug6UHeGa0RoKvn32PnxRfPUWUt1tJWXDMp t2uUe7vlx3Kp8TfWGck0MSL4wmTCEZWlIif4W04OAkWN2jTRNr84MCyJKuwoKg3Fyr KLbuHVW8iWbGWSwVXN8Fhzf8fAx11mIEOJPbkvSV1ydcXehE+g4Wf4hulJxpCLpJTx MWTqE+3CUK91jok+H0IcrlhGEmyhmTpmcEShWRLMxYb0cfQ7lP8spNFzIckDCTo72s jbqyvgVJj9hpGJIJyt7Uugeu0dDlbiWG+Cz/p0mCWybjHyIx7w68zv5RMaX0+SrMtV aQprBRIBlH2UQ== Date: Thu, 1 Sep 2022 13:05:23 -0700 From: Nathan Chancellor To: Kees Cook Cc: "Gustavo A. R. Silva" , Arnd Bergmann , Greg Kroah-Hartman , Shuah Khan , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 0/2] fortify: Add run-time WARN for cross-field memcpy() Message-ID: References: <20220901065914.1417829-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220901065914.1417829-1-keescook@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kees, On Wed, Aug 31, 2022 at 11:59:12PM -0700, Kees Cook wrote: > Hi, > > I'm hoping to at least get this into -next to see how noisy it ends up > being. I've tracked down several false positives that are getting fixed, > but I'd like to see this get wider testing. For details, see patch 1, > but this is the run-time half of the recent FORTIFY_SOURCE memcpy() > bounds checking work. > > -Kees > > Kees Cook (2): > fortify: Add run-time WARN for cross-field memcpy() > lkdtm: Update tests for memcpy() run-time warnings > > drivers/misc/lkdtm/fortify.c | 96 +++++++++++++++++++++---- > include/linux/fortify-string.h | 70 +++++++++++++++++- > tools/testing/selftests/lkdtm/tests.txt | 8 ++- > 3 files changed, 155 insertions(+), 19 deletions(-) > > -- > 2.34.1 > I took these two patches for a spin on four of my test machines (one arm64 and three x86_64, kernel compiled with tip of tree clang) and I did not see any warnings. Not to say there are not any lurking but my set of drivers did not appear to trigger anything. Tested-by: Nathan Chancellor Cheers, Nathan