All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Salter <msalter@redhat.com>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>,
	Rob Herring <robh@kernel.org>, Kees Cook <keescook@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>, Liu hua <sdu.liu@huawei.com>,
	Rabin Vincent <rabin@rab.in>,
	Nikolay Borisov <Nikolay.Borisov@arm.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Tomasz Figa <t.figa@samsung.com>,
	Doug Anderson <dianders@google.com>,
	Will Deacon <will.deacon@arm.com>,
	Laura Abbott <lauraa@codeaurora.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/7] arm: use generic fixmap.h
Date: Thu, 07 Aug 2014 13:23:14 -0400	[thread overview]
Message-ID: <1407432194.599.13.camel@deneb.redhat.com> (raw)
In-Reply-To: <CAMo8Bf+DP-xZGnnFFvwc1XDEGUGkj1KkYQ_x+2i_hE0a9t7NKw@mail.gmail.com>

On Thu, 2014-08-07 at 19:42 +0400, Max Filippov wrote:
> On Thu, Aug 7, 2014 at 7:32 PM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> > On Thu, 7 Aug 2014, Rob Herring wrote:
> >
> >> On Thu, Aug 7, 2014 at 10:15 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> >> > Hi,
> >> >
> >> > On Wed, Aug 6, 2014 at 11:32 PM, Kees Cook <keescook@chromium.org> wrote:
> >> >> ARM is different from other architectures in that fixmap pages are indexed
> >> >> with a positive offset from FIXADDR_START.  Other architectures index with
> >> >> a negative offset from FIXADDR_TOP.  In order to use the generic fixmap.h
> >> >
> >> > Does anybody know if there's any reason why generic fixmap.h uses negative
> >> > offsets? It complicates things with no obvious benefit if you e.g. try to align
> >> > virtual address in the fixmap region with physical page color (that's why I've
> >> > switched xtensa to positive fixmap addressing in v3.17).
> >>
> >> No, but each arch doing it differently is even more annoying.
> >
> > Why not switching everybody to positive offsets then?
> 
> I can cook a patch if people agree that that'd be good.
> 

I think that would be fine. I think x86 was first and used a negative
negative offset. Others that followed just copied that. When I did the
generic fixmap patch, using a negative offset was the natural thing to
do. Arm was only arch doing it differently.



WARNING: multiple messages have this Message-ID (diff)
From: msalter@redhat.com (Mark Salter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] arm: use generic fixmap.h
Date: Thu, 07 Aug 2014 13:23:14 -0400	[thread overview]
Message-ID: <1407432194.599.13.camel@deneb.redhat.com> (raw)
In-Reply-To: <CAMo8Bf+DP-xZGnnFFvwc1XDEGUGkj1KkYQ_x+2i_hE0a9t7NKw@mail.gmail.com>

On Thu, 2014-08-07 at 19:42 +0400, Max Filippov wrote:
> On Thu, Aug 7, 2014 at 7:32 PM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> > On Thu, 7 Aug 2014, Rob Herring wrote:
> >
> >> On Thu, Aug 7, 2014 at 10:15 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> >> > Hi,
> >> >
> >> > On Wed, Aug 6, 2014 at 11:32 PM, Kees Cook <keescook@chromium.org> wrote:
> >> >> ARM is different from other architectures in that fixmap pages are indexed
> >> >> with a positive offset from FIXADDR_START.  Other architectures index with
> >> >> a negative offset from FIXADDR_TOP.  In order to use the generic fixmap.h
> >> >
> >> > Does anybody know if there's any reason why generic fixmap.h uses negative
> >> > offsets? It complicates things with no obvious benefit if you e.g. try to align
> >> > virtual address in the fixmap region with physical page color (that's why I've
> >> > switched xtensa to positive fixmap addressing in v3.17).
> >>
> >> No, but each arch doing it differently is even more annoying.
> >
> > Why not switching everybody to positive offsets then?
> 
> I can cook a patch if people agree that that'd be good.
> 

I think that would be fine. I think x86 was first and used a negative
negative offset. Others that followed just copied that. When I did the
generic fixmap patch, using a negative offset was the natural thing to
do. Arm was only arch doing it differently.

  reply	other threads:[~2014-08-07 17:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 19:32 [PATCH 0/7] arm: support CONFIG_RODATA Kees Cook
2014-08-06 19:32 ` Kees Cook
2014-08-06 19:32 ` [PATCH 1/7] arm: use generic fixmap.h Kees Cook
2014-08-06 19:32   ` Kees Cook
2014-08-07  2:24   ` Laura Abbott
2014-08-07  2:24     ` Laura Abbott
2014-08-07 14:35     ` Kees Cook
2014-08-07 14:35       ` Kees Cook
2014-08-07 15:15   ` Max Filippov
2014-08-07 15:15     ` Max Filippov
2014-08-07 15:22     ` Rob Herring
2014-08-07 15:22       ` Rob Herring
2014-08-07 15:32       ` Nicolas Pitre
2014-08-07 15:32         ` Nicolas Pitre
2014-08-07 15:42         ` Max Filippov
2014-08-07 15:42           ` Max Filippov
2014-08-07 17:23           ` Mark Salter [this message]
2014-08-07 17:23             ` Mark Salter
2014-08-06 19:32 ` [PATCH 2/7] arm: fixmap: implement __set_fixmap() Kees Cook
2014-08-06 19:32   ` Kees Cook
2014-08-06 19:32 ` [PATCH 3/7] arm: mm: reduce fixmap kmap from 32 to 16 CPUS Kees Cook
2014-08-06 19:32   ` Kees Cook
2014-08-06 19:32 ` [PATCH 4/7] arm: use fixmap for text patching when text is RO Kees Cook
2014-08-06 19:32   ` Kees Cook
2014-08-06 19:32 ` [PATCH 5/7] ARM: kexec: Make .text R/W in machine_kexec Kees Cook
2014-08-06 19:32   ` Kees Cook
2014-08-06 19:32 ` [PATCH 6/7] ARM: mm: allow non-text sections to be non-executable Kees Cook
2014-08-06 19:32   ` Kees Cook
2014-08-06 19:32 ` [PATCH 7/7] ARM: mm: allow text and rodata sections to be read-only Kees Cook
2014-08-06 19:32   ` Kees Cook

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=1407432194.599.13.camel@deneb.redhat.com \
    --to=msalter@redhat.com \
    --cc=Nikolay.Borisov@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=dianders@google.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=keescook@chromium.org \
    --cc=lauraa@codeaurora.org \
    --cc=leif.lindholm@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nicolas.pitre@linaro.org \
    --cc=rabin@rab.in \
    --cc=robh@kernel.org \
    --cc=sdu.liu@huawei.com \
    --cc=t.figa@samsung.com \
    --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.