Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2430602imm; Sat, 15 Sep 2018 17:33:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ6hZuMkh/HKXNYtMZouvUWdkhzm+A2k+hnh6g5ourzh3YgylIgHTXfP/vkCB6ImGY/yAhi X-Received: by 2002:a63:9e0a:: with SMTP id s10-v6mr17981906pgd.326.1537058021347; Sat, 15 Sep 2018 17:33:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537058021; cv=none; d=google.com; s=arc-20160816; b=TXrTOqmTEHToN3jZwffR6vx7CEEtPZ12Idufpwfj2e+lrMqmUZcCgL1dxMa93SzAQ8 gmMvvOpXczBwIaL1abudZSD+kdBKmZZzMr2ipRfsk+ZQmD4jdyvwohwMeHXKPAFxRUDq yXs8MldbFAQbGlqU3BHeFBHXFHJ8U6P90IHtU0jKUfgOxbhn69pRdKSe8hdt9k0nmHP4 Y6pYTR7MU9ngPYakcfviGYl65VNQuDIc/TsJZujwjbh3Y+EmlRlyeBrjU9v+ZyygGG8M ndnRqn1DSaBydes3g70qcgilfCRgUbgYAwRDuwfGd2tji9ozyS11Bnqv+PruglKpkSFF Q9Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=JkAxKUtWlRibGwrMGXJBt5UGVFwepAcEiRLGWZboXYU=; b=H1/1g7G1u5AVBG57u+4iY/91demBC+Vv9ZcpUes53oDMBrOZKOoy7q7zDYR8oXi1qJ 7snD5vnIwCp5O4/diGrNVT7kMZzRYCOEQbPC4Istbto0yzBcAr5Do64Q6097mdoMbuD4 ZCYNY/r1v+DFdKmR6lggtgJgq6w52v8uwRGYEbhMK4RPpe+xMJKGxFvZwIZqOjxYclJO +qUp/KVYbL8JoR8duNpM16B6sMhUjaCcFeNOP9s+d4KNaj0hXDXpzWSjjcCfYd5KXi8i JvLf74r2ZJongrLr5HIyAsFMrbtmxubbn96ZwiL69HVogLOMer1CaKhKToKJqU6krTrn 2lqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JbuK7Hgb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id f190-v6si12039595pfc.327.2018.09.15.17.33.27; Sat, 15 Sep 2018 17:33:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JbuK7Hgb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727853AbeIPFwB (ORCPT + 99 others); Sun, 16 Sep 2018 01:52:01 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:46397 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbeIPFwB (ORCPT ); Sun, 16 Sep 2018 01:52:01 -0400 Received: by mail-pf1-f195.google.com with SMTP id u24-v6so5907315pfn.13 for ; Sat, 15 Sep 2018 17:31:05 -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:in-reply-to:references; bh=JkAxKUtWlRibGwrMGXJBt5UGVFwepAcEiRLGWZboXYU=; b=JbuK7HgbR1dxxm05eq3VUa9a/aD8xLnYsh4fVbQ34oL6IL13PVFJvkdUcWJlUsWnXT uhm9ZzpSa4Q9wYiVPODpvZe9uVubdk6op+1mMGkeGf1GdUZTbD99AIGLhr0jPisOALZc 7TBDDKYYaaOQX6yyVlHzDcOYg2Wl4Wfk5lEN8= 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:in-reply-to :references; bh=JkAxKUtWlRibGwrMGXJBt5UGVFwepAcEiRLGWZboXYU=; b=qDuERD+MjZhpAMJ1GhQbEYagQWPsZMwtiWO/QXtf/n+HLDqb9ZQe9FkxSOaKWj2JuM ae/9fdBCmyxjKRNcMlPiniDO9VpSwiw86/i90qHZT0S5NtzQcKQmpmVdKZpBDx6HEh/j KchdTIT4RlQqEySTlvsRnswtHmXUbgN4piQUwsFZ/LjgNxTFz9AmIT8wNB72Kbr9XzRz wOSNJEI1ZiQuoZJJtMpfiN+uSWCsGND7Cu2Flh6uWL2ACIyD3bzRDBTD0MGdCaF7I+F/ 8qmHQeVSadPW8i9cu/uRbRpP2ToBLcJIE2tByQGJgEHTc5ZyZSCbUur3uSXiY0s6NAed /Sgw== X-Gm-Message-State: APzg51Ahg3JqulcDDtgmzxL03MyTCF0s8PJKQqkMin3W1Cq+shVSgInF T4MpaZ1aCoolOYIC0yD8drUiuQ== X-Received: by 2002:a63:e318:: with SMTP id f24-v6mr17548876pgh.175.1537057864777; Sat, 15 Sep 2018 17:31:04 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id l70-v6sm15456229pge.36.2018.09.15.17.31.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Sep 2018 17:31:03 -0700 (PDT) From: Kees Cook To: James Morris Cc: Kees Cook , Casey Schaufler , John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , LKLM Subject: [PATCH 02/18] LSM: Rename .security_initcall section to .lsm_info Date: Sat, 15 Sep 2018 17:30:43 -0700 Message-Id: <20180916003059.1046-3-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180916003059.1046-1-keescook@chromium.org> References: <20180916003059.1046-1-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for switching from initcall to just a regular set of pointers in a section, rename the internal section name. Signed-off-by: Kees Cook --- include/asm-generic/vmlinux.lds.h | 10 +++++----- include/linux/init.h | 4 ++-- security/security.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 934a45395547..5079a969e612 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -787,14 +787,14 @@ __con_initcall_end = .; #define SECURITY_INITCALL \ - __security_initcall_start = .; \ - KEEP(*(.security_initcall.init)) \ - __security_initcall_end = .; + __start_lsm_info = .; \ + KEEP(*(.lsm_info.init)) \ + __end_lsm_info = .; /* Older linker script style for security init. */ #define SECURITY_INIT \ - .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \ - SECURITY_INITCALL \ + .lsm_info.init : AT(ADDR(.lsm_info.init) - LOAD_OFFSET) { \ + LSM_INFO \ } #ifdef CONFIG_BLK_DEV_INITRD diff --git a/include/linux/init.h b/include/linux/init.h index 2538d176dd1f..77636539e77c 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -133,7 +133,7 @@ static inline initcall_t initcall_from_entry(initcall_entry_t *entry) #endif extern initcall_entry_t __con_initcall_start[], __con_initcall_end[]; -extern initcall_entry_t __security_initcall_start[], __security_initcall_end[]; +extern initcall_entry_t __start_lsm_info[], __end_lsm_info[]; /* Used for contructor calls. */ typedef void (*ctor_fn_t)(void); @@ -236,7 +236,7 @@ extern bool initcall_debug; static exitcall_t __exitcall_##fn __exit_call = fn #define console_initcall(fn) ___define_initcall(fn,, .con_initcall) -#define security_initcall(fn) ___define_initcall(fn,, .security_initcall) +#define security_initcall(fn) ___define_initcall(fn,, .lsm_info) struct obs_kernel_param { const char *str; diff --git a/security/security.c b/security/security.c index 736e78da1ab9..d49d5ff8be4b 100644 --- a/security/security.c +++ b/security/security.c @@ -51,9 +51,9 @@ static void __init do_security_initcalls(void) initcall_t call; initcall_entry_t *ce; - ce = __security_initcall_start; + ce = __start_lsm_info; trace_initcall_level("security"); - while (ce < __security_initcall_end) { + while (ce < __end_lsm_info) { call = initcall_from_entry(ce); trace_initcall_start(call); ret = call(); -- 2.17.1