linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] arm: mm: Export __sync_icache_dcache() for xen-privcmd
@ 2019-04-13 16:30 Heinrich Schuchardt
  2019-04-15  5:51 ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2019-04-13 16:30 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, stable, Heinrich Schuchardt

This patch avoids
ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
observed when compiling v4.19.34.

The xen-privcmd driver, which can be modular, calls set_pte_at()
which in turn may call __sync_icache_dcache().

Cc: stable@vger.kernel.org
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 arch/arm/mm/flush.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 58469623b015..5345f86c56d2 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -295,6 +295,7 @@ void __sync_icache_dcache(pte_t pteval)
 	if (pte_exec(pteval))
 		__flush_icache_all();
 }
+EXPORT_SYMBOL_GPL(__sync_icache_dcache);
 #endif

 /*
--
2.20.1


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

* Re: [PATCH 1/1] arm: mm: Export __sync_icache_dcache() for xen-privcmd
  2019-04-13 16:30 [PATCH 1/1] arm: mm: Export __sync_icache_dcache() for xen-privcmd Heinrich Schuchardt
@ 2019-04-15  5:51 ` Christoph Hellwig
  2019-04-17  9:41   ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2019-04-15  5:51 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Russell King, linux-arm-kernel, linux-kernel, stable

On Sat, Apr 13, 2019 at 06:30:52PM +0200, Heinrich Schuchardt wrote:
> This patch avoids
> ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> observed when compiling v4.19.34.
> 
> The xen-privcmd driver, which can be modular, calls set_pte_at()
> which in turn may call __sync_icache_dcache().

Maybe that really is a sign that it should not be modular..

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

* Re: [PATCH 1/1] arm: mm: Export __sync_icache_dcache() for xen-privcmd
  2019-04-15  5:51 ` Christoph Hellwig
@ 2019-04-17  9:41   ` Russell King - ARM Linux admin
  2019-04-17 10:03     ` Catalin Marinas
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux admin @ 2019-04-17  9:41 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Heinrich Schuchardt, linux-arm-kernel, linux-kernel, stable

On Sun, Apr 14, 2019 at 10:51:09PM -0700, Christoph Hellwig wrote:
> On Sat, Apr 13, 2019 at 06:30:52PM +0200, Heinrich Schuchardt wrote:
> > This patch avoids
> > ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> > observed when compiling v4.19.34.
> > 
> > The xen-privcmd driver, which can be modular, calls set_pte_at()
> > which in turn may call __sync_icache_dcache().
> 
> Maybe that really is a sign that it should not be modular..

This issue has been discussed several times, and this URL gives a list
of all messages on linux-arm-kernel that mention __sync_icache_dcache:

https://archive.armlinux.org.uk/lurker/search/20380101.000000.00000000@ml:linux-arm-kernel,sb:__sync_icache_dcache.en.html

At the beginning of March, Boris Ostrovsky pointed that another solution
is available that does not need architecture private symbols to be
exported.

Since I've already said in a previous thread that I don't want this
function exported, it seems the way forward is pretty obvious.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

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

* Re: [PATCH 1/1] arm: mm: Export __sync_icache_dcache() for xen-privcmd
  2019-04-17  9:41   ` Russell King - ARM Linux admin
@ 2019-04-17 10:03     ` Catalin Marinas
  2019-04-17 10:31       ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2019-04-17 10:03 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: Christoph Hellwig, Heinrich Schuchardt, stable, linux-kernel,
	linux-arm-kernel, Arnd Bergmann

On Wed, Apr 17, 2019 at 10:41:37AM +0100, Russell King wrote:
> On Sun, Apr 14, 2019 at 10:51:09PM -0700, Christoph Hellwig wrote:
> > On Sat, Apr 13, 2019 at 06:30:52PM +0200, Heinrich Schuchardt wrote:
> > > This patch avoids
> > > ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> > > observed when compiling v4.19.34.
> > > 
> > > The xen-privcmd driver, which can be modular, calls set_pte_at()
> > > which in turn may call __sync_icache_dcache().
> > 
> > Maybe that really is a sign that it should not be modular..
> 
> This issue has been discussed several times, and this URL gives a list
> of all messages on linux-arm-kernel that mention __sync_icache_dcache:
> 
> https://archive.armlinux.org.uk/lurker/search/20380101.000000.00000000@ml:linux-arm-kernel,sb:__sync_icache_dcache.en.html
> 
> At the beginning of March, Boris Ostrovsky pointed that another solution
> is available that does not need architecture private symbols to be
> exported.
> 
> Since I've already said in a previous thread that I don't want this
> function exported, it seems the way forward is pretty obvious.

Arnd submitted a patch, not sure what happened to it:

https://lore.kernel.org/lkml/20190304204826.2414365-1-arnd@arndb.de/

I think this boils down to whether set_pte_at() is allowed to be called
from loadable modules. If yes, __sync_icache_dcache() needs exporting,
otherwise Arnd's patch makes the relevant code built-in (and, if merged,
I'm happy to revert the similar export on arm64).

-- 
Catalin

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

* Re: [PATCH 1/1] arm: mm: Export __sync_icache_dcache() for xen-privcmd
  2019-04-17 10:03     ` Catalin Marinas
@ 2019-04-17 10:31       ` Russell King - ARM Linux admin
  0 siblings, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux admin @ 2019-04-17 10:31 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Christoph Hellwig, Heinrich Schuchardt, stable, linux-kernel,
	linux-arm-kernel, Arnd Bergmann

On Wed, Apr 17, 2019 at 11:03:51AM +0100, Catalin Marinas wrote:
> On Wed, Apr 17, 2019 at 10:41:37AM +0100, Russell King wrote:
> > On Sun, Apr 14, 2019 at 10:51:09PM -0700, Christoph Hellwig wrote:
> > > On Sat, Apr 13, 2019 at 06:30:52PM +0200, Heinrich Schuchardt wrote:
> > > > This patch avoids
> > > > ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> > > > observed when compiling v4.19.34.
> > > > 
> > > > The xen-privcmd driver, which can be modular, calls set_pte_at()
> > > > which in turn may call __sync_icache_dcache().
> > > 
> > > Maybe that really is a sign that it should not be modular..
> > 
> > This issue has been discussed several times, and this URL gives a list
> > of all messages on linux-arm-kernel that mention __sync_icache_dcache:
> > 
> > https://archive.armlinux.org.uk/lurker/search/20380101.000000.00000000@ml:linux-arm-kernel,sb:__sync_icache_dcache.en.html
> > 
> > At the beginning of March, Boris Ostrovsky pointed that another solution
> > is available that does not need architecture private symbols to be
> > exported.
> > 
> > Since I've already said in a previous thread that I don't want this
> > function exported, it seems the way forward is pretty obvious.
> 
> Arnd submitted a patch, not sure what happened to it:
> 
> https://lore.kernel.org/lkml/20190304204826.2414365-1-arnd@arndb.de/

Thanks Catalin, this is the "another solution" that I referred to above.
(You'll find the exact same URL in Boris' email.)

> I think this boils down to whether set_pte_at() is allowed to be called
> from loadable modules. If yes, __sync_icache_dcache() needs exporting,
> otherwise Arnd's patch makes the relevant code built-in (and, if merged,
> I'm happy to revert the similar export on arm64).

I think I've clearly expressed my opinion on that.  Hence why "the way
forward is pretty obvious."  I don't understand why we still have the
problem.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

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

end of thread, other threads:[~2019-04-17 10:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-13 16:30 [PATCH 1/1] arm: mm: Export __sync_icache_dcache() for xen-privcmd Heinrich Schuchardt
2019-04-15  5:51 ` Christoph Hellwig
2019-04-17  9:41   ` Russell King - ARM Linux admin
2019-04-17 10:03     ` Catalin Marinas
2019-04-17 10:31       ` Russell King - ARM Linux admin

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).