Both are same now, but if length of nvdimm passphrase is changed to less than intel passphrase length, OOB access will happen
Signed-off-by: Li RongQing <[email protected]> --- drivers/acpi/nfit/intel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/nfit/intel.c b/drivers/acpi/nfit/intel.c index f70de71f79d6..9517fb0fd8b9 100644 --- a/drivers/acpi/nfit/intel.c +++ b/drivers/acpi/nfit/intel.c @@ -248,6 +248,8 @@ static int __maybe_unused intel_security_erase(struct nvdimm *nvdimm, }, }; + BUILD_BUG_ON(NVDIMM_PASSPHRASE_LEN < ND_INTEL_PASSPHRASE_SIZE); + if (!test_bit(cmd, &nfit_mem->dsm_mask)) return -ENOTTY; -- 2.16.2 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
