• Kees Cook's avatar
    randstruct: Whitelist NIU struct page overloading · 1854c19c
    Kees Cook authored
    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: default avatarKees Cook <keescook@chromium.org>
    1854c19c
randomize_layout_plugin.c 26.8 KB