From patchwork Tue Dec 20 20:10:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9482205 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 0671660237 for ; Tue, 20 Dec 2016 20:10:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1E51283FF for ; Tue, 20 Dec 2016 20:10:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D26B82841E; Tue, 20 Dec 2016 20:10:53 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EA84283FF for ; Tue, 20 Dec 2016 20:10:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934120AbcLTUKw (ORCPT ); Tue, 20 Dec 2016 15:10:52 -0500 Received: from mail-pg0-f43.google.com ([74.125.83.43]:35223 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754329AbcLTUKv (ORCPT ); Tue, 20 Dec 2016 15:10:51 -0500 Received: by mail-pg0-f43.google.com with SMTP id i5so11315713pgh.2 for ; Tue, 20 Dec 2016 12:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=SVmFAX9jiEKi8o1FCqUH4X5Rit8qzP39zLzCJrBT1XI=; b=jDrEa+AloCSJ1ojFyLR8jr+ueyxilSNV7W2i7Rzo18SLJP23tTGv0eFETYswojZXzC 4TjRK97XGFrI+jQiaOwKIcJvVMfhpnXib+t7el5Tp2tB7Gc2K3G5AqqgvGsdBeX+UmtA JMtHUfTrzAFGJkeWBn2HFaYe4/h8QF0S+3LEQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=SVmFAX9jiEKi8o1FCqUH4X5Rit8qzP39zLzCJrBT1XI=; b=t5pbNV7jmixfBx3Y2S3NFlXAeu/A6EKiyJhqOkpSpQYE03pSQc31kgm7BiPhmHbuA+ Lb/Fwk6vkpdkFcSDVJ8sKKunI80eECH1/Q/JTsAiGPxVXALBBLAT1iGvmdbEVIHGkhK/ 13hG7qNaRYlxN6OTtdDtu5OP+NU36WMxWfb8qQLQ9xwD8FBN3sNw5GzxID0FEB4R7Cdm CqCqwyaagwD2QooCNUstJe4GE+7FfxBvFRtyT8BcouanruyaJzKS0rWjljFw1eql68pV PqvKcWltg9/WNLQ6KwpU5OI47HDAx/yUxlQOfDk5NpNgrmfN+o5vBMj4gkNXR8mQVCeF HJOQ== X-Gm-Message-State: AIkVDXLYiZDsxNAryUyptvSdpqkF9EpAZ+sRzdJKaiDTH14UkT7fQuhypTrOI4GhQtIL1KkU X-Received: by 10.99.160.1 with SMTP id r1mr1603673pge.107.1482264651109; Tue, 20 Dec 2016 12:10:51 -0800 (PST) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id t20sm41080922pfk.48.2016.12.20.12.10.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Dec 2016 12:10:50 -0800 (PST) Date: Tue, 20 Dec 2016 12:10:49 -0800 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Geert Uytterhoeven , Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org Subject: [PATCH v2] video: fbdev: sh_mobile_lcdcfb: use designated initializers Message-ID: <20161220201049.GA18463@beast> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Reviewed-by: Geert Uytterhoeven --- v2: - vertical columns, Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index 82c0a8caa9b8..93469f94c09d 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -439,9 +439,9 @@ static unsigned long lcdc_sys_read_data(void *handle) } static struct sh_mobile_lcdc_sys_bus_ops sh_mobile_lcdc_sys_bus_ops = { - lcdc_sys_write_index, - lcdc_sys_write_data, - lcdc_sys_read_data, + .write_index = lcdc_sys_write_index, + .write_data = lcdc_sys_write_data, + .read_data = lcdc_sys_read_data, }; static int sh_mobile_lcdc_sginit(struct fb_info *info,