Yury Norov | 24 May 02:04 2016

[PATCH v6 00/21] ILP32 for ARM64

This series enables aarch64 with ilp32 mode, and as supporting work,
introduces compat wrappers based on s390 solution, and also introduces
ARCH_32BIT_OFF_T configuration option that is enabled for existing
32-bit architectures but disabled for new arches (so 64-bit off_t is 
is used by new userspace).

This version is based on kernel v4.6.
It works with glibc-2.23, and tested with LTP.

It was tested on QEMU and ThunderX machines. No major differences found.

This is not RFC anymore, because ILP32 is now tested in big-endian mode;
signals, vDSO and other subsystems are tested, and look working

 v3: https://lkml.org/lkml/2014/9/3/704
 v4: https://lkml.org/lkml/2015/4/13/691
 v5: https://lkml.org/lkml/2015/9/29/911
 v6: ABI reworked significantly;
    - syscall input arguments are deloused with compat wrappers;
    - vDSO is now working for both BE and LE;
    - signal subsystem is reworked to handle signal context properly;
    - binfmt_elf is reworked, and now most of places where execution mode
      should be detected, are handled statically;
    - many other less-important fixes.

ILP32 glibc branch is available here:
https://github.com/norov/glibc/tree/ilp32-2.23

It is tested with this series with no major downsides. I will send it to 
glibc-alpha soon, after final revise. Please review and comment it as well.
(Continue reading)

David Howells | 18 May 17:10 2016
Picon

[RFC PATCH 00/15] Provide atomics and bitops implemented with ISO C++11 atomics


Here's a set of patches to provide kernel atomics and bitops implemented
with ISO C++11 atomic intrinsics.  The second part of the set makes the x86
arch use the implementation.

Note that the x86 patches are very rough.  It would need to be made
compile-time conditional in some way and the old code can't really be
thrown away that easily - but it's a good way to make sure I'm not using
that code any more.

There are some advantages to using ISO C++11 atomics:

 (1) The compiler can make use of extra information, such as condition
     flags, that are tricky to get out of inline assembly in an efficient
     manner.  This should reduce the number of instructions required in
     some cases - such as in x86 where we use SETcc to store the condition
     inside the inline asm and then CMP outside to put it back again.

     Whilst this can be alleviated by the use of asm-goto constructs, this
     adds mandatory conditional jumps where the use of CMOVcc and SETcc
     might be better.

 (2) The compiler inserts memory barriers for us and can move them earlier,
     within reason, thereby affording a greater chance of the CPU being
     able to execute the memory barrier instruction simultaneously with
     register-only instructions.

 (3) The compiler can automatically switch between different forms of an
     atomic instruction depending on operand size, thereby eliminating the
     need for large switch statements with individual blocks of inline asm.
(Continue reading)

ROBERT | 17 May 20:07 2016
Picon

: RE: RE

When can i call you? Did you receive my previous mail?
Yury Norov | 12 May 18:06 2016

[PATCH v2] arm64: fix current_thread_info()->addr_limit setup

At elf loading in flush_old_exec() in fs/exec.c, generic code sets
current_thread_info()->addr_limit to one that corresponds aarch64 value,
and ignores compat mode there as corresponding status setup happens
later on in load_elf_binary() by SET_PERSONALITY() macro. As result,
compat task has wrong addr_limit, and it may cause various bugs.

This patch fixes it. It also fixes USER_DS macro to return different
values depending on compat at runtime.

It was discovered during ilp32 development. See details here:
https://lkml.org/lkml/2016/5/11/975

v2:
 flush tpidrro_el0 unconditionally in tls_thread_flush() as if exec() is
 called by aarch64 task, is_compat_task() fails even if new thread is
 aarch32.

Signed-off-by: Yury Norov <ynorov <at> caviumnetworks.com>
---
 arch/arm64/include/asm/elf.h     | 11 +++++++++--
 arch/arm64/include/asm/uaccess.h |  2 +-
 arch/arm64/kernel/process.c      | 18 +++++++-----------
 3 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index 24ed037..fda75ce 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
 <at>  <at>  -138,7 +138,10  <at>  <at>  typedef struct user_fpsimd_state elf_fpregset_t;
  */
(Continue reading)

Arnd Bergmann | 5 May 21:58 2016
Picon
Gravatar

[GIT PULL] asm-generic syscall fix for 4.6-rc

[resent to fix subject line]

The following changes since commit 02da2d72174c61988eb4456b53f405e3ebdebce4:

  Linux 4.6-rc5 (2016-04-24 16:17:05 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git tags/asm-generic-4.6

for you to fetch changes up to 1f93e9f2318b598e6775a1fc9701604993c512b1:

  asm-generic: use compat version for preadv2 and pwritev2 (2016-05-05 00:42:20 +0200)

----------------------------------------------------------------
asm-generic syscall fix for 4.6-rc

My last pull request for asm-generic had just one patch that added two
new system calls to asm/unistd.h, but unfortunately it turned out
to be wrong, pointing arch/tile compat mode at the native handlers
rather than the compat ones.

This was spotted by Yury Norov, who is working on ILP32 mode
for arch/arm64, which would have the same problem when merged.
This fixes the table to use the correct compat syscalls, like
the other 64-bit architectures do.

I'll try to find the time to come up with a solution that
prevents this problem from happening again, by allowing all
future system calls to just get added in a single file
(Continue reading)

Arnd Bergmann | 5 May 21:48 2016
Picon
Gravatar

asm-generic syscall fix for 4.6-rc

The following changes since commit 02da2d72174c61988eb4456b53f405e3ebdebce4:

  Linux 4.6-rc5 (2016-04-24 16:17:05 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git asm-generic-4.6

for you to fetch changes up to 1f93e9f2318b598e6775a1fc9701604993c512b1:

  asm-generic: use compat version for preadv2 and pwritev2 (2016-05-05 00:42:20 +0200)

----------------------------------------------------------------
asm-generic syscall fix for 4.6-rc

My last pull request for asm-generic had just one patch that added two
new system calls to asm/unistd.h, but unfortunately it turned out
to be wrong, pointing arch/tile compat mode at the native handlers
rather than the compat ones.

This was spotted by Yury Norov, who is working on ILP32 mode
for arch/arm64, which would have the same problem when merged.
This fixes the table to use the correct compat syscalls, like
the other 64-bit architectures do.

I'll try to find the time to come up with a solution that
prevents this problem from happening again, by allowing all
future system calls to just get added in a single file
for use by all architectures.

(Continue reading)

Chen Yucong | 4 May 15:51 2016
Picon

[PATCH] cpu/hotplug: print warning message in proper places for online or offline cpu

When we online or offline a CPU, unexpected errors may occur for
a number of reasons. So if a function called within _cpu_down() or
_cpu_up() returns a error code indicating a failed operation, the
warning message should be printed rather than fallow the failed
__cpu_notify().

Signed-off-by: Chen Yucong <slaoub <at> gmail.com>
---
 kernel/cpu.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3e3f6e4..b8a2d2a 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
 <at>  <at>  -317,8 +317,8  <at>  <at>  static int notify_prepare(unsigned int cpu)
 	ret = __cpu_notify(CPU_UP_PREPARE, cpu, -1, &nr_calls);
 	if (ret) {
 		nr_calls--;
-		printk(KERN_WARNING "%s: attempt to bring up CPU %u failed\n",
-				__func__, cpu);
+		pr_warn("%s: attempt to bring up CPU %u failed\n",
+			__func__, cpu);
 		__cpu_notify(CPU_UP_CANCELED, cpu, nr_calls, NULL);
 	}
 	return ret;
 <at>  <at>  -353,6 +353,8  <at>  <at>  static int bringup_cpu(unsigned int cpu)
 	ret = __cpu_up(cpu, idle);
 	if (ret) {
 		cpu_notify(CPU_UP_CANCELED, cpu);
(Continue reading)

Vineet Gupta | 4 May 12:37 2016

kmap_atomic and preemption

Hi,

I was staring at some recent ARC highmem crashes and see that kmap_atomic()
disables preemption even when page is in lowmem and call returns right away.
This seems to be true for other arches as well.

arch/arc/mm/highmem.c:

void *kmap_atomic(struct page *page)
{
	int idx, cpu_idx;
	unsigned long vaddr;

	preempt_disable();
	pagefault_disable();
	if (!PageHighMem(page))
		return page_address(page);

        /* do the highmem foo ... */
..
}

I would really like to implement a inline fastpath for !PageHighMem(page) case and
do the highmem foo out-of-line.

Is preemption disabling a requirement of kmap_atomic() callers independent of
where page is or is it only needed when page is in highmem and can trigger page
faults or TLB Misses between kmap_atomic() and kunmap_atomic and wants protection
against reschedules etc.

(Continue reading)

maryjanesogrub | 3 May 07:07 2016
Picon

Listing from maryjanesogrub

Your friend, maryjanesogrub, has sent along the following link:
http://www.midwestrealty.net/listingview.php?listingID=1128

Comment:
JOB POSITION AVAILABLE - APPLY NOW!
WE'RE HIRING: Data Entry Workers Earn $500 up to $1000 Daily 
(No Experience Required)

Good Day,

You recently expressed an interest in obtaining a
position you could do from the comfort of your own home.
I am happy to let you know that I found a great company
that will help you get started working online.

Visit our website here:

http://link.limo/1jqz

The scope of the work is very simple.
You can work as little or as much as you want
depending on how much you want your paycheck to be

No background experience is needed because you
will be given a detailed step-by-step training in
all the job fields along with all the resources you
needed to help you get started immediately.

Visit our website here:

(Continue reading)

Yury Norov | 2 May 18:12 2016

[PATCH] all: use compat version for preadv2 and pwritev2

Compat architectures that does not use generic unistd (mips, s390),
declare compat version in their syscall tables for preadv2 and
pwritev2. Generic unistd syscall table should do it as well.

Signed-off-by: Yury Norov <ynorov <at> caviumnetworks.com>
---
 include/uapi/asm-generic/unistd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 6e0f5f0..c51afb7 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
 <at>  <at>  -718,9 +718,9  <at>  <at>  __SYSCALL(__NR_mlock2, sys_mlock2)
 #define __NR_copy_file_range 285
 __SYSCALL(__NR_copy_file_range, sys_copy_file_range)
 #define __NR_preadv2 286
-__SYSCALL(__NR_preadv2, sys_preadv2)
+__SC_COMP(__NR_preadv2, sys_preadv2, compat_sys_preadv2)
 #define __NR_pwritev2 287
-__SYSCALL(__NR_pwritev2, sys_pwritev2)
+__SC_COMP(__NR_pwritev2, sys_pwritev2, compat_sys_pwritev2)

 #undef __NR_syscalls
 #define __NR_syscalls 288
--

-- 
2.5.0

Arnd Bergmann | 26 Apr 23:52 2016
Picon
Gravatar

[PATCH v2 0/6] simplify rtc-generic driver

This is a resend of an earlier series, to clean up the rtc-generic
driver by avoiding the dependency on the architecture specific
include/asm/rtc.h header that after this series is only used
for the deprecated "genrtc" driver. As I've shown in another
series, only three architectures (m68k, powerpc, parisc)
actually use the genrtc driver, and they all support rtc-generic
as a replacement as well.

The only missing piece appears to be the ioctl support for
the m68k q40 machine that I'm adding in patch 2 here.

	Arnd


Gmane