public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org
Subject: Re: [PATCH v2] x86/floppy: use designated initializers
Date: Sun, 18 Dec 2016 09:00:28 +0100	[thread overview]
Message-ID: <20161218080028.GA18591@gmail.com> (raw)
In-Reply-To: <20161217213705.GA1248@beast>


* Kees Cook <keescook@chromium.org> wrote:

> 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 <keescook@chromium.org>
> ---
> v2:
>  - aligned rhs of initializer, ingo
> ---
>  arch/x86/include/asm/floppy.h | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h
> index 1c7eefe32502..202fe3e1fae8 100644
> --- a/arch/x86/include/asm/floppy.h
> +++ b/arch/x86/include/asm/floppy.h
> @@ -229,18 +229,18 @@ static struct fd_routine_l {
>  	int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
>  } fd_routine[] = {
>  	{
> -		request_dma,
> -		free_dma,
> -		get_dma_residue,
> -		dma_mem_alloc,
> -		hard_dma_setup
> +		._request_dma =		request_dma,
> +		._free_dma =		free_dma,
> +		._get_dma_residue =	get_dma_residue,
> +		._dma_mem_alloc =	dma_mem_alloc,
> +		._dma_setup =		hard_dma_setup
>  	},
>  	{
> -		vdma_request_dma,
> -		vdma_nop,
> -		vdma_get_dma_residue,
> -		vdma_mem_alloc,
> -		vdma_dma_setup
> +		._request_dma =		vdma_request_dma,
> +		._free_dma =		vdma_nop,
> +		._get_dma_residue =	vdma_get_dma_residue,
> +		._dma_mem_alloc =	vdma_mem_alloc,
> +		._dma_setup =		vdma_dma_setup

That's not how we organize named initializers, we do:

		._request_dma		= vdma_request_dma,
		._free_dma		= vdma_nop,
		._get_dma_residue	= vdma_get_dma_residue,
		._dma_mem_alloc		= vdma_mem_alloc,
		._dma_setup		= vdma_dma_setup

I have fixed up the patch.

Thanks,

	Ingo

  reply	other threads:[~2016-12-18  8:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17 21:37 [PATCH v2] x86/floppy: use designated initializers Kees Cook
2016-12-18  8:00 ` Ingo Molnar [this message]
2016-12-20 17:02   ` Kees Cook
2016-12-18  8:28 ` [tip:x86/urgent] x86/floppy: Use " tip-bot for Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161218080028.GA18591@gmail.com \
    --to=mingo@kernel.org \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox