diff options
author | Kees Cook <keescook@chromium.org> | 2018-02-26 16:04:20 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-27 10:17:33 +0100 |
commit | c396a5bf457fb60159dcedbd4f48d53a62be030a (patch) | |
tree | 7204e7a8f557baf359c0788796658997614d8a58 /drivers/video/console/newport_con.c | |
parent | 209f668cd29d2b6b9f39a0b9f179ee40f47c2014 (diff) | |
download | op-kernel-dev-c396a5bf457fb60159dcedbd4f48d53a62be030a.zip op-kernel-dev-c396a5bf457fb60159dcedbd4f48d53a62be030a.tar.gz |
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 42d02a2..6897bd0 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, |