[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] libxl: drop dead assignments to "ret" from libxl__domain_config_setdefault()


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Mon, 12 Jun 2023 16:21:34 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686601297; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=DRLMWcPGvZ49P5QA0gEudmVxH7CjUhROX7mSUjvmDoI=; b=KDBVoNWri6nkT9crzxfBXwREtwPmbogboDecWTp8ygmTQwOoOE0K70qAQ7HOLTm576ouAnm0LgQlEu+hGSJd6XRmMSmxV5ym2oTYyDMk/nPMCIPAyRwIh3o9pnTS+iBt3KRJOOaWRRK6eZE9dTCONt/+/hXjgdfC6JgPMspXnb4=
  • Arc-seal: i=1; a=rsa-sha256; t=1686601297; cv=none; d=zohomail.com; s=zohoarc; b=MsIaz2rxeL6pZdJ45Ryom0GwgIcoXVbSfH5DCljDKmKwP0mlReLbeT8YxQQMBHSOBamA/swHFYuanVika2Iuxj1EsQHhRdAHGligbB/x6mbLTa651N6RdfN+Ipz3w/9lkZHO5B2q8li+0D9rNFGU2CuojXC3R3pt4fAhwl5riKU=
  • Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Mon, 12 Jun 2023 20:21:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 6/12/23 15:44, Daniel P. Smith wrote:
On 6/12/23 07:46, Jan Beulich wrote:
The variable needs to be properly set only on the error paths.

Coverity ID: 1532311
Fixes: ab4440112bec ("xl / libxl: push parsing of SSID and CPU pool ID down to libxl")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxx>

---
If XSM is disabled, is it really useful to issue the 2nd and 3rd calls
if the 1st yielded ENOSYS?

Would you be okay with the calls staying if instead on the first invocation of any libxl_flask_* method, flask status was checked and stored in a variable that would then be checked by any subsequent calls and immediately returned if flask was not enabled?

v/r,
dps

Looking closer I realized there is a slight flaw in the logic here. The first call is accomplished via an xsm_op call and then assumes that FLASK is the only XSM that has implemented the xsm hook, xsm_op, and that the result will be an ENOSYS. If someone decides to implement an xsm_op hook for any of the existing XSM modules or introduces a new XSM module that has an xsm_op hook, the return likely would not be ENOSYS. I have often debated if there should be a way to query which XSM module was loaded for instances just like this. The question is what mechanism would be best to do so.

v/r,
dps



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.