Skip to contentSkip to conversation

drivers/char: Fix build when CET-IBT is enabled

PATCH In review Andrew Cooper 4 participants 7 messages Sep 26, 2022 – Sep 27, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/char: Fix build when CET-IBT is enabled

https://gitlab.com/xen-project/xen/-/jobs/3083068950#L1763

Fixes 022e40edd4dc ("drivers/char: allow using both dbgp=xhci and dbgp=ehci")

---
CC: Jan Beulich <[email protected]>
CC: Marek Marczykowski-Górecki <[email protected]>
CC: Henry Wang <[email protected]>

---
 xen/drivers/char/ehci-dbgp.c | 2 +-
 xen/drivers/char/xhci-dbc.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
xen/drivers/char/ehci-dbgp.c +1 -1
index 8a0b95850609..bb9d3198d9f2 100644
@@ -1465,7 +1465,7 @@ static struct ehci_dbgp ehci_dbgp = { .state = dbgp_unsafe, .phys_port = 1 };
 
 static char __initdata opt_dbgp[30];
 
-static int __init parse_ehci_dbgp(const char *opt)
+static int __init cf_check parse_ehci_dbgp(const char *opt)
 {
     if ( strncmp(opt, "ehci", 4) )
         return 0;
xen/drivers/char/xhci-dbc.c +1 -1
index 5f92234a9594..43ed64a004e2 100644
@@ -1282,7 +1282,7 @@ struct dbc_dma_bufs {
 static struct dbc_dma_bufs __section(".bss.page_aligned") __aligned(PAGE_SIZE)
     dbc_dma_bufs;
 
-static int __init xhci_parse_dbgp(const char *opt_dbgp)
+static int __init cf_check xhci_parse_dbgp(const char *opt_dbgp)
 {
     struct dbc_uart *uart = &dbc_uart;
     struct dbc *dbc = &uart->dbc;
Signature · 1 line
2.11.0
#1 lore raw
Quoted 8 lines · Andrew Cooper

https://gitlab.com/xen-project/xen/-/jobs/3083068950#L1763

Fixes 022e40edd4dc ("drivers/char: allow using both dbgp=xhci and dbgp=ehci")

---
CC: Jan Beulich <[email protected]>
CC: Marek Marczykowski-Górecki <[email protected]>
CC: Henry Wang <[email protected]>

Sorry - forgot to tag For-4.17 in the subject.

~Andrew

Quoted 31 lines
---
 xen/drivers/char/ehci-dbgp.c | 2 +-
 xen/drivers/char/xhci-dbc.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
xen/drivers/char/ehci-dbgp.c +1 -1
index 8a0b95850609..bb9d3198d9f2 100644
@@ -1465,7 +1465,7 @@ static struct ehci_dbgp ehci_dbgp = { .state = dbgp_unsafe, .phys_port = 1 };
 
 static char __initdata opt_dbgp[30];
 
-static int __init parse_ehci_dbgp(const char *opt)
+static int __init cf_check parse_ehci_dbgp(const char *opt)
 {
     if ( strncmp(opt, "ehci", 4) )
         return 0;
xen/drivers/char/xhci-dbc.c +1 -1
index 5f92234a9594..43ed64a004e2 100644
@@ -1282,7 +1282,7 @@ struct dbc_dma_bufs {
 static struct dbc_dma_bufs __section(".bss.page_aligned") __aligned(PAGE_SIZE)
     dbc_dma_bufs;
 
-static int __init xhci_parse_dbgp(const char *opt_dbgp)
+static int __init cf_check xhci_parse_dbgp(const char *opt_dbgp)
 {
     struct dbc_uart *uart = &dbc_uart;
     struct dbc *dbc = &uart->dbc;
Reviewed-by on v1 1/1
#4 lore raw
In reply to Andrew Cooper
Quoted 4 lines · Andrew Cooper

https://gitlab.com/xen-project/xen/-/jobs/3083068950#L1763

Fixes 022e40edd4dc ("drivers/char: allow using both dbgp=xhci and dbgp=ehci")

I'm sorry for having missed this during review - we were well aware this is likely to be happening (and I'm quite certain it'll happen again). Any news on the status of the compiler side patch?

Jan

#5 lore raw
Quoted 6 lines · Jan Beulich
Quoted 4 lines · Andrew Cooper

https://gitlab.com/xen-project/xen/-/jobs/3083068950#L1763

Fixes 022e40edd4dc ("drivers/char: allow using both dbgp=xhci and dbgp=ehci")

Thanks.

Quoted 4 lines

I'm sorry for having missed this during review - we were well aware this is likely to be happening (and I'm quite certain it'll happen again). Any news on the status of the compiler side patch?

Nothing yet.  There are other more urgent fixes, and outstanding issues with this one (has false negatives through function pointer casts), and all bounded by no time.

~Andrew

#6 lore raw

Hi Jan and Andrew,

Quoted 6 lines

-----Original Message-----
From: Andrew Cooper <[email protected]>
Subject: Re: [PATCH] drivers/char: Fix build when CET-IBT is enabled

Quoted 1 line · Jan Beulich

On 26.09.2022 13:05, Andrew Cooper wrote:

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

https://gitlab.com/xen-project/xen/-/jobs/3083068950#L1763

Fixes 022e40edd4dc ("drivers/char: allow using both dbgp=xhci and

dbgp=ehci")

Quoted 1 line

Thanks.

I think this patch should definitely be merged in 4.17, do you agree?

Anyway, in case the release ack tag is needed:

Kind regards,
Henry