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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8F53C433DF for ; Fri, 26 Jun 2020 21:22:13 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A443A206C3 for ; Fri, 26 Jun 2020 21:22:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RcAepcCN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="fTouV6ua" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A443A206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SRS5LMfrhdY0vCtdqpsiuxy15nre8DjT11AqF437jks=; b=RcAepcCNz8RlvkouvBzRDUzw5 NxrTItqrSJlFxU7ymF6vMRAtaSnImghxjCnU8GRouj1uIfF3I4leX6oY9Q/RtKNioX/Q2avT0vrCy zmumPVUHgoC4b1kzrIUlvX6KEY3M9hUeSlqFlNsklQw/LAxlUgDPP67MSMywWvsiSWjXgTZ0Sii0A Jgh6uqDssjS1HzY7x9mNEtjwKmJ53rFwR4hDVg9xmrUfFbdr4OuONh/HKksYdRjpJp3PgZJW1lU+l MzeauufoccrcES3u2MEfROJA718bTxulJbnQ9gLYeJpNjiWX6pma3VOjbgcIxXlCw/+BJQVOAE2oL sayLdiFLQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jovlj-0000zN-Ax; Fri, 26 Jun 2020 21:20:19 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jovlh-0000yy-OG for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 21:20:18 +0000 Received: by mail-pj1-x1044.google.com with SMTP id f6so1427686pjq.5 for ; Fri, 26 Jun 2020 14:20:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fRqRadojwuG0TG7LIG7vreVHmh8dDyxVABNeNVIB/fI=; b=fTouV6uau5MrWNpKLBIlplSK4yTsQr8vqkatlxEFGVAIO5/btu/+Y99/2O5JB2z2XB 0kip19LO2KxaHV2afumDNH48XY2qSD9F6oCsUOcLORAd/9N7qTzU9HoDp25R4vEa6OPQ jxl5SwiNpmF8rxPqXZdgmxh0OqDpkM/65iCs0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fRqRadojwuG0TG7LIG7vreVHmh8dDyxVABNeNVIB/fI=; b=Dn6oHtEcjIt0RvHY5klokvvsbEHzq1U5E9lPc7ufU89IsyPlz9a6kHZrgT4lbmkRu3 mZaNIHb0kVJpxac0IFW/EH8VGO/lgUq4C0/ZnZbYs5EQHY0XuU2TnTTIMXXpBKkP3ApQ JuV68YYeBEkpaCNnUEmR09cx4kGWa9aZwTSqmoHzSdN21un6lWLCyVapvP5LVqXxJoIf 8tLw9XmXv+MuyXpJjjzEslDqlJG7/yn558lCScfVMktjbods1MMySYBPxk9cawEW7bhE wZovC5UNKBEQd5Euy4cMJELVZ37GYckzrOsFLCtxI2a6xbzbsP0Fx/M8dZzx3iFa/fyf ZaaQ== X-Gm-Message-State: AOAM533gFkgQWis0oTZrWxr2MvknOipBjO891CmFUCfEj/Ww05W6aSys h+WZvoGH2tcJGUd/gYW0Hcu4gw== X-Google-Smtp-Source: ABdhPJzanFCPjbVP6IP78jIA22FsZ8y83mQsxAnBAhwVFXPMMilrtj09ty+spenAUXCHEiznsVyZsA== X-Received: by 2002:a17:90a:2b8f:: with SMTP id u15mr3731333pjd.98.1593206415418; Fri, 26 Jun 2020 14:20:15 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id o22sm26668076pfd.114.2020.06.26.14.20.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 14:20:14 -0700 (PDT) Date: Fri, 26 Jun 2020 14:20:13 -0700 From: Kees Cook To: Brendan Higgins Subject: Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites Message-ID: <202006261416.F4EAAE47E3@keescook> References: <20200626210917.358969-1-brendanhiggins@google.com> <20200626210917.358969-2-brendanhiggins@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200626210917.358969-2-brendanhiggins@google.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, catalin.marinas@arm.com, jcmvbkbc@gmail.com, will@kernel.org, paulus@samba.org, linux-kselftest@vger.kernel.org, frowand.list@gmail.com, anton.ivanov@cambridgegreys.com, linux-arch@vger.kernel.org, richard@nod.at, rppt@linux.ibm.com, benh@kernel.crashing.org, yzaikin@google.com, linux-xtensa@linux-xtensa.org, arnd@arndb.de, jdike@addtoit.com, linux-um@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, davidgow@google.com, skhan@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, kunit-dev@googlegroups.com, chris@zankel.net, monstr@monstr.eu, sboyd@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, mcgrof@kernel.org, alan.maguire@oracle.com, mpe@ellerman.id.au, akpm@linux-foundation.org, logang@deltatee.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 26, 2020 at 02:09:06PM -0700, Brendan Higgins wrote: > Add a linker section where KUnit can put references to its test suites. > This patch is the first step in transitioning to dispatching all KUnit > tests from a centralized executor rather than having each as its own > separate late_initcall. > > Co-developed-by: Iurii Zaikin > Signed-off-by: Iurii Zaikin > Signed-off-by: Brendan Higgins > Reviewed-by: Stephen Boyd > --- > include/asm-generic/vmlinux.lds.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h > index db600ef218d7d..4f9b036fc9616 100644 > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -881,6 +881,13 @@ > KEEP(*(.con_initcall.init)) \ > __con_initcall_end = .; > > +/* Alignment must be consistent with (kunit_suite *) in include/kunit/test.h */ Nit on naming: > +#define KUNIT_TEST_SUITES \ I would call this KUNIT_TABLE to maintain the same names as other things of this nature. > + . = ALIGN(8); \ > + __kunit_suites_start = .; \ > + KEEP(*(.kunit_test_suites)) \ > + __kunit_suites_end = .; > + > #ifdef CONFIG_BLK_DEV_INITRD > #define INIT_RAM_FS \ > . = ALIGN(4); \ > @@ -1056,6 +1063,7 @@ > INIT_CALLS \ > CON_INITCALL \ > INIT_RAM_FS \ > + KUNIT_TEST_SUITES \ > } Nack: this must be in INIT_DATA, not in INIT_DATA_SECTION. Not all architectures use the INIT_DATA_SECTION macro (e.g. arm64), but everything uses INIT_DATA. -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel