linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
@ 2019-09-06 15:39 Arnd Bergmann
  2019-09-06 15:55 ` [Xen-devel] " Andrew Cooper
  2019-10-01 17:38 ` Stefano Stabellini
  0 siblings, 2 replies; 11+ messages in thread
From: Arnd Bergmann @ 2019-09-06 15:39 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Arnd Bergmann, Emil Velikov, Denis Efremov, Masahiro Yamada,
	Russell King, xen-devel, linux-arm-kernel, linux-kernel

HYPERVISOR_platform_op() is an inline function and should not
be exported. Since commit 15bfc2348d54 ("modpost: check for
static EXPORT_SYMBOL* functions"), this causes a warning:

WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL

Remove the extraneous export.

Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/xen/enlighten.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 1e57692552d9..845c528acf24 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -437,7 +437,6 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op);
 EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op);
 EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op);
 EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op);
-EXPORT_SYMBOL_GPL(HYPERVISOR_platform_op);
 EXPORT_SYMBOL_GPL(HYPERVISOR_multicall);
 EXPORT_SYMBOL_GPL(HYPERVISOR_vm_assist);
 EXPORT_SYMBOL_GPL(HYPERVISOR_dm_op);
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-09-06 15:39 [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function Arnd Bergmann
@ 2019-09-06 15:55 ` Andrew Cooper
  2019-09-06 15:59   ` Jan Beulich
  2019-09-06 16:00   ` Arnd Bergmann
  2019-10-01 17:38 ` Stefano Stabellini
  1 sibling, 2 replies; 11+ messages in thread
From: Andrew Cooper @ 2019-09-06 15:55 UTC (permalink / raw)
  To: Arnd Bergmann, Stefano Stabellini
  Cc: Emil Velikov, Russell King, Denis Efremov, linux-kernel,
	Masahiro Yamada, xen-devel, linux-arm-kernel

On 06/09/2019 16:39, Arnd Bergmann wrote:
> HYPERVISOR_platform_op() is an inline function and should not
> be exported. Since commit 15bfc2348d54 ("modpost: check for
> static EXPORT_SYMBOL* functions"), this causes a warning:
>
> WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
>
> Remove the extraneous export.
>
> Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Something is wonky.  That symbol is (/ really ought to be) in the
hypercall page and most definitely not inline.

Which tree is that changeset from?  I can't find the SHA.

I hate to open a separate can of worms, but why are they tagged GPL? 
The Xen hypercall ABI, like the Linux syscall ABI, are specifically not
GPL.  Xen has as something very similar to (and probably derived from)
the Linux-syscall-note exception.

~Andrew

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-09-06 15:55 ` [Xen-devel] " Andrew Cooper
@ 2019-09-06 15:59   ` Jan Beulich
  2019-09-06 16:00   ` Arnd Bergmann
  1 sibling, 0 replies; 11+ messages in thread
From: Jan Beulich @ 2019-09-06 15:59 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Arnd Bergmann, Stefano Stabellini, Russell King, Emil Velikov,
	Denis Efremov, linux-arm-kernel, xen-devel, Masahiro Yamada,
	linux-kernel

On 06.09.2019 17:55, Andrew Cooper wrote:
> On 06/09/2019 16:39, Arnd Bergmann wrote:
>> HYPERVISOR_platform_op() is an inline function and should not
>> be exported. Since commit 15bfc2348d54 ("modpost: check for
>> static EXPORT_SYMBOL* functions"), this causes a warning:
>>
>> WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
>>
>> Remove the extraneous export.
>>
>> Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Something is wonky.  That symbol is (/ really ought to be) in the
> hypercall page and most definitely not inline.

It's HYPERVISOR_platform_op_raw that's in the hypercall page afaics.

Jan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-09-06 15:55 ` [Xen-devel] " Andrew Cooper
  2019-09-06 15:59   ` Jan Beulich
@ 2019-09-06 16:00   ` Arnd Bergmann
  2019-09-06 17:20     ` Andrew Cooper
  1 sibling, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2019-09-06 16:00 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Emil Velikov, Russell King, Denis Efremov,
	linux-kernel, Masahiro Yamada, xen-devel, Linux ARM

On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>
> On 06/09/2019 16:39, Arnd Bergmann wrote:
> > HYPERVISOR_platform_op() is an inline function and should not
> > be exported. Since commit 15bfc2348d54 ("modpost: check for
> > static EXPORT_SYMBOL* functions"), this causes a warning:
> >
> > WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
> >
> > Remove the extraneous export.
> >
> > Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Something is wonky.  That symbol is (/ really ought to be) in the
> hypercall page and most definitely not inline.
>
> Which tree is that changeset from?  I can't find the SHA.

This is from linux-next, I think from the kbuild tree.

       Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-09-06 16:00   ` Arnd Bergmann
@ 2019-09-06 17:20     ` Andrew Cooper
  2019-09-07 10:05       ` Julien Grall
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Cooper @ 2019-09-06 17:20 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stefano Stabellini, Emil Velikov, Russell King, Denis Efremov,
	linux-kernel, Masahiro Yamada, xen-devel, Linux ARM,
	Julien Grall

On 06/09/2019 17:00, Arnd Bergmann wrote:
> On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 06/09/2019 16:39, Arnd Bergmann wrote:
>>> HYPERVISOR_platform_op() is an inline function and should not
>>> be exported. Since commit 15bfc2348d54 ("modpost: check for
>>> static EXPORT_SYMBOL* functions"), this causes a warning:
>>>
>>> WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
>>>
>>> Remove the extraneous export.
>>>
>>> Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Something is wonky.  That symbol is (/ really ought to be) in the
>> hypercall page and most definitely not inline.
>>
>> Which tree is that changeset from?  I can't find the SHA.
> This is from linux-next, I think from the kbuild tree.

Thanks.

Julien/Stefano: Why are any of these hypercalls out-of-line?  ARM
doesn't use the hypercall page, and there is no argument translation
(not even in arm32 as there are no 5-argument hypercalls declared).

They'd surely be easier to implement with a few static inlines and some
common code, than to try and replicate the x86 side hypercall_page
interface ?

~Andrew

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-09-06 17:20     ` Andrew Cooper
@ 2019-09-07 10:05       ` Julien Grall
  2019-10-01 14:33         ` Mark Rutland
  0 siblings, 1 reply; 11+ messages in thread
From: Julien Grall @ 2019-09-07 10:05 UTC (permalink / raw)
  To: Andrew Cooper, Arnd Bergmann
  Cc: Stefano Stabellini, Emil Velikov, Russell King, Denis Efremov,
	linux-kernel, Masahiro Yamada, xen-devel, Linux ARM

Hi Andrew,

On 9/6/19 6:20 PM, Andrew Cooper wrote:
> On 06/09/2019 17:00, Arnd Bergmann wrote:
>> On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>> On 06/09/2019 16:39, Arnd Bergmann wrote:
>>>> HYPERVISOR_platform_op() is an inline function and should not
>>>> be exported. Since commit 15bfc2348d54 ("modpost: check for
>>>> static EXPORT_SYMBOL* functions"), this causes a warning:
>>>>
>>>> WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
>>>>
>>>> Remove the extraneous export.
>>>>
>>>> Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
>>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>> Something is wonky.  That symbol is (/ really ought to be) in the
>>> hypercall page and most definitely not inline.
>>>
>>> Which tree is that changeset from?  I can't find the SHA.
>> This is from linux-next, I think from the kbuild tree.
> 
> Thanks.
> 
> Julien/Stefano: Why are any of these hypercalls out-of-line?  ARM
> doesn't use the hypercall page, and there is no argument translation
> (not even in arm32 as there are no 5-argument hypercalls declared).

I am not sure how the hypercall page makes things different. You still 
have to store the arguments in the correct register so...

> 
> They'd surely be easier to implement with a few static inlines and some
> common code, than to try and replicate the x86 side hypercall_page
> interface ?

... I don't think they will be easier to implement with a few static 
inlines. The implementation will likely end up to be similar to 
arch/x86/asm/xen/hypercall.h.

Furthermore, one of the downside of per-arch static inline is it is more 
difficult to ensure the prototype match for all the architectures. 
Although, it might be possible to make them common by only requesting 
per-arch to implement HYPERCALL_N(...).

So I think the code is better as it is.

While looking at the code, I also realized that the implementation of 
HYPERCALL_dm_op might be incorrect for Arm32. Similarly do privcmd call, 
I think dm_op call should enable user access as they will be used by 
userspace.

We don't use dm_op on Arm so far, hence why I think this was unnoticed. 
I will see if I can reproduce it and send a patch.

Cheers,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-09-07 10:05       ` Julien Grall
@ 2019-10-01 14:33         ` Mark Rutland
  2019-10-01 14:39           ` Julien Grall
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Rutland @ 2019-10-01 14:33 UTC (permalink / raw)
  To: Julien Grall
  Cc: Andrew Cooper, Arnd Bergmann, Stefano Stabellini, Emil Velikov,
	Russell King, Denis Efremov, linux-kernel, Masahiro Yamada,
	xen-devel, Linux ARM, Will Deacon

Hi Julien,

On Sat, Sep 07, 2019 at 11:05:45AM +0100, Julien Grall wrote:
> On 9/6/19 6:20 PM, Andrew Cooper wrote:
> > On 06/09/2019 17:00, Arnd Bergmann wrote:
> > > On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> > > > On 06/09/2019 16:39, Arnd Bergmann wrote:
> > > > > HYPERVISOR_platform_op() is an inline function and should not
> > > > > be exported. Since commit 15bfc2348d54 ("modpost: check for
> > > > > static EXPORT_SYMBOL* functions"), this causes a warning:
> > > > > 
> > > > > WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
> > > > > 
> > > > > Remove the extraneous export.
> > > > > 
> > > > > Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
> > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > > Something is wonky.  That symbol is (/ really ought to be) in the
> > > > hypercall page and most definitely not inline.
> > > > 
> > > > Which tree is that changeset from?  I can't find the SHA.
> > > This is from linux-next, I think from the kbuild tree.
> > 
> > Thanks.
> > 
> > Julien/Stefano: Why are any of these hypercalls out-of-line?  ARM
> > doesn't use the hypercall page, and there is no argument translation
> > (not even in arm32 as there are no 5-argument hypercalls declared).
> 
> I am not sure how the hypercall page makes things different. You still have
> to store the arguments in the correct register so...
> 
> > 
> > They'd surely be easier to implement with a few static inlines and some
> > common code, than to try and replicate the x86 side hypercall_page
> > interface ?
> 
> ... I don't think they will be easier to implement with a few static
> inlines. The implementation will likely end up to be similar to
> arch/x86/asm/xen/hypercall.h.
> 
> Furthermore, one of the downside of per-arch static inline is it is more
> difficult to ensure the prototype match for all the architectures. Although,
> it might be possible to make them common by only requesting per-arch to
> implement HYPERCALL_N(...).
> 
> So I think the code is better as it is.
> 
> While looking at the code, I also realized that the implementation of
> HYPERCALL_dm_op might be incorrect for Arm32. Similarly do privcmd call, I
> think dm_op call should enable user access as they will be used by
> userspace.
> 
> We don't use dm_op on Arm so far, hence why I think this was unnoticed. I
> will see if I can reproduce it and send a patch.

I'm seeing this when building arm64 defconfig v5.4-rc1:

| [mark@lakrids:~/src/linux]% usekorg 8.1.0  make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -j56 -s
| arch/arm64/Makefile:62: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built
| WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
| WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL

I couldn't see a follow-up; do you have a patch for this?

Thanks,
Mark.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-10-01 14:33         ` Mark Rutland
@ 2019-10-01 14:39           ` Julien Grall
  2019-10-01 14:46             ` Mark Rutland
  0 siblings, 1 reply; 11+ messages in thread
From: Julien Grall @ 2019-10-01 14:39 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Stefano Stabellini, Arnd Bergmann, Andrew Cooper, Emil Velikov,
	Russell King, Denis Efremov, linux-kernel, Masahiro Yamada,
	xen-devel, Will Deacon, Linux ARM


On 01/10/2019 15:33, Mark Rutland wrote:
> Hi Julien,

Hi Mark,

> 
> On Sat, Sep 07, 2019 at 11:05:45AM +0100, Julien Grall wrote:
>> On 9/6/19 6:20 PM, Andrew Cooper wrote:
>>> On 06/09/2019 17:00, Arnd Bergmann wrote:
>>>> On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>>>> On 06/09/2019 16:39, Arnd Bergmann wrote:
>>>>>> HYPERVISOR_platform_op() is an inline function and should not
>>>>>> be exported. Since commit 15bfc2348d54 ("modpost: check for
>>>>>> static EXPORT_SYMBOL* functions"), this causes a warning:
>>>>>>
>>>>>> WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
>>>>>>
>>>>>> Remove the extraneous export.
>>>>>>
>>>>>> Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
>>>>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>>>> Something is wonky.  That symbol is (/ really ought to be) in the
>>>>> hypercall page and most definitely not inline.
>>>>>
>>>>> Which tree is that changeset from?  I can't find the SHA.
>>>> This is from linux-next, I think from the kbuild tree.
>>>
>>> Thanks.
>>>
>>> Julien/Stefano: Why are any of these hypercalls out-of-line?  ARM
>>> doesn't use the hypercall page, and there is no argument translation
>>> (not even in arm32 as there are no 5-argument hypercalls declared).
>>
>> I am not sure how the hypercall page makes things different. You still have
>> to store the arguments in the correct register so...
>>
>>>
>>> They'd surely be easier to implement with a few static inlines and some
>>> common code, than to try and replicate the x86 side hypercall_page
>>> interface ?
>>
>> ... I don't think they will be easier to implement with a few static
>> inlines. The implementation will likely end up to be similar to
>> arch/x86/asm/xen/hypercall.h.
>>
>> Furthermore, one of the downside of per-arch static inline is it is more
>> difficult to ensure the prototype match for all the architectures. Although,
>> it might be possible to make them common by only requesting per-arch to
>> implement HYPERCALL_N(...).
>>
>> So I think the code is better as it is.
>>
>> While looking at the code, I also realized that the implementation of
>> HYPERCALL_dm_op might be incorrect for Arm32. Similarly do privcmd call, I
>> think dm_op call should enable user access as they will be used by
>> userspace.
>>
>> We don't use dm_op on Arm so far, hence why I think this was unnoticed. I
>> will see if I can reproduce it and send a patch.
> 
> I'm seeing this when building arm64 defconfig v5.4-rc1:
> 
> | [mark@lakrids:~/src/linux]% usekorg 8.1.0  make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -j56 -s
> | arch/arm64/Makefile:62: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built
> | WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
> | WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
> 
> I couldn't see a follow-up; do you have a patch for this?

The first e-mail of the thread should contain a patch to address the warning 
(see [1]). But it is still waiting on an Ack from Stefano so it can get merged.

Cheers,

[1] https://patchwork.kernel.org/patch/11135601/

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-10-01 14:39           ` Julien Grall
@ 2019-10-01 14:46             ` Mark Rutland
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Rutland @ 2019-10-01 14:46 UTC (permalink / raw)
  To: Julien Grall, Stefano Stabellini
  Cc: Arnd Bergmann, Andrew Cooper, Emil Velikov, Russell King,
	Denis Efremov, linux-kernel, Masahiro Yamada, xen-devel,
	Will Deacon, Linux ARM

On Tue, Oct 01, 2019 at 03:39:41PM +0100, Julien Grall wrote:
> On 01/10/2019 15:33, Mark Rutland wrote:
> > On Sat, Sep 07, 2019 at 11:05:45AM +0100, Julien Grall wrote:
> > > On 9/6/19 6:20 PM, Andrew Cooper wrote:
> > > > On 06/09/2019 17:00, Arnd Bergmann wrote:
> > > > > On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> > > > > > On 06/09/2019 16:39, Arnd Bergmann wrote:
> > > > > > > HYPERVISOR_platform_op() is an inline function and should not
> > > > > > > be exported. Since commit 15bfc2348d54 ("modpost: check for
> > > > > > > static EXPORT_SYMBOL* functions"), this causes a warning:
> > > > > > > 
> > > > > > > WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
> > > > > > > 
> > > > > > > Remove the extraneous export.
> > > > > > > 
> > > > > > > Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
> > > > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>

[...]

> > > While looking at the code, I also realized that the implementation of
> > > HYPERCALL_dm_op might be incorrect for Arm32. Similarly do privcmd call, I
> > > think dm_op call should enable user access as they will be used by
> > > userspace.
> > > 
> > > We don't use dm_op on Arm so far, hence why I think this was unnoticed. I
> > > will see if I can reproduce it and send a patch.
> > 
> > I'm seeing this when building arm64 defconfig v5.4-rc1:
> > 
> > | [mark@lakrids:~/src/linux]% usekorg 8.1.0  make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -j56 -s
> > | arch/arm64/Makefile:62: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built
> > | WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
> > | WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
> > 
> > I couldn't see a follow-up; do you have a patch for this?
> 
> The first e-mail of the thread should contain a patch to address the warning
> (see [1]). But it is still waiting on an Ack from Stefano so it can get
> merged.

Ah, sorry. I misunderstood what you were planning to send a patch for,
and assumed you were going to propose an alternative to Arnd's patch.

Stefano, do you see any problem with Arnd's patch? If not, it would be
good to get this merged soon.

Thanks,
Mark.

> 
> Cheers,
> 
> [1] https://patchwork.kernel.org/patch/11135601/
> 
> -- 
> Julien Grall

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-09-06 15:39 [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function Arnd Bergmann
  2019-09-06 15:55 ` [Xen-devel] " Andrew Cooper
@ 2019-10-01 17:38 ` Stefano Stabellini
  2019-10-01 18:57   ` Arnd Bergmann
  1 sibling, 1 reply; 11+ messages in thread
From: Stefano Stabellini @ 2019-10-01 17:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stefano Stabellini, Emil Velikov, Denis Efremov, Masahiro Yamada,
	Russell King, xen-devel, linux-arm-kernel, linux-kernel,
	mark.rutland

On Fri, 6 Sep 2019, Arnd Bergmann wrote:
> HYPERVISOR_platform_op() is an inline function and should not
> be exported. Since commit 15bfc2348d54 ("modpost: check for
> static EXPORT_SYMBOL* functions"), this causes a warning:
> 
> WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
> 
> Remove the extraneous export.
> 
> Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/xen/enlighten.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> index 1e57692552d9..845c528acf24 100644
> --- a/arch/arm/xen/enlighten.c
> +++ b/arch/arm/xen/enlighten.c
> @@ -437,7 +437,6 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op);
> -EXPORT_SYMBOL_GPL(HYPERVISOR_platform_op);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_multicall);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_vm_assist);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_dm_op);

Hi Arnd, 

Thank you for the patch. HYPERVISOR_platform_op() is an inline function,
the underlying function that should be exported is
HYPERVISOR_platform_op_raw. So, instead of removing
HYPERVISOR_platform_op, we should change it to
HYPERVISOR_platform_op_raw.

For convenience, and for testing I cooked up a patch. Arnd, if you are
happy with it (in the sense that it solves your problem) we'll check it
in the xentip tree, unless you would like to get it in your tree?

Cheers,

Stefano

---

From: Stefano Stabellini <stefano.stabellini@xilinx.com>

HYPERVISOR_platform_op() is an inline function and should not
be exported. Since commit 15bfc2348d54 ("modpost: check for
static EXPORT_SYMBOL* functions"), this causes a warning:

WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL

Instead, export the underlying function called by the static inline:
HYPERVISOR_platform_op_raw.

Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>

diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 1e57692552d9..522c97d43ef8 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -437,7 +437,7 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op);
 EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op);
 EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op);
 EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op);
-EXPORT_SYMBOL_GPL(HYPERVISOR_platform_op);
+EXPORT_SYMBOL_GPL(HYPERVISOR_platform_op_raw);
 EXPORT_SYMBOL_GPL(HYPERVISOR_multicall);
 EXPORT_SYMBOL_GPL(HYPERVISOR_vm_assist);
 EXPORT_SYMBOL_GPL(HYPERVISOR_dm_op);

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function
  2019-10-01 17:38 ` Stefano Stabellini
@ 2019-10-01 18:57   ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2019-10-01 18:57 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Emil Velikov, Denis Efremov, Masahiro Yamada, Russell King,
	xen-devel, Linux ARM, linux-kernel, Mark Rutland

On Tue, Oct 1, 2019 at 7:38 PM Stefano Stabellini
<sstabellini@kernel.org> wrote:

> Thank you for the patch. HYPERVISOR_platform_op() is an inline function,
> the underlying function that should be exported is
> HYPERVISOR_platform_op_raw. So, instead of removing
> HYPERVISOR_platform_op, we should change it to
> HYPERVISOR_platform_op_raw.

Ok, that makes sense.

> For convenience, and for testing I cooked up a patch. Arnd, if you are
> happy with it (in the sense that it solves your problem) we'll check it
> in the xentip tree, unless you would like to get it in your tree?
>

Please merge it through your tree.

> @@ -437,7 +437,7 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op);
> -EXPORT_SYMBOL_GPL(HYPERVISOR_platform_op);
> +EXPORT_SYMBOL_GPL(HYPERVISOR_platform_op_raw);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_multicall);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_vm_assist);
>  EXPORT_SYMBOL_GPL(HYPERVISOR_dm_op);

Note that there are obviously no callers from any loadable modules in the
kernel, all users are in built-in code at the moment. As an API definition
it still makes sense though.

      Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-10-01 18:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 15:39 [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function Arnd Bergmann
2019-09-06 15:55 ` [Xen-devel] " Andrew Cooper
2019-09-06 15:59   ` Jan Beulich
2019-09-06 16:00   ` Arnd Bergmann
2019-09-06 17:20     ` Andrew Cooper
2019-09-07 10:05       ` Julien Grall
2019-10-01 14:33         ` Mark Rutland
2019-10-01 14:39           ` Julien Grall
2019-10-01 14:46             ` Mark Rutland
2019-10-01 17:38 ` Stefano Stabellini
2019-10-01 18:57   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).