• Jon Bloomfield's avatar
    UBUNTU: SAUCE: i915_bpo: drm/i915: Add gen9 BCS cmdparsing · 1de10cfc
    Jon Bloomfield authored
    For gen9 we enable cmdparsing on the BCS ring, specifically
    to catch inadvertent accesses to sensitive registers
    
    Unlike gen7/hsw, we use the parser only to block certain
    registers. We can rely on h/w to block restricted commands,
    so the command tables only provide enough info to allow the
    parser to delineate each command, and identify commands that
    access registers.
    
    Note: This patch deliberately ignores checkpatch issues in
    favour of matching the style of the surrounding code. We'll
    correct the entire file in one go in a later patch.
    Signed-off-by: default avatarJon Bloomfield <jon.bloomfield@intel.com>
    Cc: Joonas Lahtinen <joonas.lahtinen@intel.com>
    Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
    
    CVE-2019-0155
    
    [tjaalton: backport to i915_bpo
     - intel_engine_cs struct members, variables got renamed s/ring/engine/,
       follow the same renaming here.
     - i915_cmd_parser_init_ring has changed since 4.4, so add gen9_blt_reg_tables
       and use it as on the patch for 4.15.
     - Use type safe register definitions.]
    Signed-off-by: default avatarTimo Aaltonen <timo.aaltonen@canonical.com>
    Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
    1de10cfc
i915_dma.c 45.2 KB