On 11/8/26 12:15 PM, 铮 wrote:
Hi Stefan,

Thank you for the patch
("tpm: tpm_vtpm_proxy: Set STATE_OPENED_FLAG before inode is created").
We applied and tested it, and we have also reproduced the boot warning
Stefan reported and identified a sufficient condition for
it (running without KVM acceleration). Two findings first; "Where to
look" at the end points to the exact files in our repository.

1. Your patch does not change the outcome of the hang

[...]


v7.4-rc1 is affected as well: drivers/char/tpm/tpm_vtpm_proxy.c is
unchanged between v7.3.0 and v7.4-rc1 (empty diff), and the same
reproduction hangs there 1/1 (t=402s, same signature).

I have a hard time reading these .prog files. Are you closing the server side file descriptor you are getting back via the ioctl to /dev/tpm? Have a look below. If not, that could be the reason why its hanging. If you close it, it should clear the STATE_OPENED_FLAG and wake up any client waiting for a response.

/**
 * struct vtpm_proxy_new_dev - parameter structure for the
 *                             %VTPM_PROXY_IOC_NEW_DEV ioctl
 * @flags:      flags for the proxy TPM
 * @tpm_num:    index of the TPM device
 * @fd:         the file descriptor used by the proxy TPM
 * @major:      the major number of the TPM device
 * @minor:      the minor number of the TPM device
 */
struct vtpm_proxy_new_dev {
        __u32 flags;         /* input */
        __u32 tpm_num;       /* output */
        __u32 fd;            /* output */    <--- this one here
        __u32 major;         /* output */
        __u32 minor;         /* output */
};


  Stefan


Reply via email to