Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp720632imm; Mon, 1 Oct 2018 17:59:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV60+9Cxf3iZdT1apyrGudC4leIXjhh980qakZArH6AKjOshv/MPwJbSd6rQDSm1CV1PSjXvB X-Received: by 2002:a17:902:8c84:: with SMTP id t4-v6mr14197946plo.188.1538441942788; Mon, 01 Oct 2018 17:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538441942; cv=none; d=google.com; s=arc-20160816; b=skYheDnsHTwpopr3Y+02pMplejsO9kque2QqbqTDg0YzUKi4Y76lyDDCouaoTOSk1W U1NPcPCwgGxSt/dHxvm11KmM7lCTNdLyOMJXJPD3uJHDUoLe8xyXyOeKLz8SGoQGgsau w2DoIviiLb/+jzVmKo3zDgYMAzyvJBGbR7X0iuPCc7cqUAnHt0D+HIMu/WiYOZlPDEHz OEbaMom2XrEV8/IqaPokrAnOND+2TGrOCYiFGUHd6zOq4lwxgKGcPPwaMetCR1JBTbEL rGcS80ZM+a26SeaHqcZmmWZXNmfswki2heJ8KZNjMUzTUxZ8qpmrGKOSgKw/6RokRfWW PQFA== 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=BNwJMOTTBg+xIR0Zs6W8eU/Z+0Zh4DQ+gRWYfOJdHJk=; b=iwmKLN3fxtJP20kGZQQpYwQJ6jREwIMDgCC9kSE9k/0T2VpUZhdQR7Mx/cL9xSAoR3 bcGmds4f0aAxy0hTsg4/WiS6IifKAeSyp3gg4enG57+Rwi7SN1/qyKvhCUY2eikYExXH H2PQM4XLqovfHjCV7JdTRVXA+4T/a35hkYz92z9TFipQWMJjPiEo0VtG7UVo0RyLtRNJ 0xYjsKXAok4aglkeaudkEpm7IIN32WuX8t7MkYpD1KJhhGoVu+a3GxnfFJI35EF1k3jU /c6djGWo5CNqISHCc9QR/t7/Qi/eWsmJWdHOgwTpnf4wTtoe5m3RwJf0S0QezgIYCP/W 5n/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QGYZ4aBu; 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 r29-v6si14673403pff.24.2018.10.01.17.58.48; Mon, 01 Oct 2018 17:59:02 -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=QGYZ4aBu; 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 S1726695AbeJBHfl (ORCPT + 99 others); Tue, 2 Oct 2018 03:35:41 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:50887 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbeJBHfk (ORCPT ); Tue, 2 Oct 2018 03:35:40 -0400 Received: by mail-it1-f194.google.com with SMTP id j81-v6so1000371ite.0 for ; Mon, 01 Oct 2018 17:55:11 -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=BNwJMOTTBg+xIR0Zs6W8eU/Z+0Zh4DQ+gRWYfOJdHJk=; b=QGYZ4aBukEzkUbplpIyJcVFIRfuHhUExWt9u+/VhfugsKltmM+jOi13nMdW8aM+fnV hW+6zqZKIKLx3MssgYOWd91KaIDaXHZzbkOJJYvDRvY92ByERskBXOFo9SjNrKykFNy3 cQ/EH6zN9Uw4GxBJKEaG3MmZ5DthqSto91x+0= 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=BNwJMOTTBg+xIR0Zs6W8eU/Z+0Zh4DQ+gRWYfOJdHJk=; b=uPXHvXjsrVhhQLQ+gN7oh4flxuXnLtwsV8Ux44NvrLqLXS6RQl1t/dqTRYl2ZofR9M OecY8+vFp1Ah44fepJJYbwr4xTEtjLOqLq0Sp/LMLozbVinFbVBnid2j/bWreqHLk9r1 WNjKjlrdrv6pnIOSxcazXppTNU2Ik3QMXEOzm+7lVPOpNcQipESq+xKVdq5oIRut/Vm6 HAcwccFagZQ1dRY7n3UmXRdTHxRGBQQEpw7PjqqzznuttjPKFyRHcBuKJFh4lOT6nFfV jwkj43USwLzA3agvDYqjUf1NB2CLuLu4uLOmYAAC4WYOGf3GxLf7xHlyveLJ18kLNBZb sNgQ== X-Gm-Message-State: ABuFfoj86sCNdhj/Jz73tSdtLRrFijEz/8KGqMnA53MuRwvv7dxRNMUc VbvNVa6HzBAArlh85QWJy8i+9A== X-Received: by 2002:a63:10c:: with SMTP id 12-v6mr12224849pgb.62.1538441711433; Mon, 01 Oct 2018 17:55:11 -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 c79-v6sm16930363pfc.92.2018.10.01.17.55.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 17:55:08 -0700 (PDT) From: Kees Cook To: James Morris Cc: Kees Cook , Casey Schaufler , John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , Jonathan Corbet , linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH security-next v4 03/32] LSM: Rename .security_initcall section to .lsm_info Date: Mon, 1 Oct 2018 17:54:36 -0700 Message-Id: <20181002005505.6112-4-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181002005505.6112-1-keescook@chromium.org> References: <20181002005505.6112-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 Reviewed-by: Casey Schaufler Reviewed-by: James Morris Reviewed-by: John Johansen --- 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 4cbcf244a965..892fe6b691cf 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