Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp237182ybt; Tue, 7 Jul 2020 21:43:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfPdDyWiid6Dw1PRJEN4YzfKeqIAaVwiJ4RM3mI+zDDmd/uedsI+iP7/N5m0WJWO3KGWtT X-Received: by 2002:a17:906:cc13:: with SMTP id ml19mr49567873ejb.288.1594183404640; Tue, 07 Jul 2020 21:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594183404; cv=none; d=google.com; s=arc-20160816; b=MVpqALKtKnLpD6R4jF/nbU2gb4wogcniXw9vQPwFeDT9bmMskhyaS7lfLpoiMQyM/u a93MnaHVhqSzP6ZBJ1BizoWRV7Bxnu27d4Oqu9UA97kYUah/wW/l42G2TUPo6rNek8V/ ucHPm6UPPuBs1mZKQMCm3LAC+qCVkJ0vtqvlJhGt/olyX2h093Ib1MMAxwLiM6SicrOs VSx+fnq6WrWPIt0rZM41FZHCnZID26vapGTT9XnlZMHNn4wOL4w9FCNY/0zqWMR4O862 /IDuHp1X6cZrksKiOUa51SrJUEpVQDnvdXVYP4ts6ygG09/YY5AxSdMqR+2v0iY2HN7g 5tow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=w74eNERLG2pgyjUdSRcYW9SUoyc7gG8Z+LPaMqm+zH4=; b=Y/UTHSuC+1iyEUQAjZvcp/nXDaZlfTMDHv80bj2O+YMFVIxh0gB2oX8w6lhzL8Hzmp HhPE7lGQtRS6PrGGcAu7DshQkbqdI5RKneJdc/Gesfk5tPZlxUkiByFRerC3a5mtDryt FZAzIPfUIrHTm06S48uyXss4wg748kYo4V9KibcWt/YqqLorJtEIWQl9dOxjnom6cUoW 6t3jnBxOT3d/wBE4DsVf5+WEhZwZ96Uepg4nYU3sIc6bralO4rAThxHdp0sM4gbgs0jo XRf8APn/v7b3yqZvUZ4mdbMBaN0sT2qVD5orwT9ngNggDRATsVsAuz7bcHSan+56EePx 6Kfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si16688694ejd.449.2020.07.07.21.43.01; Tue, 07 Jul 2020 21:43:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728742AbgGHEbb (ORCPT + 99 others); Wed, 8 Jul 2020 00:31:31 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41078 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbgGHEbb (ORCPT ); Wed, 8 Jul 2020 00:31:31 -0400 Received: by mail-pg1-f196.google.com with SMTP id g67so20156512pgc.8; Tue, 07 Jul 2020 21:31:30 -0700 (PDT) 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=w74eNERLG2pgyjUdSRcYW9SUoyc7gG8Z+LPaMqm+zH4=; b=bGr877LUdCQ0kuSTd6Jzf41uJHQKYxSNHoRUTRR4j8FtJtlOyW0FoOwCvJ0t/mozML 9fOZVHGHIAIbjMyLZ5VM5fRv3stTWKk7HF0lUxN31Qo/mFTe5Ut9rSku6IXj4n2wJM6K jRqY4pu+DIOuIYgJGMOqyQROrz4ULc6SXGN0zIvDNqz/VX4OSlAk9OI13oUJdMhZUjTr qZgqSTZw5FOEBGtJoz/pGXZj0m6zw5LLFpapPHSoVx6UcuJ7qzaaFud0REjTTWVhI14S rCO2SGeobH8T5XoDsIg9G7ylBOjEFE1WfZP3pDWJ4TPg+VZ9fVXHT0Vf3ax++zbqU7ve sHdA== X-Gm-Message-State: AOAM530ICR02122zUYQomrMS4iQ1qTHs/XZYJDQeu7GC25eX8vFqkuWi ghI+l8FtpVk6T3WVUxjSv2U= X-Received: by 2002:a05:6a00:2c1:: with SMTP id b1mr40074651pft.159.1594182690346; Tue, 07 Jul 2020 21:31:30 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id w9sm3745302pja.39.2020.07.07.21.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 21:31:29 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id A30C1400DB; Wed, 8 Jul 2020 04:31:28 +0000 (UTC) Date: Wed, 8 Jul 2020 04:31:28 +0000 From: Luis Chamberlain To: Brendan Higgins Cc: Kees Cook , 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 , 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 Subject: Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites Message-ID: <20200708043128.GY4332@42.do-not-panic.com> References: <20200626210917.358969-1-brendanhiggins@google.com> <20200626210917.358969-2-brendanhiggins@google.com> <202006261416.F4EAAE47E3@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2020 at 02:22:11PM -0700, Brendan Higgins wrote: > 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. Curious, did changing it as Kees suggest fix it for m68k? Luis