From patchwork Thu Apr 6 21:18:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9668457 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 6F7B6602B3 for ; Thu, 6 Apr 2017 21:20:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAF57285A1 for ; Thu, 6 Apr 2017 21:20:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F860285E7; Thu, 6 Apr 2017 21:20:31 +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 B7246285A1 for ; Thu, 6 Apr 2017 21:20:30 +0000 (UTC) Received: (qmail 32084 invoked by uid 550); 6 Apr 2017 21:19:36 -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 29756 invoked from network); 6 Apr 2017 21:19:19 -0000 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=CyQFxRTTVagUjAyUty8Swg/2SliRci/q9Gw+QyKPq5k=; b=Sfg58YiOLfK1eQHU5KNTfE+PmzeqbyzFP9xKvluFXDyMnUXmWFmUmkcMtcUTnJ9VBr HFmLoWu68Fs1nZloQi+YYEzUEloOhd4LYlH9W6PRu9LF1GPPXj3+0NJUiRNiNOJvcQgY Xm+jx9aJclDUvJrg0H1UYSBjef3lK851baSLk= 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=CyQFxRTTVagUjAyUty8Swg/2SliRci/q9Gw+QyKPq5k=; b=B3fbL1UO7COohWuNgcCAsFt8MehrfHekYICiiqhGW9hv0IGx+4EJHhmvimhHAKS4TE XjonJh85gJHli4hHyfgURe66FYqF0Zc5kAPEowo5ovMsFOoAvo265QAel27vEdh1VOgP ySYZRgJYpzJPYaBwaReJkS+0N6kArBH99U8nhtFf7MgGh50TBuOdpMYsld+PymMkLVER 0SijCqzqXDAhFrPrGfKhSVS9LqbaLAO1OA+pyEVC6bGiSTLoUCgt7yCo+41UVWmcoadg lIBvpAsCFTW8LKGVIxKxoLaRUfVV9XyLdDy7o7AFcQyW1bu1kiq3gZXH8PxUiW/aDKTZ 0MxA== X-Gm-Message-State: AFeK/H2unUNXhCTc0co7+aFAhGRFoy+XM5Zc1JiqgPBaHNJMombVDTscpvGjOAqVGtdFH3vi X-Received: by 10.84.168.4 with SMTP id e4mr45296701plb.138.1491513547907; Thu, 06 Apr 2017 14:19:07 -0700 (PDT) From: Kees Cook To: kernel-hardening@lists.openwall.com Cc: Kees Cook , Michael Leibowitz Date: Thu, 6 Apr 2017 14:18:26 -0700 Message-Id: <1491513513-84351-12-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491513513-84351-1-git-send-email-keescook@chromium.org> References: <1491513513-84351-1-git-send-email-keescook@chromium.org> Subject: [kernel-hardening] [PATCH 11/18] scsi: qedi, qedf: Use designated initializers 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. For these cases, terminate the list with { }, which will be zero-filled, instead of undesignated NULLs. Signed-off-by: Kees Cook --- drivers/scsi/qedf/qedf_debugfs.c | 2 +- drivers/scsi/qedi/qedi_debugfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedf/qedf_debugfs.c b/drivers/scsi/qedf/qedf_debugfs.c index cb08b625c594..00a1d6405ebe 100644 --- a/drivers/scsi/qedf/qedf_debugfs.c +++ b/drivers/scsi/qedf/qedf_debugfs.c @@ -449,7 +449,7 @@ const struct file_operations qedf_dbg_fops[] = { qedf_dbg_fileops(qedf, clear_stats), qedf_dbg_fileops_seq(qedf, offload_stats), /* This must be last */ - { NULL, NULL }, + { }, }; #else /* CONFIG_DEBUG_FS */ diff --git a/drivers/scsi/qedi/qedi_debugfs.c b/drivers/scsi/qedi/qedi_debugfs.c index 59417199bf36..39d77818a677 100644 --- a/drivers/scsi/qedi/qedi_debugfs.c +++ b/drivers/scsi/qedi/qedi_debugfs.c @@ -240,5 +240,5 @@ const struct file_operations qedi_dbg_fops[] = { qedi_dbg_fileops_seq(qedi, gbl_ctx), qedi_dbg_fileops(qedi, do_not_recover), qedi_dbg_fileops_seq(qedi, io_trace), - { NULL, NULL }, + { }, };