From: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org,
Bluecherry Maintainers <maintainers@bluecherrydvr.com>,
Ismael Luceno <ismael@iodev.co.uk>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, andrey_utkin@fastmail.com
Subject: Re: [PATCH] solo6x10: use designated initializers
Date: Mon, 19 Dec 2016 19:56:37 +0000 [thread overview]
Message-ID: <20161219195637.GA15652@dell-m4800> (raw)
In-Reply-To: <20161217010536.GA140725@beast>
On Fri, Dec 16, 2016 at 05:05:36PM -0800, Kees Cook 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.
Ok I've reviewed all the patchset, googled a bit and now I see what's
going on.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/pci/solo6x10/solo6x10-g723.c b/drivers/media/pci/solo6x10/solo6x10-g723.c
> index 6a35107aca25..36e93540bb49 100644
> --- a/drivers/media/pci/solo6x10/solo6x10-g723.c
> +++ b/drivers/media/pci/solo6x10/solo6x10-g723.c
> @@ -350,7 +350,7 @@ static int solo_snd_pcm_init(struct solo_dev *solo_dev)
>
> int solo_g723_init(struct solo_dev *solo_dev)
> {
> - static struct snd_device_ops ops = { NULL };
> + static struct snd_device_ops ops = { };
I'm not that keen on syntax subtleties, but...
* Empty initializer is not quite "designated" as I can judge.
* From brief googling I see that empty initializer is not valid in
some C standards.
Since `ops` is static, what about this?
For the variant given below, you have my signoff.
> --- a/drivers/media/pci/solo6x10/solo6x10-g723.c
> +++ b/drivers/media/pci/solo6x10/solo6x10-g723.c
> @@ -350,7 +350,7 @@ static int solo_snd_pcm_init(struct solo_dev *solo_dev)
>
> int solo_g723_init(struct solo_dev *solo_dev)
> {
> - static struct snd_device_ops ops = { NULL };
> + static struct snd_device_ops ops;
next prev parent reply other threads:[~2016-12-19 19:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-17 1:05 [PATCH] solo6x10: use designated initializers Kees Cook
2016-12-19 19:56 ` Andrey Utkin [this message]
2017-01-06 21:21 ` Kees Cook
2017-01-08 17:38 ` Andrey Utkin
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=20161219195637.GA15652@dell-m4800 \
--to=andrey.utkin@corp.bluecherry.net \
--cc=andrey_utkin@fastmail.com \
--cc=ismael@iodev.co.uk \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maintainers@bluecherrydvr.com \
--cc=mchehab@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