]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - block/sed-opal.c
block: sed-opal: check size of shadow mbr
authorJonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
Tue, 21 May 2019 20:46:46 +0000 (22:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 29 Jun 2019 16:34:08 +0000 (10:34 -0600)
commitff91064ea37c8323eba31cc3d2e22464f107b50d
treeeeb913dad6c21bd1e494b9404d0b845518743d35
parenta9b25b4cf2b76d320afc999f881ccb805fecdd84
block: sed-opal: check size of shadow mbr

Check whether the shadow mbr does fit in the provided space on the
target. Also a proper firmware should handle this case and return an
error we may prevent problems or even damage with crappy firmwares.

Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
Signed-off-by: David Kozub <zub@linux.fjfi.cvut.cz>
Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/opal_proto.h
block/sed-opal.c