* [PATCH] video: use designated initializers
@ 2016-12-17 1:03 Kees Cook
2016-12-21 11:11 ` Bartlomiej Zolnierkiewicz
2016-12-21 11:18 ` Bartlomiej Zolnierkiewicz
0 siblings, 2 replies; 3+ messages in thread
From: Kees Cook @ 2016-12-17 1:03 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomi Valkeinen, Sudip Mukherjee, linux-fbdev
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>
---
drivers/video/fbdev/matrox/matroxfb_DAC1064.c | 10 ++++++++--
drivers/video/fbdev/matrox/matroxfb_Ti3026.c | 5 ++++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/matrox/matroxfb_DAC1064.c b/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
index a01147fdf270..5d896f879ff9 100644
--- a/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
+++ b/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
@@ -1088,14 +1088,20 @@ static void MGAG100_restore(struct matrox_fb_info *minfo)
#ifdef CONFIG_FB_MATROX_MYSTIQUE
struct matrox_switch matrox_mystique = {
- MGA1064_preinit, MGA1064_reset, MGA1064_init, MGA1064_restore,
+ .preinit = MGA1064_preinit,
+ .reset = MGA1064_reset,
+ .init = MGA1064_init,
+ .restore = MGA1064_restore,
};
EXPORT_SYMBOL(matrox_mystique);
#endif
#ifdef CONFIG_FB_MATROX_G
struct matrox_switch matrox_G100 = {
- MGAG100_preinit, MGAG100_reset, MGAG100_init, MGAG100_restore,
+ .preinit = MGAG100_preinit,
+ .reset = MGAG100_reset,
+ .init = MGAG100_init,
+ .restore = MGAG100_restore,
};
EXPORT_SYMBOL(matrox_G100);
#endif
diff --git a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
index 68fa037d8cbc..0273351b2342 100644
--- a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
+++ b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
@@ -738,7 +738,10 @@ static int Ti3026_preinit(struct matrox_fb_info *minfo)
}
struct matrox_switch matrox_millennium = {
- Ti3026_preinit, Ti3026_reset, Ti3026_init, Ti3026_restore
+ .preinit = Ti3026_preinit,
+ .reset = Ti3026_reset,
+ .init = Ti3026_init,
+ .restore = Ti3026_restore
};
EXPORT_SYMBOL(matrox_millennium);
#endif
--
2.7.4
--
Kees Cook
Nexus Security
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] video: use designated initializers
2016-12-17 1:03 [PATCH] video: use designated initializers Kees Cook
@ 2016-12-21 11:11 ` Bartlomiej Zolnierkiewicz
2016-12-21 11:18 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2016-12-21 11:11 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-kernel, Tomi Valkeinen, Sudip Mukherjee, linux-fbdev
Hi,
On Sat, Dec 17, 2016 at 2:03 AM, 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>
Please:
- fix patch subject line to "video: fbdev: matroxfb: ..."
- align the two columns vertically while at it
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
> ---
> drivers/video/fbdev/matrox/matroxfb_DAC1064.c | 10 ++++++++--
> drivers/video/fbdev/matrox/matroxfb_Ti3026.c | 5 ++++-
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/fbdev/matrox/matroxfb_DAC1064.c b/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
> index a01147fdf270..5d896f879ff9 100644
> --- a/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
> +++ b/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
> @@ -1088,14 +1088,20 @@ static void MGAG100_restore(struct matrox_fb_info *minfo)
>
> #ifdef CONFIG_FB_MATROX_MYSTIQUE
> struct matrox_switch matrox_mystique = {
> - MGA1064_preinit, MGA1064_reset, MGA1064_init, MGA1064_restore,
> + .preinit = MGA1064_preinit,
> + .reset = MGA1064_reset,
> + .init = MGA1064_init,
> + .restore = MGA1064_restore,
> };
> EXPORT_SYMBOL(matrox_mystique);
> #endif
>
> #ifdef CONFIG_FB_MATROX_G
> struct matrox_switch matrox_G100 = {
> - MGAG100_preinit, MGAG100_reset, MGAG100_init, MGAG100_restore,
> + .preinit = MGAG100_preinit,
> + .reset = MGAG100_reset,
> + .init = MGAG100_init,
> + .restore = MGAG100_restore,
> };
> EXPORT_SYMBOL(matrox_G100);
> #endif
> diff --git a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> index 68fa037d8cbc..0273351b2342 100644
> --- a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> +++ b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> @@ -738,7 +738,10 @@ static int Ti3026_preinit(struct matrox_fb_info *minfo)
> }
>
> struct matrox_switch matrox_millennium = {
> - Ti3026_preinit, Ti3026_reset, Ti3026_init, Ti3026_restore
> + .preinit = Ti3026_preinit,
> + .reset = Ti3026_reset,
> + .init = Ti3026_init,
> + .restore = Ti3026_restore
> };
> EXPORT_SYMBOL(matrox_millennium);
> #endif
> --
> 2.7.4
>
>
> --
> Kees Cook
> Nexus Security
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] video: use designated initializers
2016-12-17 1:03 [PATCH] video: use designated initializers Kees Cook
2016-12-21 11:11 ` Bartlomiej Zolnierkiewicz
@ 2016-12-21 11:18 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2016-12-21 11:18 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-kernel, Tomi Valkeinen, Sudip Mukherjee, linux-fbdev
[ sent from the right account this time, sorry for duplicate mail ]
Hi,
On Friday, December 16, 2016 05:03:09 PM 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.
Please:
- fix patch subject line to "video: fbdev: matroxfb: ..."
- align the two columns vertically while at it
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> drivers/video/fbdev/matrox/matroxfb_DAC1064.c | 10 ++++++++--
> drivers/video/fbdev/matrox/matroxfb_Ti3026.c | 5 ++++-
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/fbdev/matrox/matroxfb_DAC1064.c b/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
> index a01147fdf270..5d896f879ff9 100644
> --- a/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
> +++ b/drivers/video/fbdev/matrox/matroxfb_DAC1064.c
> @@ -1088,14 +1088,20 @@ static void MGAG100_restore(struct matrox_fb_info *minfo)
>
> #ifdef CONFIG_FB_MATROX_MYSTIQUE
> struct matrox_switch matrox_mystique = {
> - MGA1064_preinit, MGA1064_reset, MGA1064_init, MGA1064_restore,
> + .preinit = MGA1064_preinit,
> + .reset = MGA1064_reset,
> + .init = MGA1064_init,
> + .restore = MGA1064_restore,
> };
> EXPORT_SYMBOL(matrox_mystique);
> #endif
>
> #ifdef CONFIG_FB_MATROX_G
> struct matrox_switch matrox_G100 = {
> - MGAG100_preinit, MGAG100_reset, MGAG100_init, MGAG100_restore,
> + .preinit = MGAG100_preinit,
> + .reset = MGAG100_reset,
> + .init = MGAG100_init,
> + .restore = MGAG100_restore,
> };
> EXPORT_SYMBOL(matrox_G100);
> #endif
> diff --git a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> index 68fa037d8cbc..0273351b2342 100644
> --- a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> +++ b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> @@ -738,7 +738,10 @@ static int Ti3026_preinit(struct matrox_fb_info *minfo)
> }
>
> struct matrox_switch matrox_millennium = {
> - Ti3026_preinit, Ti3026_reset, Ti3026_init, Ti3026_restore
> + .preinit = Ti3026_preinit,
> + .reset = Ti3026_reset,
> + .init = Ti3026_init,
> + .restore = Ti3026_restore
> };
> EXPORT_SYMBOL(matrox_millennium);
> #endif
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-21 11:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-17 1:03 [PATCH] video: use designated initializers Kees Cook
2016-12-21 11:11 ` Bartlomiej Zolnierkiewicz
2016-12-21 11:18 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).