linux/scripts/gcc-plugins
Kees Cook 1854c19cae randstruct: Whitelist NIU struct page overloading
The NIU ethernet driver intentionally stores a page struct pointer on
top of the "mapping" field. Whitelist this case:

drivers/net/ethernet/sun/niu.c: In function ‘niu_rx_pkt_ignore’:
drivers/net/ethernet/sun/niu.c:3402:10: note: found mismatched ssa struct pointer types: ‘struct page’ and ‘struct address_space’

    *link = (struct page *) page->mapping;
    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
2017-06-22 16:21:43 -07:00
..
.gitignore gcc-plugins: Add the randstruct plugin 2017-06-22 16:15:45 -07:00
cyc_complexity_plugin.c
gcc-common.h gcc-plugins: Add the randstruct plugin 2017-06-22 16:15:45 -07:00
gcc-generate-gimple-pass.h
gcc-generate-ipa-pass.h
gcc-generate-rtl-pass.h
gcc-generate-simple_ipa-pass.h
gen-random-seed.sh gcc-plugins: Add the randstruct plugin 2017-06-22 16:15:45 -07:00
latent_entropy_plugin.c
Makefile gcc-plugins: Add the randstruct plugin 2017-06-22 16:15:45 -07:00
randomize_layout_plugin.c randstruct: Whitelist NIU struct page overloading 2017-06-22 16:21:43 -07:00
sancov_plugin.c
structleak_plugin.c