diff options
author | Kees Cook <keescook@chromium.org> | 2018-02-27 03:04:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-27 12:17:33 +0300 |
commit | c396a5bf457fb60159dcedbd4f48d53a62be030a (patch) | |
tree | 7204e7a8f557baf359c0788796658997614d8a58 /drivers/video/console/newport_con.c | |
parent | 209f668cd29d2b6b9f39a0b9f179ee40f47c2014 (diff) | |
download | linux-c396a5bf457fb60159dcedbd4f48d53a62be030a.tar.xz |
console: Expand dummy functions for CFI
This expands the no-op dummy functions into full prototypes to avoid
indirect call mismatches when running under Control Flow Integrity
checking, like with Clang's -fsanitize=cfi.
Co-Developed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/console/newport_con.c')
-rw-r--r-- | drivers/video/console/newport_con.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index 42d02a206059..6897bd0fc00e 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -673,14 +673,14 @@ static bool newport_scroll(struct vc_data *vc, unsigned int t, unsigned int b, return true; } -static int newport_dummy(struct vc_data *c) +static int newport_set_origin(struct vc_data *vc) { return 0; } -#define DUMMY (void *) newport_dummy +static void newport_save_screen(struct vc_data *vc) { } -const struct consw newport_con = { +static const struct consw newport_con = { .owner = THIS_MODULE, .con_startup = newport_startup, .con_init = newport_init, @@ -694,8 +694,8 @@ const struct consw newport_con = { .con_blank = newport_blank, .con_font_set = newport_font_set, .con_font_default = newport_font_default, - .con_set_origin = DUMMY, - .con_save_screen = DUMMY + .con_set_origin = newport_set_origin, + .con_save_screen = newport_save_screen }; static int newport_probe(struct gio_device *dev, |