Re: [PATCH v2] seccomp: Get actual errno value from failed seccomp functions

2022-10-27 Thread Daniel P . Berrangé
On Thu, Oct 27, 2022 at 02:55:02PM +0200, Michal Prívozník wrote: > On 10/26/22 14:33, Daniel P. Berrangé wrote: > > On Wed, Oct 26, 2022 at 09:30:24AM +0200, Michal Privoznik wrote: > >> Upon failure, a libseccomp API returns actual errno value very > >> rarely. Fortunately, after its commit 34bf7

Re: [PATCH v2] seccomp: Get actual errno value from failed seccomp functions

2022-10-27 Thread Michal Prívozník
On 10/26/22 14:33, Daniel P. Berrangé wrote: > On Wed, Oct 26, 2022 at 09:30:24AM +0200, Michal Privoznik wrote: >> Upon failure, a libseccomp API returns actual errno value very >> rarely. Fortunately, after its commit 34bf78ab (contained in >> 2.5.0 release), the SCMP_FLTATR_API_SYSRAWRC attribut

Re: [PATCH v2] seccomp: Get actual errno value from failed seccomp functions

2022-10-26 Thread Daniel P . Berrangé
On Wed, Oct 26, 2022 at 09:30:24AM +0200, Michal Privoznik wrote: > Upon failure, a libseccomp API returns actual errno value very > rarely. Fortunately, after its commit 34bf78ab (contained in > 2.5.0 release), the SCMP_FLTATR_API_SYSRAWRC attribute can be set > which makes subsequent APIs return

[PATCH v2] seccomp: Get actual errno value from failed seccomp functions

2022-10-26 Thread Michal Privoznik
Upon failure, a libseccomp API returns actual errno value very rarely. Fortunately, after its commit 34bf78ab (contained in 2.5.0 release), the SCMP_FLTATR_API_SYSRAWRC attribute can be set which makes subsequent APIs return true errno on failure. This is especially critical when seccomp_load() fa