[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191122005311.GI25745@shell.armlinux.org.uk>
Date: Fri, 22 Nov 2019 00:53:12 +0000
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Pavel Tatashin <pasha.tatashin@...een.com>
Cc: Mark Rutland <mark.rutland@....com>,
Catalin Marinas <catalin.marinas@....com>, stefan@...er.ch,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Will Deacon <will@...nel.org>, boris.ostrovsky@...cle.com,
Sasha Levin <sashal@...nel.org>, sstabellini@...nel.org,
James Morris <jmorris@...ei.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
xen-devel@...ts.xenproject.org,
Vladimir Murzin <vladimir.murzin@....com>,
Marc Zyngier <marc.zyngier@....com>, alexios.zavras@...el.com,
Thomas Gleixner <tglx@...utronix.de>, allison@...utok.net,
jgross@...e.com, steve.capper@....com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>,
James Morse <james.morse@....com>, info@...ux.net
Subject: Re: [PATCH 1/3] arm/arm64/xen: use C inlines for privcmd_call
On Thu, Nov 21, 2019 at 07:39:22PM -0500, Pavel Tatashin wrote:
> > > That may be, but be very careful that you only use them in ARMv7-only
> > > code. Using them elsewhere is unsafe as the domain register is used
> > > for other purposes, and merely blatting over it (as your
> > > uaccess_enable and uaccess_disable functions do) is unsafe.
> >
> > In fact, I'll turn that into a bit more than a suggestion. I'll make
> > it a NAK on adding them to 32-bit ARM.
> >
>
> That's fine, and I also did not want to change ARM 32-bit. But, do you
> have a suggestion how differentiate between arm64 and arm in
> include/xen/arm/hypercall.h without ugly ifdefs?
Sorry, I don't.
I'm surprised ARM64 doesn't have anything like that, but I suspect
that's because they don't need to do a save/restore type operation.
Whereas, 32-bit ARM does very much need the save/restore behaviour
(although not in this path.)
The problem is, turning uaccess_enable/disable into C code means
that it's open to being used elsewhere in the kernel (ooh, a couple
of useful looking functions that work on both architectures! I can
use that too!) and then we end up with stuff breaking subtly. It's
the potential for subtle breakage that is making me NAK the idea of
adding the inline C functions.
Given the two have diverged, the only answer is ifdefs, sorry.
--
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
Powered by blists - more mailing lists