Bug 111511
Summary: | Potentially invalid TPM 2.0 mapping | ||
---|---|---|---|
Product: | Drivers | Reporter: | Jethro Beekman (kernel) |
Component: | Other | Assignee: | drivers_other |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | jarkko.sakkinen, yuv.adm |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.4.0 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Jethro Beekman
2016-01-29 23:08:32 UTC
Thanks for the dumps and reporting this! Root cause identified with 90% certainty. This should not be a critical bug or risk the driver stability. I'll test my assumption before stating anything further. In machines that I've tested 4.4 driver this does not occur although buffers that the driver maps do interleave. The reason for this is that in Linux 4.4 tpm_crb does not use devm_ioremap_resource() and therefore it does not add anything to iomem_resource tree. As we discussed in the ML control area falsely maps 0x1000 and surpasses a resource boundary. Jethro, is it too much trouble to you to test a fix I push it to my master branch? I don't have hardware where the mappings go like they go on your hardware. $ lsmod|grep tpm tpm_crb 16384 0 tpm_tis 20480 0 tpm 36864 2 tpm_crb,tpm_tis If I can test the fix with building just a module for my current kernel I'm happy to test it in the near future. If I need to build a full kernel it might be a while before I can get to it. (In reply to Jethro Beekman from comment #6) > $ lsmod|grep tpm > tpm_crb 16384 0 > tpm_tis 20480 0 > tpm 36864 2 tpm_crb,tpm_tis > > If I can test the fix with building just a module for my current kernel I'm > happy to test it in the near future. If I need to build a full kernel it > might be a while before I can get to it. Thank you, appreciate this! I have this project that is still WiP: http://git.infradead.org/users/jjs/buildroot-tpmdd.git The idea is to take my subsystem tree and bundle simple user space to initramfs and produce an image that you can write an USB stick. For this bug module compilation should be sufficient but in future this BR environment should provide much more convenient environment for peer testing so that one does not have hose her host environment... Chiming in here, would be happy to test any fix as it becomes available. I already have a setup for testing 4.5-rcX tree, so any patch on top of that would be easy for me to test. Although the buildroot-based option sounds nice and cozy as well :) This went from "working but potentially broken" in 4.4 to "doesn't work at all" in 4.7: tpm_crb MSFT0101:00: can't request region for resource [mem 0xfed40040-0xfed4103f] tpm_crb: probe of MSFT0101:00 failed with error -16 Building the 4.4 driver on 4.7 continues to work without issue (but does emit the original error message). Let me know if you need more information. It's actually a different regression even though the output looks the same :) Anyway, it looks like that the commit 422eac3f7dea did not make into 4.7. I really hope I had authority to close these bugs so that they don't get reused for different bugs. Anyway, thank you for your bug report. I'll try to get this fixed. I sent some days ago commit IDs to stable@vger.kernel.org for the fixes. Hopefully come to next 4.7 update. |