linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Embedding Position Independent Executables
@ 2016-04-03  7:23 Alexandre Belloni
  2016-04-03  7:23 ` [PATCH 1/2] ARM: PIE infrastructure Alexandre Belloni
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Alexandre Belloni @ 2016-04-03  7:23 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: Russell King - ARM Linux, Ard Biesheuvel, Dave Martin,
	Olof Johansson, Doug Anderson, Heiko Stuebner, Russ Dill,
	Alexandre Belloni

Hi,

This series tries to revive the many series trying to achieve the same thing.

I've tried numerous approaches and while using the kernel module loader is
actually quite convenient from a relocation point of view it is quite overkill
and also it is quite often too late as a lot of the arch specific PM code assume
that it is running at boot time, befor having access to any filesystem.

I've chosen to be less generic than what Russ did and only handle ARM. I reused
the API he defined but I actually went closer to his first implementation by
compiling and embedding a real PIE that doesn't actually need relocations (gcc
seems to be better at it thanks to ASLR).

In this series, I'm also converting the AT91 suspend code to use that
infrastructure as it is quite simple but I also toyed with more complex
functions.

The current limitation is that is doesn't actually tries to handle big endian
and I didn't test thumb (and this will probably require more work to get that
working reliably).

Also, to be more useful prppoer handling of a stack has to be added (this is not
too difficult and is planned) and will be enough to get rk3288 suspend/resume and
DDR timing changes working.

Alexandre Belloni (2):
  ARM: PIE infrastructure
  ARM: at91: pm: switch to the PIE infrastructure

 arch/arm/Kconfig                 |   2 +
 arch/arm/Makefile                |   1 +
 arch/arm/mach-at91/Kconfig       |   1 +
 arch/arm/mach-at91/Makefile      |   2 +-
 arch/arm/mach-at91/pm.c          |  31 ++--
 arch/arm/mach-at91/pm/.gitignore |   2 +
 arch/arm/mach-at91/pm/Makefile   |   3 +
 arch/arm/mach-at91/pm/atmel_pm.c |  97 +++++++++++
 arch/arm/mach-at91/pm_suspend.S  | 338 ---------------------------------------
 arch/arm/pie/Kconfig             |   8 +
 arch/arm/pie/Makefile            |   1 +
 arch/arm/pie/Makefile.pie        |  70 ++++++++
 arch/arm/pie/lib/empty.c         |  15 ++
 arch/arm/pie/pie.c               |  97 +++++++++++
 arch/arm/pie/pie.lds.S           |  40 +++++
 include/linux/pie.h              | 159 ++++++++++++++++++
 16 files changed, 507 insertions(+), 360 deletions(-)
 create mode 100644 arch/arm/mach-at91/pm/.gitignore
 create mode 100644 arch/arm/mach-at91/pm/Makefile
 create mode 100644 arch/arm/mach-at91/pm/atmel_pm.c
 delete mode 100644 arch/arm/mach-at91/pm_suspend.S
 create mode 100644 arch/arm/pie/Kconfig
 create mode 100644 arch/arm/pie/Makefile
 create mode 100644 arch/arm/pie/Makefile.pie
 create mode 100644 arch/arm/pie/lib/empty.c
 create mode 100644 arch/arm/pie/pie.c
 create mode 100644 arch/arm/pie/pie.lds.S
 create mode 100644 include/linux/pie.h

-- 
2.8.0.rc3

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

end of thread, other threads:[~2016-04-27 19:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-03  7:23 [PATCH 0/2] Embedding Position Independent Executables Alexandre Belloni
2016-04-03  7:23 ` [PATCH 1/2] ARM: PIE infrastructure Alexandre Belloni
2016-04-04 10:00   ` Russell King - ARM Linux
2016-04-22 23:15     ` Alexandre Belloni
2016-04-25 10:14       ` Dave P Martin
2016-04-27 19:39       ` Russell King - ARM Linux
2016-04-03  7:23 ` [PATCH 2/2] ARM: at91: pm: switch to the " Alexandre Belloni
2016-04-03 12:16   ` kbuild test robot
2016-04-04 10:02   ` Russell King - ARM Linux
2016-04-04  9:57 ` [PATCH 0/2] Embedding Position Independent Executables Russell King - ARM Linux
2016-04-04 15:11   ` Heiko Stuebner
2016-04-22 22:49   ` Alexandre Belloni
2016-04-23  9:50     ` Afzal Mohammed

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