Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp775417ybj; Tue, 5 May 2020 07:23:21 -0700 (PDT) X-Google-Smtp-Source: APiQypJXFtxnnjO3vrCnwD7pMIGtSZDrsjllfjeeXBHZYoaZcM4P05Us/Dr+e6FFHtQJtL0GoCw3 X-Received: by 2002:a17:906:6a02:: with SMTP id o2mr2785061ejr.223.1588688601642; Tue, 05 May 2020 07:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588688601; cv=none; d=google.com; s=arc-20160816; b=PUg3P6LSQ5y1yjLPz209brilbRc/rUTWcP1vh5j97Wka6j76ItDKEZ8AWqfSrkk7p+ gcsTvm/94HQHfUSo1I7Vyhm/3NTJKICzBDkOG/wgq0WV99DV6gCedNkfv3AAM3m9jD9m AOvjNTJRwHMfBDJUw17jdoxkxGUBAUh1NLUxS0doxpdJzmdVwrqjybGwd9mndgKaulTM K/hIOsUQFk2vPcMt7zrhtpDtOgXFasmpR6tpYBfIQC810NllY8zwL7+sxdIGxYNPJkW2 gmkxCd9EbiUoFf/a4YO+q4SkJCmYBm/XPPECiTJYGO4YS5ivvRe75+x5Jq9UTxVyzhXT sFsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Oozv1CurdVXPxFbon25FvYaSVZOel7H+M9qpgBithxw=; b=log45GDYRUuaJ7cdsOFOMzTmPFTqZwjshRYFpVvbOl39RCmoU0qHX3IESKK96PtWCa Le1J2jCfh4eoKfS6kRAOGmv7ugJzX0eii8lrTj0IGszuMuDJdLBTIErC8HtxX8Yqv6rF lM7exthOcubpOfj2j2I6xOrvOE7Y6atVvQAjQWfTXSlQmSPrjY5iCvGzF2QC4wbexUAH 0RS9IIhAoml04MdRhxQpWA9QQoSoQp707we1DFJ/EzspXlH3Au+qgLn18Undq0bfH9Qt imIoxx3xdAhc0SDfr4HYsDwxJFWCKhQYeIY1RgG7ioZ6RPZZNCX/CzCrpaWV5DS1GrKo 19Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rdomWIn1; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si1314723edt.563.2020.05.05.07.22.58; Tue, 05 May 2020 07:23:21 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=rdomWIn1; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730398AbgEEORt (ORCPT + 99 others); Tue, 5 May 2020 10:17:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730381AbgEEORq (ORCPT ); Tue, 5 May 2020 10:17:46 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0324C061A0F for ; Tue, 5 May 2020 07:17:45 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id j4so1720485otr.11 for ; Tue, 05 May 2020 07:17:45 -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=Oozv1CurdVXPxFbon25FvYaSVZOel7H+M9qpgBithxw=; b=rdomWIn1lx0/14x1MrCZ44PAia88FO1u5WiBJV0lCL873DmYOIw1RkG7EOjGN3DOcI BKnHqtLr5kIvTVt+46Qu6hkXUOFnxvrhJa4EE0BzJtBnyA6Li55vvUoguCqcceZsJErm 391RDdGHZfcGrEiWCMc3cskTgI8jYOjW5gIgD1G+/tWjpRsya6AqsC+cCYxYQ7SsdB56 tKXvgfRvmAXc3U64n7QaJ5BfrnxR2AVH0SulUJFFUX2ihfgEL0QS1jGLwMkTXtvdqcRs Ah5dfdU1SE40c+empSqBBAv6y4lhwPzQj8IfW4meGF3R74kI5zSC7IWGBB1/41Z+QkB5 zb1Q== 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=Oozv1CurdVXPxFbon25FvYaSVZOel7H+M9qpgBithxw=; b=DxpkA6FPdJN2pWlHhYN6A9bH7goEfnNQI3ouBI2iheu8JPYv+cVtUqmzUXstmis6Cs FYrlJZkNzRZrTKsQjvkEI/njoJUsYKcb93QIdtR1a94Je1WsOmuQUm5nOpLtuo5sIgLf NbOIvcZY+Nn3Pe3j5AzGqzMWHaK/Qk+RCqJ2gImABU+uTMFwXFXjg5UIDY4WYJDCJDMm auR1nKg2V/ReqjYpAV2XDzfHWvpys6YvNwLOVK7PcabVP8Ww0YO4CMn/ADETO3fErtqG QD6OiTkCbM4ZCCBfN4NkbweGMkFbFruF7fl2//VWLaym/EflOCVsb/djNSckIAETklGR JT8w== X-Gm-Message-State: AGi0PuaBxzetkQj2dHOTMJFvcwCojvKBFhgmhkzmTgive/N4lIEXIGKx 9Ih204TCoKXFSxsM2yfDZWQl/h3xtdevfsWxMsaMsw== X-Received: by 2002:a9d:7589:: with SMTP id s9mr2210194otk.251.1588688264613; Tue, 05 May 2020 07:17:44 -0700 (PDT) MIME-Version: 1.0 References: <20200505141137.665940-1-arnd@arndb.de> In-Reply-To: <20200505141137.665940-1-arnd@arndb.de> From: Marco Elver Date: Tue, 5 May 2020 16:17:33 +0200 Message-ID: Subject: Re: [PATCH] kcsan: fix section mismatch for __write_once_size/blacklisted_initcalls To: Arnd Bergmann Cc: "Paul E. McKenney" , Andrew Morton , Masami Hiramatsu , "Steven Rostedt (VMware)" , Kees Cook , Mike Rapoport , Arvind Sankar , Dominik Brodowski , Alexander Potapenko , LKML , clang-built-linux@googlegroups.com, Will Deacon Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 5 May 2020 at 16:11, Arnd Bergmann wrote: > > Moving __write_once_size out of line causes a section mismatch warning > with clang in one instance: > > WARNING: modpost: vmlinux.o(.text+0x8dc): Section mismatch in reference from the function __write_once_size() to the variable .init.data:blacklisted_initcalls > The function __write_once_size() references > the variable __initdata blacklisted_initcalls. > This is often because __write_once_size lacks a __initdata > annotation or the annotation of blacklisted_initcalls is wrong. > > Remove the __init_or_module annotation from the variable as a workaround. > > Fixes: dfd402a4c4ba ("kcsan: Add Kernel Concurrency Sanitizer infrastructure") > Signed-off-by: Arnd Bergmann > --- > So far, my randconfig checks found two such instances, one for read_once > and one for write_once. There are probably a couple more in random > configurations, but I guess they are rare enough that we can just work > around them like this. [+Cc Will] Thanks for testing and fixing this. Note that this may no longer be necessary once Will's patches land. Also noted here: https://lkml.kernel.org/r/CANpmjNNw6M9Gqj6WGTHH4Cegu8roTVu5x6Vqs_tCBxX3gPwL4A@mail.gmail.com For reference, Will's series: https://lore.kernel.org/lkml/20200421151537.19241-1-will@kernel.org/ Thanks, -- Marco > --- > init/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/init/main.c b/init/main.c > index 8f78399697e3..441c384a73cd 100644 > --- a/init/main.c > +++ b/init/main.c > @@ -1020,7 +1020,7 @@ struct blacklist_entry { > char *buf; > }; > > -static __initdata_or_module LIST_HEAD(blacklisted_initcalls); > +static LIST_HEAD(blacklisted_initcalls); > > static int __init initcall_blacklist(char *str) > { > -- > 2.26.0 >