Skip to contentSkip to conversation

It is a problem about device or resource busy when I use the tpm2-tools

tpm2 Sherry Zhang (BJ-RD) 2 participants 2 messages Nov 1, 2018

lore
Share & tools
lore

Sherry Zhang (BJ-RD)

author
#0 lore raw

Hi all,
The packages that I have installed(ubuntu16.04.2 with kernel-4.16.2) :

# install TSS itself
git clone https://github.com/tpm2-software/tpm2-tss.git
cd tpm2-tss
./bootstrap
./configure --enable-unit
make check
sudo make install

# Install abrmd itself
git clone https://github.com/tpm2-software/tpm2-abrmd.git
cd tpm2-abrmd
./bootstrap
./configure --enable-unit --with-dbuspolicydir=/etc/dbus-1/system.d dbus-launch make check
sudo make install

# Install tools itself
git clone https://github.com/tpm2-software/tpm2-tools.git
cd tpm2-tools
./bootstrap
./configure --enable-unit
make check
sudo make install
And I can see /dev/tpm0 and /dev/tpmrm0 with the the tpm_tis.ko in the kernel-4.16.2. But I have a problem as follows:
(1)#strace tpm2-abrmd --tcti="device:/dev/tpm0" --allow-root [cid:image001.png(a)01D471D2.AD346530]
(2)In a C program:

     fd = open("/dev/tpm0",O_RDWR);

result:
open("/dev/tpm0", O_RDWR) = -1 EBUSY (Device or resource busy)
So could someone give advice to me how to solve this problem?

?????
?????????????????????????????????????????????????????
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.

#1 lore raw
Quoted 58 lines · Sherry Zhang(BJ-RD)

Hi all,

The packages that I have installed(ubuntu16.04.2 with kernel-4.16.2) :

# install TSS itself

git clone https://github.com/tpm2-software/tpm2-tss.git

cd tpm2-tss

./bootstrap

./configure --enable-unit

make check

sudo make install

# Install abrmd itself

git clone https://github.com/tpm2-software/tpm2-abrmd.git

cd tpm2-abrmd

./bootstrap

./configure --enable-unit --with-dbuspolicydir=/etc/dbus-1/system.d

dbus-launch make check

sudo make install

# Install tools itself

git clone https://github.com/tpm2-software/tpm2-tools.git

cd tpm2-tools

./bootstrap

./configure --enable-unit

make check

sudo make install

And I can see /dev/tpm0 and /dev/tpmrm0 with the the tpm_tis.ko in the kernel-4.16.2.

But I have a problem as follows:

(1)#strace tpm2-abrmd --tcti="device:/dev/tpm0"  --allow-root

(2)In a C  program:

Quoted 7 lines

     fd = open("/dev/tpm0",O_RDWR);

*result:*

open("/dev/tpm0", O_RDWR)               = -1 EBUSY (Device or resource busy)

*So could someone give advice  to me how to solve this problem? *

Could you make sure that there isn't another instance of tpm2-abrmd running in the background already?

# systemctl status tpm2-abrmd
Signature · 1 line
Tadeusz