Skip to content
  • Jan Glauber's avatar
    crypto: cavium - Fix fallout from CONFIG_VMAP_STACK · 072e8b1f
    Jan Glauber authored
    commit 37ff02ac
    
     upstream.
    
    Enabling virtual mapped kernel stacks breaks the thunderx_zip
    driver. On compression or decompression the executing CPU hangs
    in an endless loop. The reason for this is the usage of __pa
    by the driver which does no longer work for an address that is
    not part of the 1:1 mapping.
    
    The zip driver allocates a result struct on the stack and needs
    to tell the hardware the physical address within this struct
    that is used to signal the completion of the request.
    
    As the hardware gets the wrong address after the broken __pa
    conversion it writes to an arbitrary address. The zip driver then
    waits forever for the completion byte to contain a non-zero value.
    
    Allocating the result struct from 1:1 mapped memory resolves this
    bug.
    
    Signed-off-by: default avatarJan Glauber <jglauber@cavium.com>
    Reviewed-by: default avatarRobert Richter <rrichter@cavium.com>
    Cc: stable <stable@vger.kernel.org> # 4.14
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    072e8b1f