diff mbox series

[for-4.18,2/2] golang: Fix bindings after XSA-443

Message ID 20231103194551.64448-3-jandryuk@gmail.com (mailing list archive)
State New, archived
Headers show
Series golang: Binding fixes | expand

Commit Message

Jason Andryuk Nov. 3, 2023, 7:45 p.m. UTC
The new bootloader_restrict and bootloader_user fields in the libxl idl
change the bindings.  Update them.

Fixes: 1f762642d2ca ("libxl: add support for running bootloader in restricted mode")
Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
---
 tools/golang/xenlight/helpers.gen.go | 9 +++++++++
 tools/golang/xenlight/types.gen.go   | 2 ++
 2 files changed, 11 insertions(+)

Comments

Henry Wang Nov. 4, 2023, 2:16 a.m. UTC | #1
Hi Jason,

> On Nov 4, 2023, at 03:45, Jason Andryuk <jandryuk@gmail.com> wrote:
> 
> The new bootloader_restrict and bootloader_user fields in the libxl idl
> change the bindings.  Update them.
> 
> Fixes: 1f762642d2ca ("libxl: add support for running bootloader in restricted mode")
> Signed-off-by: Jason Andryuk <jandryuk@gmail.com>

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Kind regards,
Henry

> ---
> tools/golang/xenlight/helpers.gen.go | 9 +++++++++
> tools/golang/xenlight/types.gen.go   | 2 ++
> 2 files changed, 11 insertions(+)
> 
> diff --git a/tools/golang/xenlight/helpers.gen.go b/tools/golang/xenlight/helpers.gen.go
> index 3ecffdf0ef..35e209ff1b 100644
> --- a/tools/golang/xenlight/helpers.gen.go
> +++ b/tools/golang/xenlight/helpers.gen.go
> @@ -1112,6 +1112,10 @@ x.Bootloader = C.GoString(xc.bootloader)
> if err := x.BootloaderArgs.fromC(&xc.bootloader_args);err != nil {
> return fmt.Errorf("converting field BootloaderArgs: %v", err)
> }
> +if err := x.BootloaderRestrict.fromC(&xc.bootloader_restrict);err != nil {
> +return fmt.Errorf("converting field BootloaderRestrict: %v", err)
> +}
> +x.BootloaderUser = C.GoString(xc.bootloader_user)
> x.TimerMode = TimerMode(xc.timer_mode)
> if err := x.NestedHvm.fromC(&xc.nested_hvm);err != nil {
> return fmt.Errorf("converting field NestedHvm: %v", err)
> @@ -1465,6 +1469,11 @@ xc.bootloader = C.CString(x.Bootloader)}
> if err := x.BootloaderArgs.toC(&xc.bootloader_args); err != nil {
> return fmt.Errorf("converting field BootloaderArgs: %v", err)
> }
> +if err := x.BootloaderRestrict.toC(&xc.bootloader_restrict); err != nil {
> +return fmt.Errorf("converting field BootloaderRestrict: %v", err)
> +}
> +if x.BootloaderUser != "" {
> +xc.bootloader_user = C.CString(x.BootloaderUser)}
> xc.timer_mode = C.libxl_timer_mode(x.TimerMode)
> if err := x.NestedHvm.toC(&xc.nested_hvm); err != nil {
> return fmt.Errorf("converting field NestedHvm: %v", err)
> diff --git a/tools/golang/xenlight/types.gen.go b/tools/golang/xenlight/types.gen.go
> index 6a9ebb3fec..7907aa8999 100644
> --- a/tools/golang/xenlight/types.gen.go
> +++ b/tools/golang/xenlight/types.gen.go
> @@ -577,6 +577,8 @@ DeviceTree string
> Acpi Defbool
> Bootloader string
> BootloaderArgs StringList
> +BootloaderRestrict Defbool
> +BootloaderUser string
> TimerMode TimerMode
> NestedHvm Defbool
> Apic Defbool
> -- 
> 2.41.0
>
George Dunlap Nov. 6, 2023, 11:41 a.m. UTC | #2
On Fri, Nov 3, 2023 at 7:46 PM Jason Andryuk <jandryuk@gmail.com> wrote:
>
> The new bootloader_restrict and bootloader_user fields in the libxl idl
> change the bindings.  Update them.
>
> Fixes: 1f762642d2ca ("libxl: add support for running bootloader in restricted mode")
> Signed-off-by: Jason Andryuk <jandryuk@gmail.com>

Acked-by: George Dunlap <george.dunlap@cloud.com>
George Dunlap Nov. 6, 2023, 11:53 a.m. UTC | #3
On Mon, Nov 6, 2023 at 11:41 AM George Dunlap <george.dunlap@cloud.com> wrote:
>
> On Fri, Nov 3, 2023 at 7:46 PM Jason Andryuk <jandryuk@gmail.com> wrote:
> >
> > The new bootloader_restrict and bootloader_user fields in the libxl idl
> > change the bindings.  Update them.
> >
> > Fixes: 1f762642d2ca ("libxl: add support for running bootloader in restricted mode")
> > Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
>
> Acked-by: George Dunlap <george.dunlap@cloud.com>

Also, as Jason pointed out in the cover letter, we probably want to
backport this patch; I'm not sure exactly who's in charge of that for
tools.

 -George
Jan Beulich Nov. 6, 2023, 12:15 p.m. UTC | #4
On 06.11.2023 12:53, George Dunlap wrote:
> On Mon, Nov 6, 2023 at 11:41 AM George Dunlap <george.dunlap@cloud.com> wrote:
>>
>> On Fri, Nov 3, 2023 at 7:46 PM Jason Andryuk <jandryuk@gmail.com> wrote:
>>>
>>> The new bootloader_restrict and bootloader_user fields in the libxl idl
>>> change the bindings.  Update them.
>>>
>>> Fixes: 1f762642d2ca ("libxl: add support for running bootloader in restricted mode")
>>> Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
>>
>> Acked-by: George Dunlap <george.dunlap@cloud.com>
> 
> Also, as Jason pointed out in the cover letter, we probably want to
> backport this patch; I'm not sure exactly who's in charge of that for
> tools.

I'll try to remember to pick this up once it has been committed.

Jan
diff mbox series

Patch

diff --git a/tools/golang/xenlight/helpers.gen.go b/tools/golang/xenlight/helpers.gen.go
index 3ecffdf0ef..35e209ff1b 100644
--- a/tools/golang/xenlight/helpers.gen.go
+++ b/tools/golang/xenlight/helpers.gen.go
@@ -1112,6 +1112,10 @@  x.Bootloader = C.GoString(xc.bootloader)
 if err := x.BootloaderArgs.fromC(&xc.bootloader_args);err != nil {
 return fmt.Errorf("converting field BootloaderArgs: %v", err)
 }
+if err := x.BootloaderRestrict.fromC(&xc.bootloader_restrict);err != nil {
+return fmt.Errorf("converting field BootloaderRestrict: %v", err)
+}
+x.BootloaderUser = C.GoString(xc.bootloader_user)
 x.TimerMode = TimerMode(xc.timer_mode)
 if err := x.NestedHvm.fromC(&xc.nested_hvm);err != nil {
 return fmt.Errorf("converting field NestedHvm: %v", err)
@@ -1465,6 +1469,11 @@  xc.bootloader = C.CString(x.Bootloader)}
 if err := x.BootloaderArgs.toC(&xc.bootloader_args); err != nil {
 return fmt.Errorf("converting field BootloaderArgs: %v", err)
 }
+if err := x.BootloaderRestrict.toC(&xc.bootloader_restrict); err != nil {
+return fmt.Errorf("converting field BootloaderRestrict: %v", err)
+}
+if x.BootloaderUser != "" {
+xc.bootloader_user = C.CString(x.BootloaderUser)}
 xc.timer_mode = C.libxl_timer_mode(x.TimerMode)
 if err := x.NestedHvm.toC(&xc.nested_hvm); err != nil {
 return fmt.Errorf("converting field NestedHvm: %v", err)
diff --git a/tools/golang/xenlight/types.gen.go b/tools/golang/xenlight/types.gen.go
index 6a9ebb3fec..7907aa8999 100644
--- a/tools/golang/xenlight/types.gen.go
+++ b/tools/golang/xenlight/types.gen.go
@@ -577,6 +577,8 @@  DeviceTree string
 Acpi Defbool
 Bootloader string
 BootloaderArgs StringList
+BootloaderRestrict Defbool
+BootloaderUser string
 TimerMode TimerMode
 NestedHvm Defbool
 Apic Defbool