All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Ian Jackson <ian.jackson@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Julien Grall <jgrall@amazon.com>,
	George Dunlap <George.Dunlap@citrix.com>,
	"dfaggioli@suse.com" <dfaggioli@suse.com>,
	Christian Lindig <christian.lindig@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, David Scott <dave@recoil.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 0/8] Fix build with using OCaml 4.06.1 and -safe-string
Date: Wed, 1 Apr 2020 23:00:24 +0100	[thread overview]
Message-ID: <b90a8cb4-64a6-bda3-6d9f-3a962105455a@xen.org> (raw)
In-Reply-To: <24195.9951.944818.756019@mariner.uk.xensource.com>

Hi Ian,

On 31/03/2020 12:17, Ian Jackson wrote:
> Julien Grall writes ("[PATCH 0/8] Fix build with using OCaml 4.06.1 and -safe-string"):
>> This series is meant to solve the build issue reported by Dario when
>> using recent version of OCaml and -safe-string.
> 
> Thanks.  I have reviewed the C tools parts here.  I think the ocaml
> parts ought to have a review from someone familiar with the ocaml FFI.
> 
>> I took the opportunity to harden a bit more the code by using const more
>> often.
> 
> I approve.
> 
> Perhaps we should start building our C code with -Wwrite-strings,
> which makes "" have type const char* ?  Result would be a giant
> constification patch, probably.

So I thought I would give a try and see how far I can go:

    * hypervisor (xen): It is fairly easy to convert, although this is 
touching code that was imported from other projects (such as acpica). I 
need to have a look at whether other projects fixed there code and we 
can backport.
    * libxc: This is pretty trivial, I will send a patch for it
    * libxl: This is where it is getting tricky, the main issue is the 
flexarray framework as we would use it with string (now const char *). I 
thought we could make the interface const, but it looks like there are a 
couple of places where we need to modify the content (such as in 
libxl_json.c). I am not sure yet how to deal with it.

In any case, even if we can't use -Wwrite-strings, I can still send 
patches to use const in more places.

Cheers,

-- 
Julien Grall


  reply	other threads:[~2020-04-01 22:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 19:21 [Xen-devel] [PATCH 0/8] Fix build with using OCaml 4.06.1 and -safe-string Julien Grall
2020-03-30 19:21 ` [Xen-devel] [PATCH 1/8] xen/guest_access: Harden copy_to_guest_offset to prevent const dest operand Julien Grall
2020-03-31  7:26   ` Jan Beulich
2020-03-31 19:13     ` Julien Grall
2020-04-01  6:48       ` Jan Beulich
2020-04-01  8:53         ` Julien Grall
2020-04-01  9:25       ` Jan Beulich
2020-04-01 21:10         ` Julien Grall
2020-03-30 19:21 ` [Xen-devel] [PATCH 2/8] xen/public: sysctl: set_parameter.params and debug.keys should be const Julien Grall
2020-03-31  7:30   ` Jan Beulich
2020-04-01  9:53     ` Julien Grall
2020-03-30 19:21 ` [Xen-devel] [PATCH 3/8] tools/libxc: misc: Mark const the parameter 'keys' of xc_send_debug_keys() Julien Grall
2020-03-31 11:14   ` Ian Jackson
2020-03-30 19:21 ` [Xen-devel] [PATCH 4/8] tools/libxc: misc: Mark const the parameter 'params' of xc_set_parameters() Julien Grall
2020-03-31 11:14   ` Ian Jackson
2020-03-30 19:21 ` [Xen-devel] [PATCH 5/8] tools/ocaml: libxc: Check error return in stub_xc_vcpu_context_get() Julien Grall
2020-03-30 19:21 ` [Xen-devel] [PATCH 6/8] tools/ocaml: libxb: Harden stub_header_of_string() Julien Grall
2020-03-30 19:21 ` [Xen-devel] [PATCH 7/8] tools/ocaml: libxb: Avoid to use String_val() when value is bytes Julien Grall
2020-03-30 19:21 ` [Xen-devel] [PATCH 8/8] tools/ocaml: Fix stubs build when OCaml has been compiled with -safe-string Julien Grall
2020-03-31 11:17 ` [PATCH 0/8] Fix build with using OCaml 4.06.1 and -safe-string Ian Jackson
2020-04-01 22:00   ` Julien Grall [this message]
2020-04-16 11:25 ` Julien Grall
2020-04-16 13:25   ` Christian Lindig
2020-04-20 12:13     ` Julien Grall

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=b90a8cb4-64a6-bda3-6d9f-3a962105455a@xen.org \
    --to=julien@xen.org \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=christian.lindig@citrix.com \
    --cc=dave@recoil.org \
    --cc=dfaggioli@suse.com \
    --cc=ian.jackson@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgrall@amazon.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.