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=-14.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 0C0EBC433E1 for ; Fri, 26 Jun 2020 21:22:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB39D20C09 for ; Fri, 26 Jun 2020 21:22:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="TFElbCjp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726196AbgFZVWY (ORCPT ); Fri, 26 Jun 2020 17:22:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726070AbgFZVWX (ORCPT ); Fri, 26 Jun 2020 17:22:23 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4768BC03E97E for ; Fri, 26 Jun 2020 14:22:23 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id 207so4968854pfu.3 for ; Fri, 26 Jun 2020 14:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DPaM2QLp1Lnyo/tFOjZRrBK9GEiSK4tLpveqTF1QTWw=; b=TFElbCjpLxOIFHGP0g+klWMfLi0l2Mun3MxomGTHA0v9jh/9cfSmaHKqFtA4RT6jRm 4xzaHn3a057w+xMpnbwSdQNls0bvhcqTTFxuifRkxMCIho8BIk5JWH0r+EJJml6d8S5N IsXJvYxj2SL3HF4o5D1uBwhALv9jY3C3tWulumPnGm8T4x7r1RmHVZS5Ug2DclvsP0xR sFOIwsCxvF6aV1Nj1SOAJunuK7BRTUwezp0PPzwRLdniCcRaiK5RCcSn7cJhUKWnHoFm wpmGYvCAqzTEprPMaK7A1ERbYa7IUuNMzW2ZkRudy2BcDJa9pWbc0YGeu0tzrYO4kW1e IXcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DPaM2QLp1Lnyo/tFOjZRrBK9GEiSK4tLpveqTF1QTWw=; b=ijocRrZKe3uIjqcdOvtYtxLuFUU3X2FrdIHd2l294prBjDTAv7IZmLfcDqOTgojyr+ 1QbP+jRXoNHTikzCv7Zj03WmgDlkzrqVM4S3UaDAAQH2/+KJgfYr/JdyVQIZF4IwqnJY FkiTeQWycloRkUE3UBxVB6UVVipaTstRR7bekih1a8q72XpfqSO9nmjZG6Eq59ij2/I3 IH15qNLwlmYIrkkp5eL3T8gMJOr5bK0nwjCsYKSzEZYqmy1g90jZkAYyfifVfx3gd5TO UOGF7SUOYCYc2avV8T7Tz6Alu5uS0mYXBlrHMJN92GzP5olufbnh3AGeb2/eF8Lwa/IQ Pmxw== X-Gm-Message-State: AOAM530Jes9TLWmeWqPHuNVqy7P23N+TP3cIZrSrPS7UtM+mEYPH0hkp hw4seH222n52UWQOuLP3L5iLkGaSZNZHrg9w/sx+mA== X-Google-Smtp-Source: ABdhPJxiKEYutNObsmIBYphNH4Rjrm9h5SZbvVD0vbhM3XAclfw4B+ryQw8//QlKHbH2sO6uKDOQuVwPIVH3OMEUjA0= X-Received: by 2002:a63:d501:: with SMTP id c1mr631501pgg.159.1593206542565; Fri, 26 Jun 2020 14:22:22 -0700 (PDT) MIME-Version: 1.0 References: <20200626210917.358969-1-brendanhiggins@google.com> <20200626210917.358969-2-brendanhiggins@google.com> <202006261416.F4EAAE47E3@keescook> In-Reply-To: <202006261416.F4EAAE47E3@keescook> From: Brendan Higgins Date: Fri, 26 Jun 2020 14:22:11 -0700 Message-ID: Subject: Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites To: Kees Cook Cc: Jeff Dike , Richard Weinberger , Anton Ivanov , Arnd Bergmann , Shuah Khan , Alan Maguire , Iurii Zaikin , David Gow , Andrew Morton , rppt@linux.ibm.com, Frank Rowand , catalin.marinas@arm.com, will@kernel.org, monstr@monstr.eu, Michael Ellerman , Benjamin Herrenschmidt , paulus@samba.org, chris@zankel.net, jcmvbkbc@gmail.com, Greg KH , Stephen Boyd , Logan Gunthorpe , Luis Chamberlain , linux-um , linux-arch@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List , "open list:DOCUMENTATION" , Linux ARM , linuxppc-dev@lists.ozlabs.org, linux-xtensa@linux-xtensa.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Fri, Jun 26, 2020 at 2:20 PM Kees Cook wrote: > > 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. Oh, maybe that would eliminate the need for the other linkerscript patches? That would be nice. Alright, will fix.