All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Konovalov <andreyknvl@google.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: linux-mips@linux-mips.org, linux-sh@vger.kernel.org,
	Lee Smith <Lee.Smith@arm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Will Deacon <will.deacon@arm.com>,
	Paul Mackerras <paulus@samba.org>, Shaohua Li <shli@fb.com>,
	linux-arch@vger.kernel.org, Jacob Bramley <Jacob.Bramley@arm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"James E . J . Bottomley" <jejb@parisc-linux.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Matt Turner <mattst88@gmail.com>,
	Evgeniy Stepanov <eugenis@google.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	adi-buildroot-devel@lists.sourceforge.net,
	Mike Rapoport <rppt@linux.vnet.ibm.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Richard Henderson <rth@twiddle.net>,
	linux-cris-kernel@axis.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel
Subject: Re: [RFC PATCH 6/6] arch: add untagged_addr definition for other arches
Date: Fri, 9 Mar 2018 16:47:23 +0100	[thread overview]
Message-ID: <CAAeHK+y=_imh4uNSAg_vj3DLAeDLcVP3a4f79dNMW=Ot5oLiZQ@mail.gmail.com> (raw)
In-Reply-To: <b320ff92-43ae-a479-35aa-4257b9c5430e@arm.com>

On Fri, Mar 9, 2018 at 3:16 PM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 09/03/18 14:02, Andrey Konovalov wrote:
>>
>> To allow arm64 syscalls accept tagged pointers from userspace, we must
>> untag them when they are passed to the kernel. Since untagging is done in
>> generic parts of the kernel (like the mm subsystem), the untagged_addr
>> macro should be defined for all architectures.
>
>
> Would it not suffice to have an "#ifndef untagged_addr..." fallback in
> linux/uaccess.h?
>

Hi Robin!

This approach is much better, I'll try it. This will also solve the
merge issues that Arnd mentioned.

Thanks!

WARNING: multiple messages have this Message-ID (diff)
From: Andrey Konovalov <andreyknvl@google.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: "Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will.deacon@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Philippe Ombredanne" <pombredanne@nexb.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Kate Stewart" <kstewart@linuxfoundation.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>,
	"Minchan Kim" <minchan@kernel.org>,
	"Michal Hocko" <mhocko@suse.com>, "Shaohua Li" <shli@fb.com>,
	"Andrea Arcangeli" <aarcange@redhat.com>,
	"Anshuman Khandual" <khandual@linux.vnet.ibm.com>,
	"Mike Rapoport" <rppt@linux.vnet.ibm.com>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Naoya Horiguchi" <n-horiguchi@ah.jp.nec.com>,
	"Shakeel Butt" <shakeelb@google.com>,
	"Joonsoo Kim" <iamjoonsoo.kim@lge.com>,
	"Hugh Dickins" <hughd@google.com>,
	"Mel Gorman" <mgorman@techsingularity.net>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Mike Kravetz" <mike.kravetz@oracle.com>,
	"Zi Yan" <zi.yan@cs.rutgers.edu>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Linux Memory Management List" <linux-mm@kvack.org>,
	"Richard Henderson" <rth@twiddle.net>,
	"Ivan Kokshaysky" <ink@jurassic.park.msu.ru>,
	"Matt Turner" <mattst88@gmail.com>,
	"Vineet Gupta" <vgupta@synopsys.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Mark Salter" <msalter@redhat.com>,
	"Aurelien Jacquiot" <jacquiot.aurelien@gmail.com>,
	"Mikael Starvik" <starvik@axis.com>,
	"Jesper Nilsson" <jesper.nilsson@axis.com>,
	"Tony Luck" <tony.luck@intel.com>,
	"Fenghua Yu" <fenghua.yu@intel.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"James Hogan" <jhogan@kernel.org>,
	"Michal Simek" <monstr@monstr.eu>,
	"Ralf Baechle" <ralf@linux-mips.org>,
	"David Howells" <dhowells@redhat.com>,
	"Ley Foon Tan" <lftan@altera.com>,
	"Jonas Bonn" <jonas@southpole.se>,
	"Stefan Kristiansson" <stefan.kristiansson@saunalahti.fi>,
	"Stafford Horne" <shorne@gmail.com>,
	"James E . J . Bottomley" <jejb@parisc-linux.org>,
	"Helge Deller" <deller@gmx.de>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Paul Mackerras" <paulus@samba.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Palmer Dabbelt" <palmer@sifive.com>,
	"Albert Ou" <albert@sifive.com>,
	"Chen Liqin" <liqin.linux@gmail.com>,
	"Lennox Wu" <lennox.wu@gmail.com>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Rich Felker" <dalias@libc.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Ingo Molnar" <mingo@redhat.com>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	"Chris Zankel" <chris@zankel.net>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org,
	adi-buildroot-devel@lists.sourceforge.net,
	linux-c6x-dev@linux-c6x.org, linux-cris-kernel@axis.com,
	linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org,
	linux-metag@vger.kernel.org, linux-mips@linux-mips.org,
	linux-am33-list@redhat.com, nios2-dev@lists.rocketboards.org,
	openrisc@lists.librecores.org, linux-parisc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
	linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
	linux-xtensa@linux-xtensa.org, linux-arch@vger.kernel.org,
	"Dmitry Vyukov" <dvyukov@google.com>,
	"Kostya Serebryany" <kcc@google.com>,
	"Evgeniy Stepanov" <eugenis@google.com>,
	"Lee Smith" <Lee.Smith@arm.com>,
	"Ramana Radhakrishnan" <Ramana.Radhakrishnan@arm.com>,
	"Jacob Bramley" <Jacob.Bramley@arm.com>,
	"Ruben Ayrapetyan" <Ruben.Ayrapetyan@arm.com>
Subject: Re: [RFC PATCH 6/6] arch: add untagged_addr definition for other arches
Date: Fri, 9 Mar 2018 16:47:23 +0100	[thread overview]
Message-ID: <CAAeHK+y=_imh4uNSAg_vj3DLAeDLcVP3a4f79dNMW=Ot5oLiZQ@mail.gmail.com> (raw)
In-Reply-To: <b320ff92-43ae-a479-35aa-4257b9c5430e@arm.com>

On Fri, Mar 9, 2018 at 3:16 PM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 09/03/18 14:02, Andrey Konovalov wrote:
>>
>> To allow arm64 syscalls accept tagged pointers from userspace, we must
>> untag them when they are passed to the kernel. Since untagging is done in
>> generic parts of the kernel (like the mm subsystem), the untagged_addr
>> macro should be defined for all architectures.
>
>
> Would it not suffice to have an "#ifndef untagged_addr..." fallback in
> linux/uaccess.h?
>

Hi Robin!

This approach is much better, I'll try it. This will also solve the
merge issues that Arnd mentioned.

Thanks!

WARNING: multiple messages have this Message-ID (diff)
From: Andrey Konovalov <andreyknvl@google.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: linux-mips@linux-mips.org, linux-sh@vger.kernel.org,
	Lee Smith <Lee.Smith@arm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Will Deacon <will.deacon@arm.com>,
	Paul Mackerras <paulus@samba.org>, Shaohua Li <shli@fb.com>,
	linux-arch@vger.kernel.org, Jacob Bramley <Jacob.Bramley@arm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"James E . J . Bottomley" <jejb@parisc-linux.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Matt Turner <mattst88@gmail.com>,
	Evgeniy Stepanov <eugenis@google.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	adi-buildroot-devel@lists.sourceforge.net,
	Mike Rapoport <rppt@linux.vnet.ibm.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Richard Henderson <rth@twiddle.net>,
	linux-cris-kernel@axis.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel>
Subject: Re: [RFC PATCH 6/6] arch: add untagged_addr definition for other arches
Date: Fri, 9 Mar 2018 16:47:23 +0100	[thread overview]
Message-ID: <CAAeHK+y=_imh4uNSAg_vj3DLAeDLcVP3a4f79dNMW=Ot5oLiZQ@mail.gmail.com> (raw)
In-Reply-To: <b320ff92-43ae-a479-35aa-4257b9c5430e@arm.com>

On Fri, Mar 9, 2018 at 3:16 PM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 09/03/18 14:02, Andrey Konovalov wrote:
>>
>> To allow arm64 syscalls accept tagged pointers from userspace, we must
>> untag them when they are passed to the kernel. Since untagging is done in
>> generic parts of the kernel (like the mm subsystem), the untagged_addr
>> macro should be defined for all architectures.
>
>
> Would it not suffice to have an "#ifndef untagged_addr..." fallback in
> linux/uaccess.h?
>

Hi Robin!

This approach is much better, I'll try it. This will also solve the
merge issues that Arnd mentioned.

Thanks!

WARNING: multiple messages have this Message-ID (diff)
From: andreyknvl@google.com (Andrey Konovalov)
To: linux-riscv@lists.infradead.org
Subject: [RFC PATCH 6/6] arch: add untagged_addr definition for other arches
Date: Fri, 9 Mar 2018 16:47:23 +0100	[thread overview]
Message-ID: <CAAeHK+y=_imh4uNSAg_vj3DLAeDLcVP3a4f79dNMW=Ot5oLiZQ@mail.gmail.com> (raw)
In-Reply-To: <b320ff92-43ae-a479-35aa-4257b9c5430e@arm.com>

On Fri, Mar 9, 2018 at 3:16 PM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 09/03/18 14:02, Andrey Konovalov wrote:
>>
>> To allow arm64 syscalls accept tagged pointers from userspace, we must
>> untag them when they are passed to the kernel. Since untagging is done in
>> generic parts of the kernel (like the mm subsystem), the untagged_addr
>> macro should be defined for all architectures.
>
>
> Would it not suffice to have an "#ifndef untagged_addr..." fallback in
> linux/uaccess.h?
>

Hi Robin!

This approach is much better, I'll try it. This will also solve the
merge issues that Arnd mentioned.

Thanks!

WARNING: multiple messages have this Message-ID (diff)
From: andreyknvl@google.com (Andrey Konovalov)
To: linux-snps-arc@lists.infradead.org
Subject: [RFC PATCH 6/6] arch: add untagged_addr definition for other arches
Date: Fri, 9 Mar 2018 16:47:23 +0100	[thread overview]
Message-ID: <CAAeHK+y=_imh4uNSAg_vj3DLAeDLcVP3a4f79dNMW=Ot5oLiZQ@mail.gmail.com> (raw)
In-Reply-To: <b320ff92-43ae-a479-35aa-4257b9c5430e@arm.com>

On Fri, Mar 9, 2018@3:16 PM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 09/03/18 14:02, Andrey Konovalov wrote:
>>
>> To allow arm64 syscalls accept tagged pointers from userspace, we must
>> untag them when they are passed to the kernel. Since untagging is done in
>> generic parts of the kernel (like the mm subsystem), the untagged_addr
>> macro should be defined for all architectures.
>
>
> Would it not suffice to have an "#ifndef untagged_addr..." fallback in
> linux/uaccess.h?
>

Hi Robin!

This approach is much better, I'll try it. This will also solve the
merge issues that Arnd mentioned.

Thanks!

WARNING: multiple messages have this Message-ID (diff)
From: Andrey Konovalov <andreyknvl@google.com>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [RFC PATCH 6/6] arch: add untagged_addr definition for other arches
Date: Fri, 9 Mar 2018 16:47:23 +0100	[thread overview]
Message-ID: <CAAeHK+y=_imh4uNSAg_vj3DLAeDLcVP3a4f79dNMW=Ot5oLiZQ@mail.gmail.com> (raw)
In-Reply-To: <b320ff92-43ae-a479-35aa-4257b9c5430e@arm.com>

On Fri, Mar 9, 2018 at 3:16 PM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 09/03/18 14:02, Andrey Konovalov wrote:
>>
>> To allow arm64 syscalls accept tagged pointers from userspace, we must
>> untag them when they are passed to the kernel. Since untagging is done in
>> generic parts of the kernel (like the mm subsystem), the untagged_addr
>> macro should be defined for all architectures.
>
>
> Would it not suffice to have an "#ifndef untagged_addr..." fallback in
> linux/uaccess.h?
>

Hi Robin!

This approach is much better, I'll try it. This will also solve the
merge issues that Arnd mentioned.

Thanks!

  reply	other threads:[~2018-03-09 15:47 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 14:01 [RFC PATCH 0/6] arm64: untag user pointers passed to the kernel Andrey Konovalov
2018-03-09 14:01 ` [OpenRISC] " Andrey Konovalov
2018-03-09 14:01 ` Andrey Konovalov
2018-03-09 14:01 ` Andrey Konovalov
2018-03-09 14:01 ` [RFC PATCH 1/6] arm64: add type casts to untagged_addr macro Andrey Konovalov
2018-03-09 14:01   ` [OpenRISC] " Andrey Konovalov
2018-03-09 14:01   ` Andrey Konovalov
2018-03-09 14:01   ` Andrey Konovalov
2018-03-09 14:02 ` [RFC PATCH 2/6] arm64: untag user addresses in copy_from_user and others Andrey Konovalov
2018-03-09 14:02   ` [OpenRISC] " Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 15:03   ` Mark Rutland
2018-03-09 15:03     ` Mark Rutland
2018-03-09 15:58     ` Catalin Marinas
2018-03-09 15:58       ` Catalin Marinas
2018-03-09 15:58       ` Catalin Marinas
2018-03-09 15:58       ` Catalin Marinas
2018-03-09 17:57       ` Andrey Konovalov
2018-03-09 17:57         ` Andrey Konovalov
2018-03-09 14:02 ` [RFC PATCH 3/6] mm, arm64: untag user addresses in memory syscalls Andrey Konovalov
2018-03-09 14:02   ` [OpenRISC] " Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 15:53   ` Catalin Marinas
2018-03-09 15:53     ` Catalin Marinas
2018-03-09 17:31     ` Andrey Konovalov
2018-03-09 17:31       ` Andrey Konovalov
2018-03-09 17:42       ` Evgenii Stepanov
2018-03-09 17:42         ` Evgenii Stepanov
2018-03-14 15:45         ` Andrey Konovalov
2018-03-14 15:45           ` Andrey Konovalov
2018-03-14 17:44           ` Catalin Marinas
2018-03-14 17:44             ` Catalin Marinas
2018-03-16  1:11             ` Evgenii Stepanov
2018-03-16  1:11               ` Evgenii Stepanov
2018-03-09 14:02 ` [RFC PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c Andrey Konovalov
2018-03-09 14:02   ` [OpenRISC] " Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 14:02 ` [RFC PATCH 5/6] lib, arm64: untag addrs passed to strncpy_from_user and strnlen_user Andrey Konovalov
2018-03-09 14:02   ` [OpenRISC] " Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 14:02 ` [RFC PATCH 6/6] arch: add untagged_addr definition for other arches Andrey Konovalov
2018-03-09 14:02   ` [OpenRISC] " Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 14:02   ` Andrey Konovalov
2018-03-09 14:11   ` Arnd Bergmann
2018-03-09 14:11     ` [OpenRISC] " Arnd Bergmann
2018-03-09 14:11     ` Arnd Bergmann
2018-03-09 14:11     ` Arnd Bergmann
2018-03-09 14:11     ` Arnd Bergmann
2018-03-09 14:11     ` Arnd Bergmann
2018-03-09 14:16   ` Robin Murphy
2018-03-09 14:16     ` [OpenRISC] " Robin Murphy
2018-03-09 14:16     ` Robin Murphy
2018-03-09 14:16     ` Robin Murphy
2018-03-09 15:47     ` Andrey Konovalov [this message]
2018-03-09 15:47       ` [OpenRISC] " Andrey Konovalov
2018-03-09 15:47       ` Andrey Konovalov
2018-03-09 15:47       ` Andrey Konovalov
2018-03-09 15:47       ` Andrey Konovalov
2018-03-09 15:47       ` Andrey Konovalov
2018-03-09 14:15 ` [RFC PATCH 0/6] arm64: untag user pointers passed to the kernel Robin Murphy
2018-03-09 14:15   ` [OpenRISC] " Robin Murphy
2018-03-09 14:15   ` Robin Murphy
2018-03-09 14:15   ` Robin Murphy
2018-03-09 17:58   ` Andrey Konovalov
2018-03-09 17:58     ` [OpenRISC] " Andrey Konovalov
2018-03-09 17:58     ` Andrey Konovalov
2018-03-09 17:58     ` Andrey Konovalov
2018-03-09 17:58     ` Andrey Konovalov
2018-03-09 17:58     ` Andrey Konovalov
2018-03-09 14:55 ` Mark Rutland
2018-03-09 14:55   ` Mark Rutland
2018-03-09 15:16   ` Geert Uytterhoeven
2018-03-09 15:16     ` Geert Uytterhoeven
2018-03-09 17:58   ` Andrey Konovalov
2018-03-09 17:58     ` Andrey Konovalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAeHK+y=_imh4uNSAg_vj3DLAeDLcVP3a4f79dNMW=Ot5oLiZQ@mail.gmail.com' \
    --to=andreyknvl@google.com \
    --cc=Jacob.Bramley@arm.com \
    --cc=Lee.Smith@arm.com \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=eugenis@google.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jejb@parisc-linux.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mpe@ellerman.id.au \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=paulus@samba.org \
    --cc=robin.murphy@arm.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=rth@twiddle.net \
    --cc=shli@fb.com \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.