Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1065934pxb; Wed, 1 Sep 2021 16:40:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1xI56L4zTgUsHUtE95w5O0q42hLNotFe6Dl/vIHkXkq/ByYTxsKS59LJ4AurY92E58z1g X-Received: by 2002:a05:6e02:20c3:: with SMTP id 3mr168810ilq.139.1630539657315; Wed, 01 Sep 2021 16:40:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630539657; cv=none; d=google.com; s=arc-20160816; b=GXYkc0zgsNylUTS6TD39wbBuNhMx6Pxt3/RpXkFr4f4hnQbJyQ8yarfSVqrSHfEaUN 6UcVVfzfrQyxpl8f4NLKeRHlVIHdHUaPdg7GHvpLzNTkrBUzdllP/UBPTK/r1sILQ4mK nKa89pCYO+a3+dQhG422tHl4LfmeTjUZqXSCaivQUVvvgOv3mjJ1s621vG2yN2Cg2NQr 1k/UZ8jeatLDj/Orhq+wsEeISHZP5EUltbQdLGP0ebjUSkFjIsok/YdCebvOFahxj/xt 9L3/ZH7uUjdMfNuc15FCHRGK2eY0kYuqtRqDhZJaQXVMkGh5M2JbBQUXz2380gkSFVxQ ss4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=tl7TywVZic9PhfHq2BmWEfnSDIUToLj1FPGq3mOdgmw=; b=x45uielYk3t+Rv0cs90eTUREUV6XUsDwEzEqdJjctZyyGkt9bJRtrqf9CkXt3U6gQH p+BsvTIUTpm3VlEz5VPBTVxpAAwvNchus/qVG6NSlPpQpYEUWxuEiVauR6Utan1BdUZl awyeoErdfCls+CYcJHwoyMGkjpIPxxMOezm5ZLaYHd7WOW0G/lNlxXJg2nUAOi1t3Ymp jA9bRPrb1uCiHZTuiHNv+DUY9kX6/k+BrEc/U4mAcwsRvQ4bF6VGV/eeOFkEmCJsOydz S9swXrAkNkZEnIjAbsuL/by3J8jTwJhrU5AGa/8pmRJeBTsySuzyvfxPuu3g/9U/jXqA tplw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=amPN+xrp; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c32si74696jaa.44.2021.09.01.16.40.46; Wed, 01 Sep 2021 16:40:57 -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=@chromium.org header.s=google header.b=amPN+xrp; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242394AbhIAXjE (ORCPT + 99 others); Wed, 1 Sep 2021 19:39:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240233AbhIAXi6 (ORCPT ); Wed, 1 Sep 2021 19:38:58 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265C9C061757 for ; Wed, 1 Sep 2021 16:38:01 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id c17so63920pgc.0 for ; Wed, 01 Sep 2021 16:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tl7TywVZic9PhfHq2BmWEfnSDIUToLj1FPGq3mOdgmw=; b=amPN+xrpXeCcUvsXZ2d7UHDE2nH9GBoGfLpr/Zq1IJmdo/pqCdlZwLqKWbBbEKvD4u ryvzcTzvvpj8VE22IBXoux6mnmBeTmz8rQKRLRvtp3fCsCNSoA5vuIX5ioGrz3CexbzP 1YShB1JcwaoXaca8CoKe5VbjNjK+gCCwbTCO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tl7TywVZic9PhfHq2BmWEfnSDIUToLj1FPGq3mOdgmw=; b=YPC8Ni1Rflb3Lh9O/G/UYWdW7mqYOIBzFSh9ZcvwNwbxrV8lN7oDY2gEzOXGDjevMd YpsS5JRiMcHlqd4fvOvPMLPqthXWakuwQxmVXshRhLeh7ChQRXyY8GE+MlNUdnt9Gp8c GIvzH7I+PC6xCFUvoJq1UiXF2d6DZHl+/hzBJJY9MY9FQ+Z1kfiY8mqziL7yvbj4642P AmrTHoiCl9OU6u4T5TmxeikxVQwnasXmgDZstTXcYUk/eHNgsViFQ2jHiuEOwehDgVoG R7oFpbtoCBpZO7A7StvEgnfEXd/9Yt1ew84QrPz67y8zNIT6JSki1d0AgebCHxzpL8D2 amrQ== X-Gm-Message-State: AOAM533cY2PKc7TaY2Q1/cXsG7zo++2Ltr0XVBtGqwwB24C39LyZIIaZ BMYmSBbQp5/i/XCXvCIswTmqsg== X-Received: by 2002:a63:f80a:: with SMTP id n10mr187132pgh.303.1630539480763; Wed, 01 Sep 2021 16:38:00 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id u24sm87353pfm.81.2021.09.01.16.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Sep 2021 16:37:59 -0700 (PDT) From: Kees Cook To: Josh Poimboeuf Cc: Kees Cook , Arnd Bergmann , "Peter Zijlstra (Intel)" , Jessica Yu , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Alexander Egorenkov , Sven Schnelle , Ilya Leoshkevich , "Steven Rostedt (VMware)" , Ingo Molnar , Sami Tolvanen , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-hardening@vger.kernel.org Subject: [PATCH 0/4] Fix ro_after_init vs static_call Date: Wed, 1 Sep 2021 16:37:53 -0700 Message-Id: <20210901233757.2571878-1-keescook@chromium.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=751; h=from:subject; bh=LMtX30+lHx9d1AiyntE3juWOs+vNiZc4QnLUTVqvMfk=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBhMA7UmpG1QrLCXLyjRwNizAoMH23KjhJdgmQwH3oR fiBTMdOJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCYTAO1AAKCRCJcvTf3G3AJhMUD/ 9jCNxxAKmyPneQY5gEfnpbv479Oor6moPazSiSEojXx1xulI+ViTPAcS/XqzP98X8/14oKEKVBdpq0 DlK1bjtgs4o3rVcMsHQ/8aH+JeLqzL0IHYCqQeZkB9D0Ruan0SJuN/3elxAWK1MdODurM1SW1Feosd QkHHg589WJdFLo9KzxnxSlmZlW/neMOKqguXhv0lRLc39NmcGjPCp5eN9koPYOi0GH+aa6g/uPu5fv jQm4KGT2KSMSGFZVs3fa8c9BLw9Tk60/PozJshlh9CG8nR16A9Eg6warfWkjjN+sLOXgT6XTjbHCZo TmE1ZRi5Gb1Jn1ySSYanQCvGyiAhsLCKNhJgy+BlGDw6t7J4ZysUEkroOU787UAdsCDZ+LViu6nFkB YKiBo1rrsPhz4+mJlhQp3o/s7qZuBuT+gpC45Y7AqUcl8ZqqTDsc8pUgeUcfx459NIUwPeOmilyoV4 kbyPdmETgDf/qGm0/t1Eef6/Rjcp8nwFg8heK5Dm47NTTm4vzAuCfjqm/GykG7ACHNG2+I5j5s7RX2 n3TmSWONZve8dL2xQjoIkgjICM7bIbdiu8wSfukzjyZSkFzA80GtNt0lMBJoBY67XrOBq2EvztxOpW gX1jQZR2Yg5Dee5YMMqC/hyntgUM5gSGnnjaHB82XdikWFP0FiDFwot8eFXA== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, It seems the .static_call_sites section was not being marked as ro-after-init in modules. Adjust the macro names, add comments, refactor the module section list, and fix .static_call_sites. Thanks! -Kees Kees Cook (4): vmlinux.lds.h: Use regular *RODATA and *RO_AFTER_INIT_DATA suffixes vmlinux.lds.h: Split .static_call_sites from .static_call_tramp_key module: Use a list of strings for ro_after_init sections module: Include .static_call_sites in module ro_after_init arch/s390/kernel/vmlinux.lds.S | 2 +- include/asm-generic/vmlinux.lds.h | 22 +++++++++++++++------- kernel/module.c | 29 +++++++++++++++++------------ 3 files changed, 33 insertions(+), 20 deletions(-) -- 2.30.2