All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Catalin Marinas' <catalin.marinas@arm.com>
Cc: Mark Brown <broonie@kernel.org>,
	Steven Price <steven.price@arm.com>,
	"sonicadvance1@gmail.com" <sonicadvance1@gmail.com>,
	"amanieu@gmail.com" <amanieu@gmail.com>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Dave Martin <Dave.Martin@arm.com>,
	"Amit Daniel Kachhap" <amit.kachhap@arm.com>,
	Marc Zyngier <maz@kernel.org>,
	David Brazdil <dbrazdil@google.com>,
	Jean-Philippe Brucker <jean-philippe@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Gavin Shan <gshan@redhat.com>, Mike Rapoport <rppt@kernel.org>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	"Kristina Martsenko" <kristina.martsenko@arm.com>,
	Kees Cook <keescook@chromium.org>,
	Sami Tolvanen <samitolvanen@google.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	Kevin Hao <haokexin@gmail.com>, Jason Yan <yanaijie@huawei.com>,
	Andrey Ignatov <rdna@fb.com>,
	Peter Collingbourne <pcc@google.com>,
	Julien Grall <julien.grall@arm.com>,
	Tian Tao <tiantao6@hisilicon.com>,
	Qais Yousef <qais.yousef@arm.com>, Jens Axboe <axboe@kernel.dk>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls
Date: Fri, 12 Feb 2021 15:06:04 +0000	[thread overview]
Message-ID: <427bfdffb2da4561879c720881d9dc96@AcuMS.aculab.com> (raw)
In-Reply-To: <20210212144400.GD7718@arm.com>

> > Any user space adaption layer would have to know which actual
> > driver has been opened and what internal structures it has.
> > Getting that right is hard and difficult.
> > The recent changes to move (IIRC) sockopt compatibility down
> > into the protocol code found quite a few places where it was
> > previously broken.
> > It is much easier to get it right in the code that knows about
> > the actual structures.
> 
> As Arnd I think was suggesting, we could have an ioctl32() syscall that
> allows compat arguments but not opening up the whole set of compat
> syscalls to native processes.

Why is that a problem.
The kernel has to allow absolute garbage in syscall parameters.
So it really shouldn't matter.
It may give processes extra ways to 'shoot themselves in the foot'
but surely that is their problem.

Certainly, on x86, a 64bit process can make all three different
types of system call.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


WARNING: multiple messages have this Message-ID (diff)
From: David Laight <David.Laight@ACULAB.COM>
To: 'Catalin Marinas' <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Gavin Shan <gshan@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Julien Grall <julien.grall@arm.com>,
	Amit Daniel Kachhap <amit.kachhap@arm.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Will Deacon <will@kernel.org>, Qais Yousef <qais.yousef@arm.com>,
	Jean-Philippe Brucker <jean-philippe@linaro.org>,
	Marc Zyngier <maz@kernel.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Andrey Ignatov <rdna@fb.com>, Steven Price <steven.price@arm.com>,
	Sami Tolvanen <samitolvanen@google.com>,
	David Brazdil <dbrazdil@google.com>,
	Dave Martin <Dave.Martin@arm.com>,
	Kees Cook <keescook@chromium.org>,
	"sonicadvance1@gmail.com" <sonicadvance1@gmail.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	Kristina Martsenko <kristina.martsenko@arm.com>,
	Mark Brown <broonie@kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>, Kevin Hao <haokexin@gmail.com>,
	Peter Collingbourne <pcc@google.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Jens Axboe <axboe@kernel.dk>,
	"amanieu@gmail.com" <amanieu@gmail.com>,
	Jason Yan <yanaijie@huawei.com>, Oleg Nesterov <oleg@redhat.com>,
	Tian Tao <tiantao6@hisilicon.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@kernel.org>
Subject: RE: [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls
Date: Fri, 12 Feb 2021 15:06:04 +0000	[thread overview]
Message-ID: <427bfdffb2da4561879c720881d9dc96@AcuMS.aculab.com> (raw)
In-Reply-To: <20210212144400.GD7718@arm.com>

> > Any user space adaption layer would have to know which actual
> > driver has been opened and what internal structures it has.
> > Getting that right is hard and difficult.
> > The recent changes to move (IIRC) sockopt compatibility down
> > into the protocol code found quite a few places where it was
> > previously broken.
> > It is much easier to get it right in the code that knows about
> > the actual structures.
> 
> As Arnd I think was suggesting, we could have an ioctl32() syscall that
> allows compat arguments but not opening up the whole set of compat
> syscalls to native processes.

Why is that a problem.
The kernel has to allow absolute garbage in syscall parameters.
So it really shouldn't matter.
It may give processes extra ways to 'shoot themselves in the foot'
but surely that is their problem.

Certainly, on x86, a 64bit process can make all three different
types of system call.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-02-12 15:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 20:21 [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls sonicadvance1
2021-02-11 20:21 ` sonicadvance1
2021-02-12 11:30 ` Steven Price
2021-02-12 11:30   ` Steven Price
2021-02-12 12:35   ` Mark Brown
2021-02-12 12:35     ` Mark Brown
2021-02-12 13:28     ` Catalin Marinas
2021-02-12 13:28       ` Catalin Marinas
2021-02-12 14:12       ` David Laight
2021-02-12 14:12         ` David Laight
2021-02-12 14:44         ` Catalin Marinas
2021-02-12 14:44           ` Catalin Marinas
2021-02-12 15:06           ` David Laight [this message]
2021-02-12 15:06             ` David Laight
2021-02-12 16:24       ` Amanieu d'Antras
2021-02-12 16:24         ` Amanieu d'Antras
2021-02-12 18:04         ` Mark Rutland
2021-02-12 18:04           ` Mark Rutland
2021-02-12 19:06           ` Amanieu d'Antras
2021-02-12 19:06             ` Amanieu d'Antras
2021-02-12 13:59   ` Arnd Bergmann
2021-02-12 13:59     ` Arnd Bergmann
2021-02-12 14:13 ` Mark Rutland
2021-02-12 14:13   ` Mark Rutland

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=427bfdffb2da4561879c720881d9dc96@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=Dave.Martin@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=amanieu@gmail.com \
    --cc=amit.kachhap@arm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=axboe@kernel.dk \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=dbrazdil@google.com \
    --cc=frederic@kernel.org \
    --cc=gshan@redhat.com \
    --cc=haokexin@gmail.com \
    --cc=jean-philippe@linaro.org \
    --cc=julien.grall@arm.com \
    --cc=keescook@chromium.org \
    --cc=kristina.martsenko@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=oleg@redhat.com \
    --cc=pcc@google.com \
    --cc=qais.yousef@arm.com \
    --cc=rdna@fb.com \
    --cc=rppt@kernel.org \
    --cc=samitolvanen@google.com \
    --cc=sonicadvance1@gmail.com \
    --cc=steven.price@arm.com \
    --cc=tiantao6@hisilicon.com \
    --cc=vincenzo.frascino@arm.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will@kernel.org \
    --cc=yanaijie@huawei.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.