Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4777170pxv; Tue, 27 Jul 2021 16:34:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqAHsvGJgXRVQVZwklQjQRwL9ZqW/rtvLOdOaEqSeLLZvoxuzJeEwDFVHeeu+/xMAKkOsZ X-Received: by 2002:a17:906:f11:: with SMTP id z17mr24409015eji.385.1627428851511; Tue, 27 Jul 2021 16:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627428851; cv=none; d=google.com; s=arc-20160816; b=GahuK1QZp02ZVKliYq7VXp5X1fiAKG020sI83kcqGugYh6zk5kkLe/QcL93I4qMsj5 yM00V4fJmBzj6/0XBlfRmYwtL3jH32A62UbgOWJGZqZLxxyGMi9Wtcgp4PjPyJfnOcee cNvsUkHbzht401kLbltamzrwQ+VSFp1IcAsWzz06IwLra/FNy+cqm5nJKjt8FZ2MUUPy uxYnnvEDw4WXPnJFR7E1dDVlUD1NNLxa90T8wLSnIgz6EfHqjataszgttakDn8c7FkyJ 5+hj4+7lUAmXp7gNSQE/JgXgUevAzUq761ngJdmnpV8e3BPUKzckoY3pkZiRrJifOO1L Kd/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=41wpVpavNVm7pF419ATH4r8xqqa08ERgI3LuOyPcGto=; b=ChV3n525eIC/1l1FrXaTwRk4tbO/a5CKKuCf3riByKDCczPG9HBTVGRx8r/kmRbpl3 S8c2K+Ilss7DNgSDawZsXs/42KhMDnA34l9cQEzNP37g8TBWw6TgIvbyCr1xbYuluP5O nNA7Ax/+r8CKROyR4yduxRZcamaGSQQwhZsDp8C0WZoBPnQ7xVWhBDOM0o5APsBGw6RN kzFFFbyug+LDqllEqSDySvIiueIsd56bd2+lTpqxwyk7A4n8kL1eCyesFdYPZY0WWYG7 opWegL6ziviw5XwV49wb1jAGSdbfeMQOn/suZh2hfBN9ERt4aA+z2XogpjsBlxNUbnK2 NGHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=St1ko82Y; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz3si2905179ejb.361.2021.07.27.16.33.48; Tue, 27 Jul 2021 16:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=St1ko82Y; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232992AbhG0Xdf (ORCPT + 99 others); Tue, 27 Jul 2021 19:33:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232735AbhG0Xdf (ORCPT ); Tue, 27 Jul 2021 19:33:35 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD32CC061757; Tue, 27 Jul 2021 16:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=41wpVpavNVm7pF419ATH4r8xqqa08ERgI3LuOyPcGto=; b=St1ko82YVev0bfzCo8YlqcAWmW hr8hpuUOKsdzCrcPuwVnS3q/Plii2gc2y72mvnUDrd88/Ee0aMlJrGenY9KK6SsdfJ3AA1toKsYMh zWwqjDGuGBo4Z30xOkTfYdv/BnreryNqQQEFvin7dexkAmnM8HWqpKvanzLPvj+aU7s//28WihHVX iiDLgdbEzCA8X3hMEzwVO3pKRPyqjgtZl55Nh+PvITALYCI+P53/qr04qmgR7KSo3DxPciVbaldwk CsOn5fnegZ7k6rRT8CPrLJ3DUBN40ij+32GWkm5Pwn9WlS7icC6Wy+eNCSjkPj/X0wETRQqjdkJvv tTxLVPQw==; Received: from [2601:1c0:6280:3f0::aefb] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8WZn-00GfWY-Tk; Tue, 27 Jul 2021 23:33:32 +0000 Subject: Re: [PATCH 33/64] lib: Introduce CONFIG_TEST_MEMCPY To: Bart Van Assche , Kees Cook , linux-hardening@vger.kernel.org Cc: "Gustavo A. R. Silva" , Keith Packard , Greg Kroah-Hartman , Andrew Morton , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-staging@lists.linux.dev, linux-block@vger.kernel.org, linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com References: <20210727205855.411487-1-keescook@chromium.org> <20210727205855.411487-34-keescook@chromium.org> <9827144a-dacf-61dc-d554-6c69434708de@acm.org> From: Randy Dunlap Message-ID: Date: Tue, 27 Jul 2021 16:33:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <9827144a-dacf-61dc-d554-6c69434708de@acm.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 7/27/21 4:31 PM, Bart Van Assche wrote: > On 7/27/21 1:58 PM, Kees Cook wrote: >> +static int __init test_memcpy_init(void) >> +{ >> +    int err = 0; >> + >> +    err |= test_memcpy(); >> +    err |= test_memmove(); >> +    err |= test_memset(); >> + >> +    if (err) { >> +        pr_warn("FAIL!\n"); >> +        err = -EINVAL; >> +    } else { >> +        pr_info("all tests passed\n"); >> +    } >> + >> +    return err; >> +} >> + >> +static void __exit test_memcpy_exit(void) >> +{ } >> + >> +module_init(test_memcpy_init); >> +module_exit(test_memcpy_exit); >> +MODULE_LICENSE("GPL"); > > Has it been considered to implement this test using the Kunit framework? and do we want everything converted to use the Kunit test framework? My answer is No, we don't, but I could easily be in the minority. -- ~Randy