Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1559838imm; Wed, 10 Oct 2018 17:21:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV627jY5dU3nwNJ1jCtQt9td1pztjd+DyPKozwLsv44g6DNYhXZ4OEufz+iuVM1O0iUac3URg X-Received: by 2002:a62:b286:: with SMTP id z6-v6mr37403712pfl.79.1539217307585; Wed, 10 Oct 2018 17:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539217307; cv=none; d=google.com; s=arc-20160816; b=ZuCsI9oRLsGmz/IQjmXVeRP5KKYzWZ42D1wu5hsDF2v1z7x5+YSfAwIBAbA3S6lRok UjGKGN5ead2US3AooUbNA1v6HA0AttE9pbDymw9zMm5URLBq+l59Lfo6zZDMKLqbIdym cNUP0h0tp1nD65UJF4FP1ZZC4lqwMdcDUx+GdnCHEjlY/VhcJWLpU/i3jI+lWqIHGmST YeJ7sMdhlLl+0S2rE8ixyzkhTYIuH4DiB8n6PTS8umnxRRlIE/pmILsiGRYf4qZsKwOZ PC2ZsIWfehY2UQzux7QjSDCNqSBb8Pc2LSMplYE91TK4+68fSzsXtN8DVR3gFg5yAnId DWRw== 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=Xo9WiwhlvgJ6IoaFAu+6ifOsHIzHlKbozg1rMWS9Prqk4M0bHHCWr3gXtJ8x6YoDBg cu20bs01503HrZz0MEBxONUsMSifPqHRiDY3oikqWisXtHNv+STgLhiu3uHR2JlubHMB 87SFRxiQPKoyusWUelSDjD6BOVPXUbmlJqH6usDH9PJydm0PE2EkWo3ubvyfpFGNANI8 Ilfpz2AJKv2uQcdcakPlOvqYeJLt66A1SQlMBE2epDKGqeA/OQSEVo0Gqta0+RtJMIfp 1xtu1532mttaRVqdalMHt9t20CbvBkDlDJDOr1eED+hwudlH3cLJSxd7d1hs5gthJlMp 0+CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eswuuMyU; 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 f38-v6si29210372plb.168.2018.10.10.17.21.33; Wed, 10 Oct 2018 17:21:47 -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=eswuuMyU; 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 S1726384AbeJKHn3 (ORCPT + 99 others); Thu, 11 Oct 2018 03:43:29 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:36482 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbeJKHn2 (ORCPT ); Thu, 11 Oct 2018 03:43:28 -0400 Received: by mail-pf1-f196.google.com with SMTP id l81-v6so3450154pfg.3 for ; Wed, 10 Oct 2018 17:18:54 -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=eswuuMyUcqsBjLTBfAB22g9uhe1PlJ8+V/+KeDKDtQQX4iBQuW1eOEKeqzSReQQSaM EndljOTeVmhtFg8Y6C9BnvuOOSU0eHaz+xjkWESbjrCvyGdGTOzW2lnF6H0X1jQCdmwq ItsjiPNv7g08aVWXJvoW3MYJA84QSOLjysRrg= 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=kJ3QFG+TGy6QYHsTPacKWeLKmXQfs4Vu55H7whUL7j8BF9aiz0jzd8XVgYtEGYrv6c FJJUqIh50uCTOiA8yvVnqTpmXISR80dVov9xOtISKOayAkxtKxzwPS3YYIWyzfSE4vak ufJ/ya4xeO1PbDFWN4evxhh6x97+wRNSfWEm6AHvGRDSZNi6+1yZ85BNq28nF0mw9dO2 +6WsS+2bbIkcSGuno6a27t5q/EDG5jcI7P7mIXJFQK6upYE4r71i1gsmagRQuIbq18aI XDjksUa8EJV3gaoX8JlC0mJyYQ07CWN8mxn2QLToEu1LzD8fvRJh0jo3bVDhRTlPCItG xnPQ== X-Gm-Message-State: ABuFfojXLyMGjA2za8DKY1EzP76GwfbjjHAjAdtF1aUy1uqVo1DYlJO9 yGikHCgUvIOrHGRmO+v1kKTAFw== X-Received: by 2002:a63:d502:: with SMTP id c2-v6mr31625882pgg.324.1539217133914; Wed, 10 Oct 2018 17:18:53 -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 189-v6sm40061286pfe.121.2018.10.10.17.18.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Oct 2018 17:18:52 -0700 (PDT) From: Kees Cook To: James Morris Cc: Kees Cook , Casey Schaufler , John Johansen , Stephen Smalley , Paul Moore , Tetsuo Handa , Mimi Zohar , Randy Dunlap , Jordan Glover , LSM , linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH security-next v5 03/30] LSM: Rename .security_initcall section to .lsm_info Date: Wed, 10 Oct 2018 17:18:19 -0700 Message-Id: <20181011001846.30964-4-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181011001846.30964-1-keescook@chromium.org> References: <20181011001846.30964-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