RE: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Hu, Jiayu
> -Original Message- > From: Maxime Coquelin > Sent: Tuesday, May 10, 2022 5:14 PM > To: Hu, Jiayu ; dev@dpdk.org; Xia, Chenbo > ; Ding, Xuan ; Jiang, Cheng1 > ; Pai G, Sunil ; > david.march...@redhat.com > Subject: Re: [PATCH] vhost: add runtime locking chec

Re: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Maxime Coquelin
2 4:25 PM To: dev@dpdk.org; Xia, Chenbo ; Ding, Xuan ; Hu, Jiayu ; Jiang, Cheng1 ; Pai G, Sunil ; david.march...@redhat.com Cc: Maxime Coquelin Subject: [PATCH] vhost: add runtime locking check in unsafe APIs This patch adds runtime checks in unsafe Vhost async APIs, to ensure the access lo

Re: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Maxime Coquelin
: add runtime locking check in unsafe APIs This patch adds runtime checks in unsafe Vhost async APIs, to ensure the access lock is taken. The detection won't work every time, as another thread could take the lock, but it would help to detect misuse of these unsafe API. Signed-off-by: M

RE: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Hu, Jiayu
ent: Tuesday, May 10, 2022 4:25 PM > To: dev@dpdk.org; Xia, Chenbo ; Ding, Xuan > ; Hu, Jiayu ; Jiang, Cheng1 > ; Pai G, Sunil ; > david.march...@redhat.com > Cc: Maxime Coquelin > Subject: [PATCH] vhost: add runtime locking check in unsafe APIs > > This patch adds runtim

RE: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Ding, Xuan
Hi Maxime, > -Original Message- > From: Maxime Coquelin > Sent: Tuesday, May 10, 2022 4:25 PM > To: dev@dpdk.org; Xia, Chenbo ; Ding, Xuan > ; Hu, Jiayu ; Jiang, Cheng1 > ; Pai G, Sunil ; > david.march...@redhat.com > Cc: Maxime Coquelin > Subject: [PATCH]

[PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Maxime Coquelin
This patch adds runtime checks in unsafe Vhost async APIs, to ensure the access lock is taken. The detection won't work every time, as another thread could take the lock, but it would help to detect misuse of these unsafe API. Signed-off-by: Maxime Coquelin --- lib/vhost/vhost.c | 18 ++