age_32
v3: As Andy suggested, return EINVAL in case of splitting vdso blob on mremap;
used is_ia32_task instead of ifdefs
v2: Added __maybe_unused for pt_regs in vdso_mremap
Dmitry Safonov (2):
x86/vdso: add mremap hook to vm_special_mapping
selftest/x86: add mremap vdso test
arch/
On 05/16/2016 09:25 PM, Andy Lutomirski wrote:
On Mon, May 16, 2016 at 9:24 AM, Dmitry Safonov wrote:
On 05/16/2016 04:54 PM, Ingo Molnar wrote:
* Dmitry Safonov wrote:
Should print on success:
[root@localhost ~]# ./test_mremap_vdso_32
AT_SYSINFO_EHDR is 0xf773f000
[NOTE] Moving
On 05/16/2016 04:54 PM, Ingo Molnar wrote:
* Dmitry Safonov wrote:
Should print on success:
[root@localhost ~]# ./test_mremap_vdso_32
AT_SYSINFO_EHDR is 0xf773f000
[NOTE] Moving vDSO: [f773f000, f774] -> [a00, a001000]
[OK]
Or segfault if landing was bad (before patc
On 05/16/2016 04:55 PM, Ingo Molnar wrote:
Ok, this looks useful - please add this information to the changelog (with typos
fixed).
Thanks will add to v9.
On 05/16/2016 01:54 PM, Ingo Molnar wrote:
* Dmitry Safonov wrote:
On 05/10/2016 04:29 PM, Dmitry Safonov wrote:
Add possibility for userspace 32-bit applications to move
vdso mapping. Previously, when userspace app called
mremap for vdso, in return path it would land on previous
address of
On 05/10/2016 04:29 PM, Dmitry Safonov wrote:
Add possibility for userspace 32-bit applications to move
vdso mapping. Previously, when userspace app called
mremap for vdso, in return path it would land on previous
address of vdso page, resulting in segmentation violation.
Now it lands fine and
is 0xf774f000
[NOTE] Moving vDSO: [f774f000, f775] -> [a00, a001000]
Segmentation fault (core dumped)
Cc: Shuah Khan
Cc: linux-kselft...@vger.kernel.org
Suggested-by: Andy Lutomirski
Signed-off-by: Dmitry Safonov
Acked-by: Andy Lutomirski
---
v8: run test for x86_64 too;
removed
.
#0 0xf7fd9b80 in __kernel_vsyscall ()
#1 0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
Acked-by: Andy Lutomirski
---
v8: add WARN_ON_ONCE on current->mm != new_vma->vm_mm
v7: build fix
v6: moved vdso_image_32 check and fixup code into vdso_fix_l
On 05/05/2016 02:52 PM, Ingo Molnar wrote:
* Dmitry Safonov wrote:
On 04/26/2016 12:38 AM, Andy Lutomirski wrote:
On Mon, Apr 25, 2016 at 4:37 AM, Dmitry Safonov wrote:
Add possibility for userspace 32-bit applications to move
vdso mapping. Previously, when userspace app called
mremap for
logical: if one can switch between modes,
why can't he change vdso mapping to mode he got to?
(note: if the work about removing thread compatible flags
will be done (on x86), there will not even be such a thing,
as application mode - just difference on which syscalls it
uses: compatible or native).
Thanks,
Dmitry Safonov
2016-04-25 22:33 GMT+03:00 Andy Lutomirski :
> On Mon, Apr 25, 2016 at 11:09 AM, Dmitry Safonov
> wrote:
>> On 04/25/2016 08:14 PM, Dmitry Safonov wrote:
>>>
>>> On 04/25/2016 07:53 PM, Andy Lutomirski wrote:
>>>>
>>>> On Mon, Apr 25, 2016
2016-04-25 22:20 GMT+03:00 Andy Lutomirski :
> On Mon, Apr 25, 2016 at 9:12 AM, Dmitry Safonov
> wrote:
>> Introduce new flags that defines which ABI to use on creating sigframe.
>> Those flags one may set from the userspace, or kernel will set them
>> according to sys
On 04/25/2016 09:09 PM, Dmitry Safonov wrote:
On 04/25/2016 08:14 PM, Dmitry Safonov wrote:
On 04/25/2016 07:53 PM, Andy Lutomirski wrote:
On Mon, Apr 25, 2016 at 9:12 AM, Dmitry Safonov
wrote:
As the task isn't executing at the moment of {GET,SET}REGS,
return regset that corresponds to
On 04/25/2016 08:14 PM, Dmitry Safonov wrote:
On 04/25/2016 07:53 PM, Andy Lutomirski wrote:
On Mon, Apr 25, 2016 at 9:12 AM, Dmitry Safonov
wrote:
As the task isn't executing at the moment of {GET,SET}REGS,
return regset that corresponds to code selector.
So, for i386 elf binary that ch
On 04/25/2016 07:53 PM, Andy Lutomirski wrote:
On Mon, Apr 25, 2016 at 9:12 AM, Dmitry Safonov wrote:
As the task isn't executing at the moment of {GET,SET}REGS,
return regset that corresponds to code selector.
So, for i386 elf binary that changed it's CS to __USER_CS
it will r
only under CONFIG_COMPAT.
The same way ARM uses sa_flags to differ in which mode deliver signal
for 26-bit applications (look at SA_THIRYTWO).
Cc: Andy Lutomirski
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Cc: x...@kernel.org
Signed-off-by: Dmitry Safonov
---
arc
As we have here core registers, use them to determine application's
mode and sizes of register set and elf_prstatus.
Cc: Andy Lutomirski
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Cc: Alexander Viro
Cc: x...@kernel.org
Cc: linux-fsde...@vger.kernel.org
Signed
F_{IA32,X32} flags.
Cc: Andy Lutomirski
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Cc: Oleg Nesterov
Cc: x...@kernel.org
Signed-off-by: Dmitry Safonov
---
arch/x86/kernel/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/ptr
.
#0 0xf7fd9b80 in __kernel_vsyscall ()
#1 0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
---
v8: add WARN_ON_ONCE on current->mm != new_vma->vm_mm
v7: build fix
v6: moved vdso_image_32 check and fixup code into vdso_fix_landing function
with ifdefs
is 0xf774f000
[NOTE] Moving vDSO: [f774f000, f775] -> [a00, a001000]
Segmentation fault (core dumped)
Cc: Shuah Khan
Cc: linux-kselft...@vger.kernel.org
Suggested-by: Andy Lutomirski
Signed-off-by: Dmitry Safonov
---
v8: run test for x86_64 too;
removed fixed VDSO_SIZE - check EINVAL
On 04/21/2016 10:52 PM, Andy Lutomirski wrote:
On Mon, Apr 18, 2016 at 7:23 AM, Dmitry Safonov wrote:
Add possibility for userspace 32-bit applications to move
vdso mapping. Previously, when userspace app called
mremap for vdso, in return path it would land on previous
address of vdso page
On 04/21/2016 11:01 PM, Andy Lutomirski wrote:
On Mon, Apr 18, 2016 at 6:43 AM, Dmitry Safonov wrote:
Should print on success:
[root@localhost ~]# ./test_mremap_vdso_32
AT_SYSINFO_EHDR is 0xf773f000
[NOTE] Moving vDSO: [f773f000, f774] -> [a00, a001000]
[OK]
Or segfault
On 04/18/2016 05:23 PM, Dmitry Safonov wrote:
Add possibility for userspace 32-bit applications to move
vdso mapping. Previously, when userspace app called
mremap for vdso, in return path it would land on previous
address of vdso page, resulting in segmentation violation.
Now it lands fine and
On 04/20/2016 02:21 PM, Peter Zijlstra wrote:
On Thu, Apr 14, 2016 at 12:29:12PM -0700, Andy Lutomirski wrote:
On Thu, Apr 14, 2016 at 11:10 AM, Dmitry Safonov wrote:
@@ -724,7 +727,7 @@ static int branch_type(unsigned long from, unsigned long
to, int abort)
* on 64-bit systems
Commit-ID: abfb9498ee1327f534df92a7ecaea81a85913bae
Gitweb: http://git.kernel.org/tip/abfb9498ee1327f534df92a7ecaea81a85913bae
Author: Dmitry Safonov
AuthorDate: Mon, 18 Apr 2016 16:43:43 +0300
Committer: Ingo Molnar
CommitDate: Tue, 19 Apr 2016 10:44:52 +0200
x86/entry: Rename is_
.
#0 0xf7fd9b80 in __kernel_vsyscall ()
#1 0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
---
v7: that's just not my day: add new_vma parameter to vdso_fix_landing
sorry for the noise
v6: moved vdso_image_32 check and fixup code into vdso_fix_la
.
#0 0xf7fd9b80 in __kernel_vsyscall ()
#1 0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
---
v6: moved vdso_image_32 check and fixup code into vdso_fix_landing function
with ifdefs around
v5: as Andy suggested, add a check that new_vma->vm_mm and curr
is 0xf774f000
[NOTE] Moving vDSO: [f774f000, f775] -> [a00, a001000]
Segmentation fault (core dumped)
Cc: Shuah Khan
Cc: linux-kselft...@vger.kernel.org
Suggested-by: Andy Lutomirski
Signed-off-by: Dmitry Safonov
---
v5: initial version
tools/testing/selftests/x86/Makefile
Impact: clearify meaning
Suggested-by: Andy Lutomirski
Suggested-by: Ingo Molnar
Signed-off-by: Dmitry Safonov
Acked-by: Andy Lutomirski
---
v3: initial patch
arch/x86/entry/common.c| 2 +-
arch/x86/include/asm/compat.h | 4 ++--
arch/x86/include/asm/thread_info.h | 2
.
#0 0xf7fd9b80 in __kernel_vsyscall ()
#1 0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
---
v5: as Andy suggested, add a check that new_vma->vm_mm and current->mm are
the same, also check not only in_ia32_syscall() but image == &vdso_image_3
d add jump trampolines on places where
were entries in previous vDSO to a new one.
So, this is also true for 32-bit vDSO blob. That's why I need
this API for CRIU.
--
Regards,
Dmitry Safonov
On 04/15/2016 07:52 PM, Andy Lutomirski wrote:
Acked-by: Andy Lutomirski
But if you resubmit, please consider making this patch 1 so Ingo can
apply it directly.
I resubmitted it already :-[
https://lkml.org/lkml/2016/4/15/431
If there will be v5 version, I'll submit this first.
Thanks!
.
#0 0xf7fd9b80 in __kernel_vsyscall ()
#1 0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
---
v4: drop __maybe_unused & use image from mm->context instead vdso_image_32
v3: as Andy suggested, return EINVAL in case of splitting vdso blob on mremap;
Impact: clearify meaning
Suggested-by: Andy Lutomirski
Suggested-by: Ingo Molnar
Signed-off-by: Dmitry Safonov
---
v3: initial patch
arch/x86/entry/common.c| 2 +-
arch/x86/entry/vdso/vma.c | 2 +-
arch/x86/include/asm/compat.h | 4 ++--
arch/x86/include/asm
Impact: clearify meaning
Suggested-by: Andy Lutomirski
Suggested-by: Ingo Molnar
Signed-off-by: Dmitry Safonov
---
v3: initial patch
arch/x86/entry/common.c| 2 +-
arch/x86/entry/vdso/vma.c | 2 +-
arch/x86/include/asm/compat.h | 4 ++--
arch/x86/include/asm
.
#0 0xf7fd9b80 in __kernel_vsyscall ()
#1 0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
---
v3: as Andy suggested, return EINVAL in case of splitting vdso blob on mremap;
used is_ia32_task instead of ifdefs
v2: added __maybe_unused for pt_regs in
On 04/15/2016 12:51 PM, Dmitry Safonov wrote:
On 04/15/2016 12:18 PM, Ingo Molnar wrote:
* Andy Lutomirski wrote:
Instead of ifdef, use the (grossly misnamed) is_ia32_task() helper for
this, please.
Please also let's do the rename.
Does `is_32bit_syscall` sounds right, or shall
ll be bad-named for X86_32 host.
--
Regards,
Dmitry Safonov
On 04/15/2016 01:58 AM, Andy Lutomirski wrote:
On Thu, Apr 14, 2016 at 9:32 AM, Dmitry Safonov wrote:
Add possibility for userspace 32-bit applications to move
vdso mapping. Previously, when userspace app called
mremap for vdso, in return path it would land on previous
address of vdso page
Use user_mode64_bit to check process state. For that pass
interrupt register set from irq handler.
This should fix opcode decoder misinterpreting ABI for
tasks that change their code selector.
Signed-off-by: Dmitry Safonov
---
arch/x86/events/intel/core.c | 2 +-
arch/x86/events/intel/lbr.c
e TIF_IA32 flag.
I still quite don't know what to do with uprobes using
ia32_compat check and will make the next patches about
ptrace & signals usage of TIF_IA32.
Dmitry Safonov (4):
x86/events: down with test_thread_flag(TIF_IA32)
x86/intel: down with test_thread_flag(TIF_IA32)
As we have here full register set - just use user_64bit_mode
on it.
Signed-off-by: Dmitry Safonov
---
arch/x86/oprofile/backtrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c
index cb31a4440e58..405dadaee74a
y fixup IP.
Changing to user_64bit_mode to check for interrupt
register set is better, however it may race with task,
that changes it's code selector frequiently.
Signed-off-by: Dmitry Safonov
---
arch/x86/events/intel/ds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/
We can use user_64bit_mode(regs) here instead of thread flag
because we have full register frame.
Signed-off-by: Dmitry Safonov
---
arch/x86/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 041e442a3e28
_exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
---
v2: added __maybe_unused for pt_regs in vdso_mremap
arch/x86/entry/vdso/vma.c | 33 -
include/linux/mm_types.h | 3 +++
mm/mmap.c | 10 ++
3 files changed, 41 insertions
On 04/08/2016 11:44 PM, Andy Lutomirski wrote:
Feel free to ask for help on some of these details. user_64bit_mode
will be helpful too.
Hello again,
here are some questions on TIF_IA32 removal:
- in function intel_pmu_pebs_fixup_ip: there is need to
know if process was it native/compat mode f
the next syscall
through glibc may fail:
Program received signal SIGSEGV, Segmentation fault.
#0 0xf7fd9b80 in __kernel_vsyscall ()
#1 0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vma.c | 33
:
https://github.com/0day-ci/linux/commits/Dmitry-Safonov/x86-vdso-add-mremap-hook-to-vm_special_mapping/20160411-232653
config: x86_64-randconfig-x000-201615 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones
2016-04-08 23:44 GMT+03:00 Andy Lutomirski :
> On Apr 8, 2016 9:20 AM, "Dmitry Safonov" wrote:
>>
>>
>> And if it's not there - return error?
>
> No, just leave IP unchanged.
Ok, will resend with this fixup.
>
> Feel free to ask for help on s
On 04/08/2016 06:56 PM, Andy Lutomirski wrote:
On Fri, Apr 8, 2016 at 6:50 AM, Dmitry Safonov wrote:
Hello again,
what do you think about attached patch?
I think it should fix landing problem for i386 vdso mremap.
It does not touch fast syscall path, so there should be no
speed regression
7194a07d80ece9be19107e4e6 Mon Sep 17 00:00:00 2001
From: Dmitry Safonov
Date: Fri, 8 Apr 2016 16:27:18 +0300
Subject: [PATCH] x86/vdso: add mremap hook to vm_special_mapping
This patch adds possibility for userspace 32-bit applications
to move vdso mapping. Previously, when userspace app call
2016-04-08 10:13 GMT+03:00 Ingo Molnar :
>
> * Andy Lutomirski wrote:
>
>> ARCH_GET_FS and ARCH_GET_GS attempted to figure out the fsbase and
>> gsbase respectively from saved thread state. This was wrong: fsbase
>> and gsbase live in registers while a thread is running, not in
>> memory.
>
> So
On 04/07/2016 05:39 PM, Andy Lutomirski wrote:
On Apr 7, 2016 5:12 AM, "Dmitry Safonov" wrote:
On 04/06/2016 09:04 PM, Andy Lutomirski wrote:
[cc Dave Hansen for MPX]
On Apr 6, 2016 9:30 AM, "Dmitry Safonov" wrote:
Now each process that runs natively on x86_64 may ex
On 04/07/2016 03:21 PM, Cyrill Gorcunov wrote:
On Thu, Apr 07, 2016 at 03:11:24PM +0300, Dmitry Safonov wrote:
On 04/06/2016 09:04 PM, Andy Lutomirski wrote:
[cc Dave Hansen for MPX]
Will add x32 support for v2.
I think that you should separate vdso remapping from "personality&q
On 04/06/2016 09:04 PM, Andy Lutomirski wrote:
[cc Dave Hansen for MPX]
On Apr 6, 2016 9:30 AM, "Dmitry Safonov" wrote:
Now each process that runs natively on x86_64 may execute 32-bit code
by proper setting it's CS selector: either from LDT or reuse Linux's
USER32_CS. Th
this possibility).
I add a selftest and I did CRIU branch that uses this to C/R 32-bit processes:
https://github.com/0x7f454c46/criu/tree/compat-2
There are dozens of patches there and I will prepare them for CRIU master
branch after mainstreaming this switching patch.
Dmitry Safonov (2):
This is simple test to determine if arch_prctl(ARCH_SET_COMPAT) is
working by ptracing switched application with PTRACE_GETREGS -
it should return 32-bit registers set.
Cc: Cyrill Gorcunov
Cc: Pavel Emelyanov
Cc: Konstantin Khorenko
CC: Dmitry Safonov <0x7f454...@gmail.com>
Signed-
-> compat mode by arch_prctl, it will
remap needed vdso binary blob for target mode.
Cc: Cyrill Gorcunov
Cc: Pavel Emelyanov
Cc: Konstantin Khorenko
CC: Dmitry Safonov <0x7f454...@gmail.com>
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vma.c | 76 ++
Lameter
Cc: Pekka Enberg
Cc: David Rientjes
Cc: Joonsoo Kim
Suggested-by: Vladimir Davydov
Signed-off-by: Dmitry Safonov
Acked-by: Vladimir Davydov
---
v2: Down with SLAB_SUPPORTS_SYSFS thing.
v3: Moved sysfs_slab_remove inside shutdown_cache
On 02/08/2016 12:58 PM, Vladimir Davydov wrote:
On Mon, Feb 08, 2016 at 12:31:47PM +0300, Dmitry Safonov wrote:
With enabled slub_debug alloc_calls_show will try to track location and
user of slab object on each online node, kmem_cache_node structure and
cpu_cache/cpu_slub shouldn't be
982 ("slub: free slabs without holding locks")
Cc: Christoph Lameter
Cc: Pekka Enberg
Cc: David Rientjes
Cc: Joonsoo Kim
Suggested-by: Vladimir Davydov
Signed-off-by: Dmitry Safonov
---
v2: Down with SLAB_SUPPORTS_SYSFS thing.
v3: Move
On 02/07/2016 10:10 PM, Vladimir Davydov wrote:
On Fri, Feb 05, 2016 at 08:16:52PM +0300, Dmitry Safonov wrote:
...
diff --git a/mm/slab.c b/mm/slab.c
index 6ecc697..41176dd 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2414,13 +2414,19 @@ int __kmem_cache_shrink(struct kmem_cache *cachep, bool
structures and per-cpu freeing into __kmem_cache_release
and use it at kmem_cache_release.
Cc: Christoph Lameter
Cc: Pekka Enberg
Cc: David Rientjes
Cc: Joonsoo Kim
Suggested-by: Vladimir Davydov
Signed-off-by: Dmitry Safonov
---
v2: Down with SLAB_SUPPORTS_
On 02/05/2016 07:11 PM, Vladimir Davydov wrote:
On Fri, Feb 05, 2016 at 06:45:36PM +0300, Dmitry Safonov wrote:
With enabled slub_debug alloc_calls_show will try to track location and
user of slab object on each online node, kmem_cache_node structure
shouldn't be freed till there is the
2016-02-05 18:04 GMT+03:00 Steven Rostedt :
> Also, FYI, even if you do an RFC, include "PATCH" in the brackets as
> well. I usually have "[RFC][PATCH]". Because when I'm looking for
> patches in my inbox, I will filter for PATCH. If a patch is out there
> without that in the subject, it is much m
reeing into __kmem_cache_free_nodes and use
it at kmem_cache_release.
Cc: Vladimir Davydov
Cc: Christoph Lameter
Cc: Pekka Enberg
Cc: David Rientjes
Cc: Joonsoo Kim
Signed-off-by: Dmitry Safonov
---
v2: Down with SLAB_SUPPORTS_SYSFS thing.
v3: Moved sysfs_
On 02/05/2016 06:38 PM, Dmitry Safonov wrote:
With enabled slub_debug alloc_calls_show will try to track location and
user of slab object on each online node, kmem_cache_node structure
shouldn't be freed till there is the last reference to sysfs file.
Oh, scratch this, friday evening,
reeing into __kmem_cache_free_nodes and use
it at kmem_cache_release.
Cc: Vladimir Davydov
Cc: Christoph Lameter
Cc: Pekka Enberg
Cc: David Rientjes
Cc: Joonsoo Kim
Signed-off-by: Dmitry Safonov
---
v2: Down with SLAB_SUPPORTS_SYSFS thing.
v3: Moved sysfs_
On 02/05/2016 04:22 PM, Vladimir Davydov wrote:
On Thu, Feb 04, 2016 at 07:39:48PM +0300, Dmitry Safonov wrote:
...
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index b7e57927..a6bf41a 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -103,9 +103,10
2016-02-05 5:40 GMT+03:00 Steven Rostedt :
> On Mon, 19 Oct 2015 21:10:26 +0300
> Dmitry Safonov <0x7f454...@gmail.com> wrote:
>
>> There is no reason to do it twice: from commit b6f11df26fdc28
>> ("trace: Call tracing_reset_online_cpus before tracer->init(
sysfs file and on release of
kobject shutdown and remove kmem_cache.
Cc: Vladimir Davydov
Signed-off-by: Dmitry Safonov
---
v2: Down with SLAB_SUPPORTS_SYSFS thing.
v3: Moved sysfs_slab_remove inside shutdown_cache
v4: Rewo
On 02/03/2016 12:44 PM, Vladimir Davydov wrote:
On Wed, Feb 03, 2016 at 10:52:13AM +0300, Dmitry Safonov wrote:
...
diff --git a/mm/slab_common.c b/mm/slab_common.c
index b50aef0..2bfc0b1 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -451,6 +451,8 @@ EXPORT_SYMBOL(kmem_cache_create
+0x169/0x4e0
[43963.465155] RSP
[43963.465185] CR2: 0020
Cc: Vladimir Davydov
Signed-off-by: Dmitry Safonov
---
v2: Down with SLAB_SUPPORTS_SYSFS thing.
v3: Moved sysfs_slab_remove inside shutdown_cache
include/linux/slub_def.h | 10 --
mm/slab.h| 8 ++
+0x169/0x4e0
[43963.465155] RSP
[43963.465185] CR2: 0020
Cc: Vladimir Davydov
Signed-off-by: Dmitry Safonov
---
v2: Down with SLAB_SUPPORTS_SYSFS thing.
include/linux/slub_def.h | 10 --
mm/slab.h| 8
mm/slab_common.c | 10 --
mm/
/Dmitry-Safonov/mm-slab-fix-race-with-dereferencing-NULL-ptr-in-alloc_calls_show/20160202-230449
config: i386-randconfig-x005-02010231 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
Thanks little robot, will resend fixed v2 right soon
+0x169/0x4e0
[43963.465155] RSP
[43963.465185] CR2: 0020
Cc: Vladimir Davydov
Signed-off-by: Dmitry Safonov
---
mm/slab_common.c | 10 --
mm/slub.c| 6 --
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index b
On 01/28/2016 09:29 AM, Minfei Huang wrote:
On 01/27/16 at 02:48pm, Dmitry Safonov wrote:
For allocation of kimage failure or kexec_prepare or load segments
errors there is no need to keep crashkernel memory mapped.
It will affect only s390 as map/unmap hook defined only for it.
As on unmap
ccess.
Signed-off-by: Dmitry Safonov
---
arch/s390/kernel/machine_kexec.c | 39 +--
include/linux/kexec.h| 2 +-
kernel/kexec.c | 4 ++--
kernel/kexec_core.c | 4 ++--
4 files changed, 22 insertions(+), 27 deletions(-)
Impact: small cleanup
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/exit.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index 07110c6..a9f392b 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -59,8 +59,6 @@
#include
#include
-
As syscall_nr_to_meta already checks for
(syscall_nr < 0 || syscall_nr >= NR_syscalls) - remove this checkups.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/trace_syscalls.c | 30 ++
1 file changed, 10 insertions(+), 20 deletions(-)
Having as an example print_syscall_exit(), return TRACE_TYPE_UNHANDLED
if entry type differs from syscall's metadata type.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/trace_syscalls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/k
ed.
Reported-by: Florian Westphal
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
net/netfilter/nfnetlink_log.c | 2 +-
net/netfilter/nfnetlink_queue.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.
I thought, it was decided to use 0/NULL/whatever, than uninitialized_var()?
Is right now?
http://thread.gmane.org/gmane.linux.kernel/1383415
2015-11-06 22:10 GMT+03:00 Pablo Neira Ayuso :
> On Fri, Nov 06, 2015 at 09:48:14PM +0300, Dmitry Safonov wrote:
>> With x86_64_defconfig:
>
be used by any external module since it
disables only function and graph_function tracers but not any other
tracer.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/trace.c | 6 --
kernel/trace/trace.h | 1 -
kernel/trace/trace_
:14: warning: ‘flags’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
inst->flags = flags;
^
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
net/netfilter/nfnetlink_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --
TP_ARGS is not used anywhere in trace.h nor trace_entries.h
Firstly, I left just #undef TP_ARGS and had no errors - remove it.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/trace.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/trace/trace.h b/kernel
Ping?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
I was to dumb to check, if it compiles - please, use the second one.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www
__trace_graph_funciton is used in only one location, and is static.
As it's small function there is no need to keep it separated out.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/trace_functions_graph.c | 14 +++---
1 file changed, 3 insertions(+), 1
__trace_graph_funciton is used in only one location, and is static.
As it's small function there is no need to keep it separated out.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/trace_functions_graph.c | 11 +--
1 file changed, 1 insertion(+), 1
irqsoff_tracer_init(), which resets per-CPU ringbuffer second
time.
It's slowpath, but anyway.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/trace_irqsoff.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_
> Format change.
>
> OK, patch looks good, but I'm going to do the formatting changes. I'm
> not changing the code itself, except for the few places I moved the
> declaration of func_g up to keep the declarations in
> upside-down-x-mass-tree format.
Thank you! Seems better, I think.
--
To unsubscr
They seems to be unneeded since resetting trace on online CPUs
is moved out.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/trace_branch.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/kernel/trace/trace_branch.c b/kernel
2015-10-14 3:48 GMT+03:00 Steven Rostedt :
>> - ret = ftrace_match_module_records(hash, func, mod);
>> - if (!ret)
>> - ret = -EINVAL;
>> + ret = ftrace_match_module_records(hash, func, param);
>> + if (ret == 0)
>
> Small nit, personally, I prefer the if (!ret) version.
e_filter
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/ftrace.c | 37 ++---
1 file changed, 10 insertions(+), 27 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f87401b..a56f028 100644
--- a/kernel/trac
race_filter
-bash: echo: write error: Invalid argument
Also, I clarified ftrace_mod_callback code a little.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace/ftrace.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/kernel/tr
ftrace_match parameters are very related and I reduce the number of local
variables & parameters with it.
This is also preparation for module globbing as it would introduce more
realated variables & parameters.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
kernel/trace
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
Documentation/trace/ftrace.txt | 17 +
1 file changed, 17 insertions(+)
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index ef621d3..db18362 100644
--- a/Documentation/trace/ftrace.txt
cho ':mod:!' > set_ftrace_filter
Will trace every function in the kernel, but will not trace functions
from any module.
sh# echo '*:mod:*' > set_ftrace_filter
or
sh# echo ':mod:' > set_ftrace_filter
As the opposite will trace all functions from all modul
radix_tree_maybe_preload instead radix_tree_preload. Looks like, this
wasn't changed only by the reason of code duplication.
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
include/linux/swap.h | 3 +++
mm/swap_state.c | 37 ++
mm/zswap.c
901 - 1000 of 1002 matches
Mail list logo