All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Juergen Gross <jgross@suse.com>, xen-devel@lists.xenproject.org
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"George Dunlap" <George.Dunlap@eu.citrix.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Daniel De Graaf" <dgdegra@tycho.nsa.gov>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH v5 3/8] xen: add basic hypervisor filesystem support
Date: Wed, 19 Feb 2020 16:47:26 +0000	[thread overview]
Message-ID: <f614ddb8-6e49-d302-f20c-2011abd9646d@xen.org> (raw)
In-Reply-To: <ac088c1e-0326-b72a-e1bf-582493e4e712@xen.org>



On 19/02/2020 16:26, Julien Grall wrote:
> 
> 
> On 19/02/2020 08:11, Juergen Gross wrote:
>> +int hypfs_write_bool(struct hypfs_entry_leaf *leaf,
>> +                     XEN_GUEST_HANDLE_PARAM(void) uaddr, unsigned 
>> long ulen)
>> +{
>> +    union {
>> +        char buf[8];
>> +        uint8_t u8;
>> +        uint16_t u16;
>> +        uint32_t u32;
>> +        uint64_t u64;
>> +    } u;
>> +
>> +    ASSERT(leaf->e.type == XEN_HYPFS_TYPE_UINT && leaf->e.size <= 8);
> 
> Shouldn't this be XEN_HYPFSW_TYPE_BOOL? But then, why are we allowing a 
> boolean parameter to be held in a 64-bit value?
> 
> IHMO, a boolean should really be hold in a bool and nothing else.

After sending my e-mail, I realized the size of the bool is 
implementation defined. However, I think my point stands, it would be 
better to have a fixed size for bool (i.e 1) and deny all the other use.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-02-19 16:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19  8:11 [Xen-devel] [PATCH v5 0/8] Add hypervisor sysfs-like support Juergen Gross
2020-02-19  8:11 ` [Xen-devel] [PATCH v5 1/8] xen: add a generic way to include binary files as variables Juergen Gross
2020-02-19 12:05   ` Wei Liu
2020-02-19  8:11 ` [Xen-devel] [PATCH v5 2/8] docs: add feature document for Xen hypervisor sysfs-like support Juergen Gross
2020-02-19  8:11 ` [Xen-devel] [PATCH v5 3/8] xen: add basic hypervisor filesystem support Juergen Gross
2020-02-19 15:49   ` Jan Beulich
2020-02-19 16:19     ` Julien Grall
2020-02-20  7:27     ` Jürgen Groß
2020-02-20  8:43       ` Jan Beulich
2020-02-20  9:07         ` Jürgen Groß
2020-02-19 16:26   ` Julien Grall
2020-02-19 16:47     ` Julien Grall [this message]
2020-02-20  7:29     ` Jürgen Groß
2020-02-19  8:11 ` [Xen-devel] [PATCH v5 4/8] libs: add libxenhypfs Juergen Gross
2020-02-19  8:11 ` [Xen-devel] [PATCH v5 5/8] tools: add xenfs tool Juergen Gross
2020-02-19  8:11 ` [Xen-devel] [PATCH v5 6/8] xen: provide version information in hypfs Juergen Gross
2020-02-19  8:11 ` [Xen-devel] [PATCH v5 7/8] xen: add /buildinfo/config entry to hypervisor filesystem Juergen Gross
2020-02-19 15:57   ` Jan Beulich
2020-02-20  6:13     ` Jürgen Groß
2020-02-19  8:11 ` [Xen-devel] [PATCH v5 8/8] xen: add runtime parameter access support to hypfs Juergen Gross
2020-02-19 16:44   ` Jan Beulich
2020-02-20  8:22     ` Jürgen Groß
2020-02-20  8:49       ` Jan Beulich
2020-02-20  9:11         ` Jürgen Groß

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f614ddb8-6e49-d302-f20c-2011abd9646d@xen.org \
    --to=julien@xen.org \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.