From patchwork Sat Feb 11 01:37:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jess Frazelle X-Patchwork-Id: 9567705 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27E3E60572 for ; Sat, 11 Feb 2017 01:38:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16899285C1 for ; Sat, 11 Feb 2017 01:38:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AD2D285DA; Sat, 11 Feb 2017 01:38:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 50A7C285C1 for ; Sat, 11 Feb 2017 01:38:54 +0000 (UTC) Received: (qmail 26079 invoked by uid 550); 11 Feb 2017 01:38:52 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 26047 invoked from network); 11 Feb 2017 01:38:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jessfraz.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w2/tuX1FUc1aGcfGoBIM/DUMPFxYnZsupzMPnplCcaY=; b=D89BqTR4dQHaPtD6i6+e4tTis+XgkKWEd9WYIl+ZOukBTpJKqjuubthMgorcZIID83 9TxNnpdJWjvkIoDMUWY9A33ZU8ARXURHCFVdsR2iANijAKPAX0lbCBvH8il80SvhetJe 4/XsKXeMvfDj0PaK2wcEUBYPraAfT133VP9XU= 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=w2/tuX1FUc1aGcfGoBIM/DUMPFxYnZsupzMPnplCcaY=; b=bUYGM9vYbzJMxtPncib7dVwQSY49sAotM/a/vt+krXV3wVtemSXLxpROjlSr51fPls nBudU9OBlyzxTQr57nc05b6ru0MX5jOfb0RYMvBFq7gTxB2cVb1R28sBBlR8HPM3rQlS ZmGd1nuI6Jbqvf8M7shQNFQ5MzGT8qc8bUR38xBGz1OF1T7BYixbaxUrjgfLO5EL8Dwv nhbRrvS4ngBigzIvJh6HCLn5NeX3ze9+tgL+pM5BQkEnOrsxdAjEsi72TRSWMYMsO7Fs YjUMppI2YPnnQCyJJ7sFVuWKBX5uubhG0Re4+0bOzc4PmrIsDZYxKou4Ew/uCh2wAVNA 6o3w== X-Gm-Message-State: AMke39k30e5CfJYHZm7UMOxLWD2tvJfwCTpzVro5GNb+PA7dS/3Z+eOOxBxqySrwoDLKAXl8 X-Received: by 10.99.67.1 with SMTP id q1mr14447771pga.210.1486777119336; Fri, 10 Feb 2017 17:38:39 -0800 (PST) From: Jess Frazelle To: Stuart Yoder , Greg Kroah-Hartman , Bharat Bhushan , Bhaktipriya Shridhar , Nipun Gupta , Jess Frazelle , linux-kernel@vger.kernel.org (open list:QORIQ DPAA2 FSL-MC BUS DRIVER), devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM) Cc: kernel-hardening@lists.openwall.com Date: Fri, 10 Feb 2017 17:37:57 -0800 Message-Id: <20170211013758.3288-4-me@jessfraz.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170211013758.3288-1-me@jessfraz.com> References: <20170211013758.3288-1-me@jessfraz.com> Subject: [kernel-hardening] [PATCH v2 4/5] staging: set msi_domain_ops as __ro_after_init X-Virus-Scanned: ClamAV using ClamSMTP Marked msi_domain_ops structs as __ro_after_init when called only during init. This protects the data structure from accidental corruption. Suggested-by: Kees Cook Signed-off-by: Jess Frazelle --- drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c index 6b1cd574644f..0e2c1b5e13b7 100644 --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c @@ -51,7 +51,7 @@ static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain, return msi_info->ops->msi_prepare(msi_domain->parent, dev, nvec, info); } -static struct msi_domain_ops its_fsl_mc_msi_ops = { +static struct msi_domain_ops its_fsl_mc_msi_ops __ro_after_init = { .msi_prepare = its_fsl_mc_msi_prepare, };