Skip to contentSkip to conversation

parisc updates for v3.14

GIT PULL Helge Deller 3 participants 5 messages Feb 1, 2014 – Feb 2, 2014 exec and binfmt

lore
Share & tools
lore
#0 lore raw

Hi Linus,

please pull the latest updates for the parisc architecture from:

git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git parisc-for-3.14

The three major changes in this patchset is a implementation for flexible userspace memory maps, cache-flushing fixes (again), and a long-discussed ABI change to make EWOULDBLOCK the same value as EAGAIN.

parisc has been the only platform where we had EWOULDBLOCK != EAGAIN to keep HP-UX compatibility. Since we will probably never implement full HP-UX support, we prefer to drop this compatibility to make it easier for us with Linux userspace programs which mostly never checked for both values. We don't expect major fall-outs because of this change, and if we face some, we will simply rebuild the necessary applications in the debian archives.

The change to fs/exec.c only touches code which affects parisc since it's inside a #ifdef CONFIG_STACK_GROWSUP section (and parisc is the only platform where the stack grows upwards).

Thanks,
Helge

----------------------------------------------------------------
Guy Martin (1):
parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc

Helge Deller (5):
parisc/sti_console: prefer Linux fonts over built-in ROM fonts
parisc: fix cache-flushing
parisc: add flexible mmap memory layout support
parisc: wire up sched_setattr and sched_getattr
parisc: convert uapi/asm/stat.h to use native types only

 arch/parisc/include/asm/cacheflush.h  |   2 -
 arch/parisc/include/asm/elf.h         |   7 +
 arch/parisc/include/asm/page.h        |   3 +-
 arch/parisc/include/asm/pgtable.h     |   1 +
 arch/parisc/include/asm/processor.h   |   2 +
 arch/parisc/include/asm/thread_info.h |  10 ++
 arch/parisc/include/uapi/asm/errno.h  |   2 +-
 arch/parisc/include/uapi/asm/stat.h   |  40 +++---
 arch/parisc/include/uapi/asm/unistd.h |   4 +-
 arch/parisc/kernel/cache.c            |  14 ++
 arch/parisc/kernel/process.c          |  21 ++-
 arch/parisc/kernel/sys_parisc.c       | 238 ++++++++++++++++++++++++++++------
 arch/parisc/kernel/syscall_table.S    |   2 +
 drivers/video/console/sticore.c       |   2 +-
 fs/exec.c                             |   3 +
 lib/fonts/Kconfig                     |   6 +-
 16 files changed, 284 insertions(+), 73 deletions(-)
#1 lore raw
Quoted 17 lines · Helge Deller

Hi Linus,

please pull the latest updates for the parisc architecture from:

git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git parisc-for-3.14

The three major changes in this patchset is a implementation for flexible userspace memory maps, cache-flushing fixes (again), and a long-discussed ABI change to make EWOULDBLOCK the same value as EAGAIN.

parisc has been the only platform where we had EWOULDBLOCK != EAGAIN to keep HP-UX compatibility. Since we will probably never implement full HP-UX support, we prefer to drop this compatibility to make it easier for us with Linux userspace programs which mostly never checked for both values. We don't expect major fall-outs because of this change, and if we face some, we will simply rebuild the necessary applications in the debian archives.

Quoted 3 lines

The change to fs/exec.c only touches code which affects parisc since it's inside a #ifdef CONFIG_STACK_GROWSUP section (and parisc is the only platform where the stack grows upwards).

What about metag?

Quoted 36 lines

Thanks,
Helge

----------------------------------------------------------------
Guy Martin (1):
parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc

Helge Deller (5):
parisc/sti_console: prefer Linux fonts over built-in ROM fonts
parisc: fix cache-flushing
parisc: add flexible mmap memory layout support
parisc: wire up sched_setattr and sched_getattr
parisc: convert uapi/asm/stat.h to use native types only

 arch/parisc/include/asm/cacheflush.h  |   2 -
 arch/parisc/include/asm/elf.h         |   7 +
 arch/parisc/include/asm/page.h        |   3 +-
 arch/parisc/include/asm/pgtable.h     |   1 +
 arch/parisc/include/asm/processor.h   |   2 +
 arch/parisc/include/asm/thread_info.h |  10 ++
 arch/parisc/include/uapi/asm/errno.h  |   2 +-
 arch/parisc/include/uapi/asm/stat.h   |  40 +++---
 arch/parisc/include/uapi/asm/unistd.h |   4 +-
 arch/parisc/kernel/cache.c            |  14 ++
 arch/parisc/kernel/process.c          |  21 ++-
 arch/parisc/kernel/sys_parisc.c       | 238 ++++++++++++++++++++++++++++------
 arch/parisc/kernel/syscall_table.S    |   2 +
 drivers/video/console/sticore.c       |   2 +-
 fs/exec.c                             |   3 +
 lib/fonts/Kconfig                     |   6 +-
 16 files changed, 284 insertions(+), 73 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Thanks,
//richard
#2 lore raw

* Richard Weinberger <[email protected]>:

Quoted 5 lines · Helge Deller
Quoted 4 lines

please pull the latest updates for the parisc architecture from:

git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git parisc-for-3.14

Quoted 8 lines
Quoted 6 lines

The three major changes in this patchset is a implementation for flexible userspace memory maps, ....

The change to fs/exec.c only touches code which affects parisc since it's inside a #ifdef CONFIG_STACK_GROWSUP section (and parisc is the only platform where the stack grows upwards).

What about metag?

Great! I didn't know that we now have another platform where the stack grows upwards! Now we are not alone in this regard!

Anyway, the suggested & untested patch below should fix the metag arch to cope which my changes to fs/exec.c (unless the metag people want to implement proper stack randomization too). Either I can push it via the parisc tree, or you can take it via the metag tree. Please let me know.

Quoted 4 lines
Quoted 4 lines

Helge Deller (5):
parisc: add flexible mmap memory layout support
...

 fs/exec.c                             |   3 +

(see:
http://git.kernel.org/cgit/linux/kernel/git/deller/parisc-linux.git/commit/?h=for-next&id=13de8ec38997357c9865a36a587439d9c5678932 )

[PATCH] metag: define STACK_RND_MASK as -1

arch/metag/include/asm/elf.h +1 -1
index d2baf69..089e37a 100644
@@ -100,7 +100,7 @@ typedef unsigned long elf_fpregset_t;
 
 #define ELF_PLATFORM  (NULL)
 
-#define STACK_RND_MASK (0)
+#define STACK_RND_MASK (-1)
 
 #ifdef CONFIG_METAG_USER_TCM
 

--
To unsubscribe from this list: send the line "unsubscribe linux-metag" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

arch/metag/include/asm/elf.h typedef unsigned long elf_fpregset_t; · line 103

Quoted 6 lines · Helge Deller

Anyway, the suggested & untested patch below should fix the metag arch to cope which my changes to fs/exec.c
...

arch/metag/include/asm/elf.h +1 -1
-#define STACK_RND_MASK (0)
+#define STACK_RND_MASK (-1)

I don't think that works. That completely breaks randomize_stack_top().

So I'm not going to pull the parisc tree, this needs to be resolved sanely.

In fact, I think that change to fs/exec.c is just completely broken:

+ /* add some more stack size for stack randomization */
+ stack_base += STACK_RND_MASK + 1;

and that "+1" just doesn't make sense, and fundamentally breaks STACK_RND_MASK.

It also seems to be entirely pointless, since the PAGE_ALIGN() that comes right afterwards will effectively do it anyway.

So NAK on that whole fs/exec.c change. Afaik it's just wrong, and it's stupid.

Linus

#4 lore raw

Re: [GIT PULL] parisc updates for v3.14 (new pull request)

Hi Linus,

* Linus Torvalds <torvalds-de/[email protected]>:

Quoted 17 lines · Helge Deller

arch/metag/include/asm/elf.h typedef unsigned long elf_fpregset_t; · line 103

Quoted 6 lines

Anyway, the suggested & untested patch below should fix the metag arch to cope which my changes to fs/exec.c
...

arch/metag/include/asm/elf.h +1 -1
-#define STACK_RND_MASK (0)
+#define STACK_RND_MASK (-1)

I don't think that works. That completely breaks randomize_stack_top(). So I'm not going to pull the parisc tree, this needs to be resolved sanely. In fact, I think that change to fs/exec.c is just completely broken:

(quoted diff) +2 -0
+       /* add some more stack size for stack randomization */
+       stack_base += STACK_RND_MASK + 1;

and that "+1" just doesn't make sense, and fundamentally breaks STACK_RND_MASK. It also seems to be entirely pointless, since the PAGE_ALIGN() that comes right afterwards will effectively do it anyway.

Quoted 1 line

So NAK on that whole fs/exec.c change. Afaik it's just wrong, and it's stupid.

You are completely right - I have no idea what I was thinking. I have removed completely the changes to fs/exec.c, built up a new tree for you to pull and boot-tested it with 32- and 64bit parisc kernels.

Can you please consider pulling this new tree?
The full request follows here:
-------

Hi Linus,

please pull the latest updates for the parisc architecture from:

git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git parisc-3.14

The three major changes in this patchset is a implementation for flexible userspace memory maps, cache-flushing fixes (again), and a long-discussed ABI change to make EWOULDBLOCK the same value as EAGAIN.

parisc has been the only platform where we had EWOULDBLOCK != EAGAIN to keep HP-UX compatibility. Since we will probably never implement full HP-UX support, we prefer to drop this compatibility to make it easier for us with Linux userspace programs which mostly never checked for both values. We don't expect major fall-outs because of this change, and if we face some, we will simply rebuild the necessary applications in the debian archives.

Thanks,
Helge

----------------------------------------------------------------
Guy Martin (1):
parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc

Helge Deller (5):
parisc/sti_console: prefer Linux fonts over built-in ROM fonts
parisc: fix cache-flushing
parisc: wire up sched_setattr and sched_getattr
parisc: convert uapi/asm/stat.h to use native types only
parisc: add flexible mmap memory layout support

 arch/parisc/include/asm/cacheflush.h  |   2 -
 arch/parisc/include/asm/elf.h         |   4 +
 arch/parisc/include/asm/page.h        |   3 +-
 arch/parisc/include/asm/pgtable.h     |   1 +
 arch/parisc/include/asm/processor.h   |   2 +
 arch/parisc/include/asm/thread_info.h |  10 ++
 arch/parisc/include/uapi/asm/errno.h  |   2 +-
 arch/parisc/include/uapi/asm/stat.h   |  40 +++---
 arch/parisc/include/uapi/asm/unistd.h |   4 +-
 arch/parisc/kernel/cache.c            |  14 ++
 arch/parisc/kernel/process.c          |  21 ++-
 arch/parisc/kernel/sys_parisc.c       | 238 ++++++++++++++++++++++++++++------
 arch/parisc/kernel/syscall_table.S    |   2 +
 drivers/video/console/sticore.c       |   2 +-
 lib/fonts/Kconfig                     |   6 +-
 15 files changed, 278 insertions(+), 73 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-metag" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html