* [PATCH 1/2] powerpc/configs: Add PAPR_SCM to pseries_defconfig
From: Michael Ellerman @ 2021-04-16 11:12 UTC (permalink / raw)
To: linuxppc-dev
This is a pseries only driver, it should be built by default as part of
pseries_defconfig to get some build coverage.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/configs/pseries_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 777221775c83..968095d7682c 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -41,6 +41,7 @@ CONFIG_DTL=y
CONFIG_SCANLOG=m
CONFIG_PPC_SMLPAR=y
CONFIG_IBMEBUS=y
+CONFIG_PAPR_SCM=m
CONFIG_PPC_SVM=y
# CONFIG_PPC_PMAC is not set
CONFIG_RTAS_FLASH=m
--
2.25.1
^ permalink raw reply related
* [PATCH 2/2] powerpc/papr_scm: Fix build error due to wrong printf specifier
From: Michael Ellerman @ 2021-04-16 11:12 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20210416111209.765444-1-mpe@ellerman.id.au>
When I changed the rc variable to be long rather than int64_t I
neglected to update the printk(), leading to a build break:
arch/powerpc/platforms/pseries/papr_scm.c: In function 'papr_scm_pmem_flush':
arch/powerpc/platforms/pseries/papr_scm.c:144:26: warning: format
'%lld' expects argument of type 'long long int', but argument 3 has
type 'long int' [-Wformat=]
Fixes: 75b7c05ebf90 ("powerpc/papr_scm: Implement support for H_SCM_FLUSH hcall")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/platforms/pseries/papr_scm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
index ae6f5d80d5ce..48de21902116 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -141,7 +141,7 @@ static int papr_scm_pmem_flush(struct nd_region *nd_region,
} while (rc == H_BUSY);
if (rc) {
- dev_err(&p->pdev->dev, "flush error: %lld", rc);
+ dev_err(&p->pdev->dev, "flush error: %ld", rc);
rc = -EIO;
} else {
dev_dbg(&p->pdev->dev, "flush drc 0x%x complete", p->drc_index);
--
2.25.1
^ permalink raw reply related
* Re: [PATCH] powerpc/kdump: fix kdump kernel hangup issue with hot add CPUs
From: Sourabh Jain @ 2021-04-16 11:27 UTC (permalink / raw)
To: Hari Bathini, mpe; +Cc: mahesh, linux-kernel, linuxppc-dev
In-Reply-To: <b8f5fad8-3ea8-cb8d-84d2-8769ed41cc38@linux.ibm.com>
On 16/04/21 3:03 pm, Hari Bathini wrote:
>
>
> On 16/04/21 12:17 pm, Sourabh Jain wrote:
>> With the kexec_file_load system call when system crashes on the hot add
>> CPU the capture kernel hangs and failed to collect the vmcore.
>>
>> Kernel panic - not syncing: sysrq triggered crash
>> CPU: 24 PID: 6065 Comm: echo Kdump: loaded Not tainted
>> 5.12.0-rc5upstream #54
>> Call Trace:
>> [c0000000e590fac0] [c0000000007b2400] dump_stack+0xc4/0x114
>> (unreliable)
>> [c0000000e590fb00] [c000000000145290] panic+0x16c/0x41c
>> [c0000000e590fba0] [c0000000008892e0] sysrq_handle_crash+0x30/0x40
>> [c0000000e590fc00] [c000000000889cdc] __handle_sysrq+0xcc/0x1f0
>> [c0000000e590fca0] [c00000000088a538] write_sysrq_trigger+0xd8/0x178
>> [c0000000e590fce0] [c0000000005e9b7c] proc_reg_write+0x10c/0x1b0
>> [c0000000e590fd10] [c0000000004f26d0] vfs_write+0xf0/0x330
>> [c0000000e590fd60] [c0000000004f2aec] ksys_write+0x7c/0x140
>> [c0000000e590fdb0] [c000000000031ee0]
>> system_call_exception+0x150/0x290
>> [c0000000e590fe10] [c00000000000ca5c] system_call_common+0xec/0x278
>> --- interrupt: c00 at 0x7fff905b9664
>> NIP: 00007fff905b9664 LR: 00007fff905320c4 CTR: 0000000000000000
>> REGS: c0000000e590fe80 TRAP: 0c00 Not tainted (5.12.0-rc5upstream)
>> MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR:
>> 28000242
>> XER: 00000000
>> IRQMASK: 0
>> GPR00: 0000000000000004 00007ffff5fedf30 00007fff906a7300
>> 0000000000000001
>> GPR04: 000001002a7355b0 0000000000000002 0000000000000001
>> 00007ffff5fef616
>> GPR08: 0000000000000001 0000000000000000 0000000000000000
>> 0000000000000000
>> GPR12: 0000000000000000 00007fff9073a160 0000000000000000
>> 0000000000000000
>> GPR16: 0000000000000000 0000000000000000 0000000000000000
>> 0000000000000000
>> GPR20: 0000000000000000 00007fff906a4ee0 0000000000000002
>> 0000000000000001
>> GPR24: 00007fff906a0898 0000000000000000 0000000000000002
>> 000001002a7355b0
>> GPR28: 0000000000000002 00007fff906a1790 000001002a7355b0
>> 0000000000000002
>> NIP [00007fff905b9664] 0x7fff905b9664
>> LR [00007fff905320c4] 0x7fff905320c4
>> --- interrupt: c00
>
> <SNIP>
>
> I will update the commit message.
>
>> /**
>> * setup_new_fdt_ppc64 - Update the flattend device-tree of the kernel
>> * being loaded.
>> @@ -1020,6 +1113,13 @@ int setup_new_fdt_ppc64(const struct kimage
>> *image, void *fdt,
>> }
>> }
>> + /* Update cpus nodes information to account hotplug CPUs. */
>> + if (image->type == KEXEC_TYPE_CRASH) {
>
> Shouldn't this apply to regular kexec_file_load case as well? Yeah,
> there won't be a hang in regular kexec_file_load case but for
> correctness, that kernel should also not see stale CPU info in FDT?
>
> Yes better to update the fdt for both kexec and kdump.
>
> Thanks for the review Hari.
>
> - Sourabh Jain
^ permalink raw reply
* [PATCH 1/2] powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h
From: Michael Ellerman @ 2021-04-16 11:40 UTC (permalink / raw)
To: linuxppc-dev
From: Tony Ambardar <tony.ambardar@gmail.com>
A few archs like powerpc have different errno.h values for macros
EDEADLOCK and EDEADLK. In code including both libc and linux versions of
errno.h, this can result in multiple definitions of EDEADLOCK in the
include chain. Definitions to the same value (e.g. seen with mips) do
not raise warnings, but on powerpc there are redefinitions changing the
value, which raise warnings and errors (if using "-Werror").
Guard against these redefinitions to avoid build errors like the following,
first seen cross-compiling libbpf v5.8.9 for powerpc using GCC 8.4.0 with
musl 1.1.24:
In file included from ../../arch/powerpc/include/uapi/asm/errno.h:5,
from ../../include/linux/err.h:8,
from libbpf.c:29:
../../include/uapi/asm-generic/errno.h:40: error: "EDEADLOCK" redefined [-Werror]
#define EDEADLOCK EDEADLK
In file included from toolchain-powerpc_8540_gcc-8.4.0_musl/include/errno.h:10,
from libbpf.c:26:
toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/errno.h:58: note: this is the location of the previous definition
#define EDEADLOCK 58
cc1: all warnings being treated as errors
Cc: Stable <stable@vger.kernel.org>
Reported-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200917135437.1238787-1-Tony.Ambardar@gmail.com
---
arch/powerpc/include/uapi/asm/errno.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/include/uapi/asm/errno.h b/arch/powerpc/include/uapi/asm/errno.h
index cc79856896a1..4ba87de32be0 100644
--- a/arch/powerpc/include/uapi/asm/errno.h
+++ b/arch/powerpc/include/uapi/asm/errno.h
@@ -2,6 +2,7 @@
#ifndef _ASM_POWERPC_ERRNO_H
#define _ASM_POWERPC_ERRNO_H
+#undef EDEADLOCK
#include <asm-generic/errno.h>
#undef EDEADLOCK
--
2.25.1
^ permalink raw reply related
* [PATCH] macintosh/via-pmu: Fix build warning
From: Michael Ellerman @ 2021-04-16 11:41 UTC (permalink / raw)
To: linuxppc-dev
Now that __fake_sleep is static, we get a warning about it being unused
in some configurations:
drivers/macintosh/via-pmu.c:190:12: warning: '__fake_sleep' defined but not used
190 | static int __fake_sleep;
Move it inside the ifdef where it's used to avoid the warning.
Fixes: 95d143923379 ("macintosh/via-pmu: Make some symbols static")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
drivers/macintosh/via-pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 478766434919..4bdd4c45e7a7 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -187,7 +187,6 @@ static int query_batt_timer = BATTERY_POLLING_COUNT;
static struct adb_request batt_req;
static struct proc_dir_entry *proc_pmu_batt[PMU_MAX_BATTERIES];
-static int __fake_sleep;
int asleep;
#ifdef CONFIG_ADB
@@ -1833,6 +1832,7 @@ pmu_present(void)
*/
static u32 save_via[8];
+static int __fake_sleep;
static void
save_via_state(void)
--
2.25.1
^ permalink raw reply related
* Re: [PATCH] powerpc: Initialize local variable fdt to NULL in elf64_load()
From: Michael Ellerman @ 2021-04-16 12:19 UTC (permalink / raw)
To: Dan Carpenter, Christophe Leroy
Cc: devicetree, kbuild-all, lkp, robh, Lakshmi Ramasubramanian,
linuxppc-dev, bauerman, Daniel Axtens
In-Reply-To: <20210416080941.GO6048@kadam>
Dan Carpenter <dan.carpenter@oracle.com> writes:
> On Fri, Apr 16, 2021 at 09:00:12AM +0200, Christophe Leroy wrote:
>> Le 16/04/2021 à 08:44, Daniel Axtens a écrit :
>> > > On 4/15/21 12:14 PM, Lakshmi Ramasubramanian wrote:
>> > >
>> > > > There are a few "goto out;" statements before the local variable "fdt"
>> > > > is initialized through the call to of_kexec_alloc_and_setup_fdt() in
>> > > > elf64_load(). This will result in an uninitialized "fdt" being passed
>> > > > to kvfree() in this function if there is an error before the call to
>> > > > of_kexec_alloc_and_setup_fdt().
>> > > >
>> > > > Initialize the local variable "fdt" to NULL.
>> > > >
>> > I'm a huge fan of initialising local variables! But I'm struggling to
>> > find the code path that will lead to an uninit fdt being returned...
>> >
>> > The out label reads in part:
>> >
>> > /* Make kimage_file_post_load_cleanup free the fdt buffer for us. */
>> > return ret ? ERR_PTR(ret) : fdt;
>> >
>> > As far as I can tell, any time we get a non-zero ret, we're going to
>> > return an error pointer rather than the uninitialised value...
>>
>> I don't think GCC is smart enough to detect that.
>>
>
> We disabled uninitialized variable checking for GCC.
We disabled -Wmaybe-uninitialized, but that doesn't disable *all*
uninitialized warnings does it?
I wish we hadn't disabled it, it's already led to bugs slipping through.
> But actually is something that has been on my mind recently. Smatch is
> supposed to parse this correctly but there is a bug that affects powerpc
> and I don't know how to debug it. The kbuild bot is doing cross
> platform compiles but I don't have one set up on myself. Could someone
> with Smatch installed test something for me?
>
> Or if you don't have Smatch installed then you should definitely install
> it. :P
> https://www.spinics.net/lists/smatch/msg00568.html
I have smatch installed, and even run it sometimes ;)
> Apply the patch from below and edit the path to point to the correct
> directory. Then run kchecker and email me the output?
That gave me:
CC arch/powerpc/kernel/hw_breakpoint.o
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c: In function ‘task_bps_add’:
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:176:16: error: passing argument 1 of ‘__smatch_about’ makes integer from pointer without a cast [-Werror=int-conversion]
176 | __smatch_about(tmp);
| ^~~
| |
| struct breakpoint *
In file included from /home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:170:
/home/michael/smatch/check_debug.h:4:40: note: expected ‘long int’ but argument is of type ‘struct breakpoint *’
4 | static inline void __smatch_about(long var){}
| ~~~~~^~~
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:180:21: error: passing argument 1 of ‘__smatch_about’ makes integer from pointer without a cast [-Werror=int-conversion]
180 | __smatch_about(tmp);
| ^~~
| |
| struct breakpoint *
In file included from /home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:170:
/home/michael/smatch/check_debug.h:4:40: note: expected ‘long int’ but argument is of type ‘struct breakpoint *’
4 | static inline void __smatch_about(long var){}
| ~~~~~^~~
cc1: all warnings being treated as errors
Which looks like it didn't work.
Right, needs tmp cast to long.
Output below, hope it helps. Happy to test other things.
cheers
GEN Makefile
CHECK /home/michael/linux/scripts/mod/empty.c
CALL /home/michael/linux/scripts/checksyscalls.sh
CALL /home/michael/linux/scripts/atomic/check-atomics.sh
CHECK /home/michael/linux/arch/powerpc/kernel/vdso64/vgettimeofday.c
CC arch/powerpc/kernel/hw_breakpoint.o
CHECK /home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() ---- about ----
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() implied: tmp = 's64min-(-4096),(-12),4096-s64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() buf size: 'tmp' 0 elements, 0 bytes (rl = (-1),32)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() strlen: 'tmp' characters
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() real absolute: tmp = 's64min-(-4096),(-12),4096-s64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() mtag = 0 offset = 0 rl = ''
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [register_smatch_extra] tmp = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [register_buf_size] tmp = '(-1),32' [merged] ((-1), (-1),32, 32)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [register_comparison_links] tmp = '__fake_param_0x7da6ac1c7450_0 vs tmp, return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [register_fresh_alloc] tmp = 'undefined'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [check_uninitialized] tmp = 'initialized' [merged]
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:177 task_bps_add() [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:178 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:178 task_bps_add() __set_sm change [register_definition_db_callbacks] db_incomplete = 'incomplete' (was incomplete)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 10 => 11
179 in __split_whole_condition
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() 179 in split_conditions (IS_ERR(tmp))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_buf_size] '__fake_param_0x7da6ac1c7630_0' (-1),32
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' 4096-ptr_max,(-12)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12)) (was 4096-ptr_max,(-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12)) (was 4096-ptr_max,(-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12)) (was 4096-ptr_max,(-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_comparison] '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360' ==
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_comparison_links] '__fake_param_0x7da6ac1c7630_0' __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_comparison] '__fake_param_0x7da6ac1c7630_0 vs tmp' ==
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_comparison_links] '__fake_param_0x7da6ac1c7630_0' __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360 => __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_comparison_links] 'tmp' __fake_param_0x7da6ac1c7450_0 vs tmp, return 0x7da6ac1c7360 vs tmp => __fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_assigned_expr] '__fake_param_0x7da6ac1c7630_0' tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_assigned_expr_links] 'tmp' __fake_param_0x7da6ac1c7450_0 => __fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0
debug: insert into caller_info values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'task_bps_add', 'IS_ERR', 138154805589552, 1, 0, -1, '%call_marker%', 'bool(*)(void*)');
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() insert into caller_info values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'task_bps_add', 'IS_ERR', 138154805589552, 1, 0, -1, '%call_marker%', 'bool(*)(void*)');
debug: insert into caller_info values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'task_bps_add', 'IS_ERR', 138154805589552, 1, 1001, 0, '$', '4096-ptr_max,(-12)');
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() insert into caller_info values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'task_bps_add', 'IS_ERR', 138154805589552, 1, 1001, 0, '$', '4096-ptr_max,(-12)');
debug: insert into caller_info values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'task_bps_add', 'IS_ERR', 138154805589552, 1, 1014, 0, '$', 'r alloc_breakpoint');
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() insert into caller_info values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'task_bps_add', 'IS_ERR', 138154805589552, 1, 1014, 0, '$', 'r alloc_breakpoint');
debug: insert into caller_info values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'task_bps_add', 'IS_ERR', 138154805589552, 1, 1002, 0, '$', '(-1),32');
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() insert into caller_info values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'task_bps_add', 'IS_ERR', 138154805589552, 1, 1002, 0, '$', '(-1),32');
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_modification_hooks] '*tmp' __smatch_about(tmp) => IS_ERR(tmp)
inline function: IS_ERR
/home/michael/linux/include/linux/err.h:34 IS_ERR() set_state new [internal] 'unnull_path' true
debug: select call_id, type, parameter, key, value from caller_info where call_id = 138154805589552;
/home/michael/linux/include/linux/err.h:34 IS_ERR() select call_id, type, parameter, key, value from caller_info where call_id = 138154805589552;
138154805589552, 0, -1, %call_marker%, bool(*)(void*)
138154805589552, 1001, 0, $, 4096-ptr_max,(-12)
138154805589552, 1014, 0, $, r alloc_breakpoint
138154805589552, 1002, 0, $, (-1),32
/home/michael/linux/include/linux/err.h:34 IS_ERR() set_state new [register_kernel_user_data2] 'this_function' called
/home/michael/linux/include/linux/err.h:34 IS_ERR() set_state new [register_smatch_extra] 'ptr' 4096-ptr_max,(-12)
/home/michael/linux/include/linux/err.h:34 IS_ERR() set_state new [register_buf_size] 'ptr' (-1),32
/home/michael/linux/include/linux/err.h:34 IS_ERR() __set_sm new [register_smatch_extra] ptr = '4096-ptr_max,(-12)'
/home/michael/linux/include/linux/err.h:34 IS_ERR() __set_sm new [register_buf_size] ptr = '(-1),32'
/home/michael/linux/include/linux/err.h:34 IS_ERR() __set_sm new [register_kernel_user_data2] this_function = 'called'
mem-db: insert into function_type values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'IS_ERR', 1, 0, 'void*');
/home/michael/linux/include/linux/err.h:34 IS_ERR() set_state new [check_dereferences_param] 'ptr' param
/home/michael/linux/include/linux/err.h:34 IS_ERR() set_state new [register_comparison] 'ptr vs ptr orig' ==
/home/michael/linux/include/linux/err.h:34 IS_ERR() set_state new [register_comparison_links] 'ptr' ptr vs ptr orig
/home/michael/linux/include/linux/err.h:34 IS_ERR() set_state new [register_statement_count] 'stmts' 1
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_state change [register_statement_count] 'stmts' 1 => 2
36 in __handle_condition_assigns
/home/michael/linux/include/linux/err.h:36 IS_ERR() 36 in split_conditions (!!((ptr) >= -4095))
/home/michael/linux/include/linux/err.h:36 IS_ERR() 36 in split_conditions (!((ptr) >= -4095))
/home/michael/linux/include/linux/err.h:36 IS_ERR() 36 in split_conditions (((ptr) >= -4095))
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_true_false_states [register_smatch_extra] 'ptr'. Was 4096-ptr_max,(-12). Now T:(-12) F:4096-ptr_max
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_true_false_states [register_parsed_conditions] 'condition 0x7da6aed21be0'. Was (null). Now T:true_path F:false_path
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_state new [register_smatch_extra] '__sm_fake_0x7da6aed219b0' 1
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_state new [register_smatch_extra] '__sm_fake_0x7da6aed219b0' 0
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_smatch_extra] 'ptr' 4096-ptr_max(L 36) + (-12)(L 36) => 4096-ptr_max,(-12) (4096-ptr_max,(-12), (-12), 4096-ptr_max)
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_parsed_conditions] 'condition 0x7da6aed21be0' false_path(L 36) + true_path(L 36) => merged (merged, false_path, true_path)
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_smatch_extra] '__sm_fake_0x7da6aed219b0' 1(L 36) + 0(L 36) => 0-1 (0-1, 0, 1)
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_smatch_extra] 'ptr' (-12)(L 36) + 4096-ptr_max(L 36) => 4096-ptr_max,(-12) (4096-ptr_max,(-12), 4096-ptr_max, (-12))
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_parsed_conditions] 'condition 0x7da6aed21be0' true_path(L 36) + false_path(L 36) => merged (merged, false_path, true_path)
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_sm new [register_smatch_extra] __sm_fake_0x7da6aed219b0 = '0-1' [merged] (0-1, 0, 1, 0, 1)
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_sm change [register_smatch_extra] ptr = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12)) (was 4096-ptr_max,(-12))
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_sm change [register_parsed_conditions] condition 0x7da6aed21be0 = 'merged' [merged] (merged, false_path, true_path) (was merged)
36 done __handle_condition_assigns
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_state new [register_assigned_expr] '__sm_fake_0x7da6aed219b0' !!((ptr) >= -4095)
36 in __split_whole_condition
/home/michael/linux/include/linux/err.h:36 IS_ERR() 36 in split_conditions (!!((ptr) >= -4095))
/home/michael/linux/include/linux/err.h:36 IS_ERR() 36 in split_conditions (!((ptr) >= -4095))
/home/michael/linux/include/linux/err.h:36 IS_ERR() 36 in split_conditions (((ptr) >= -4095))
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_true_false_sm [register_smatch_extra] '__sm_fake_0x7da6aed219b0'. Was 0-1. Now T:1 F:(null)
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_true_false_sm [register_smatch_extra] 'ptr'. Was 4096-ptr_max,(-12). Now T:(-12) F:(null)
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_true_false_sm [register_parsed_conditions] 'condition 0x7da6aed21be0'. Was merged. Now T:true_path F:(null)
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_true_false_sm [register_smatch_extra] '__sm_fake_0x7da6aed219b0'. Was 0-1. Now T:(null) F:0
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_true_false_sm [register_smatch_extra] 'ptr'. Was 4096-ptr_max,(-12). Now T:(null) F:4096-ptr_max
/home/michael/linux/include/linux/err.h:36 IS_ERR() __set_true_false_sm [register_parsed_conditions] 'condition 0x7da6aed21be0'. Was merged. Now T:(null) F:false_path
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_true_false_states [register_smatch_extra] 'ptr'. Was 4096-ptr_max,(-12). Now T:(-12) F:4096-ptr_max
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_true_false_states [register_parsed_conditions] 'condition 0x7da6aed21be0'. Was merged. Now T:true_path F:false_path
36 done __split_whole_condition
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_state new [register_returns_early] 'return_ranges' 1
mem-db: insert into return_states values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'IS_ERR', 138154805589552, 93, '1', 1, 0, -1, '', 'bool(*)(void*)');
mem-db: insert into return_states values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'IS_ERR', 138154805589552, 93, '1', 1, 103, 0, '$', '(-12)');
mem-db: insert into return_states values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'IS_ERR', 138154805589552, 93, '1', 1, 1037, -1, '', '2');
/home/michael/linux/include/linux/err.h:36 IS_ERR() set_state new [register_returns_early] 'return_ranges' 0
mem-db: insert into return_states values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'IS_ERR', 138154805589552, 94, '0', 1, 0, -1, '', 'bool(*)(void*)');
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_smatch_extra] '__sm_fake_0x7da6aed219b0' 1(L 36) + 0(L 36) => 0-1 (0-1, 0, 1)
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_smatch_extra] 'ptr' (-12)(L 36) + 4096-ptr_max(L 36) => 4096-ptr_max,(-12) (4096-ptr_max,(-12), 4096-ptr_max, (-12))
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_returns_early] 'return_ranges' 1(L 36) + 0(L 36) => merged (0, 1, merged)
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_parsed_conditions] 'condition 0x7da6aed21be0' true_path(L 36) + false_path(L 36) => merged (merged, false_path, true_path)
mem-db: insert into return_states values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'IS_ERR', 138154805589552, 94, '0', 1, 103, 0, '$', '4096-ptr_max');
mem-db: insert into return_states values ('/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c', 'IS_ERR', 138154805589552, 94, '0', 1, 1037, -1, '', '2');
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_smatch_extra] '__sm_fake_0x7da6aed219b0' 0(L 36) + 1(L 36) => 0-1 (0-1, 1, 0)
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_smatch_extra] 'ptr' 4096-ptr_max(L 36) + (-12)(L 36) => 4096-ptr_max,(-12) (4096-ptr_max,(-12), (-12), 4096-ptr_max)
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_returns_early] 'return_ranges' 0(L 36) + 1(L 36) => merged (0, 1, merged)
/home/michael/linux/include/linux/err.h:36 IS_ERR() merge [register_parsed_conditions] 'condition 0x7da6aed21be0' false_path(L 36) + true_path(L 36) => merged (merged, false_path, true_path)
debug: select function, type, parameter, key, value from return_implies where call_id = '138154805589552';
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() select function, type, parameter, key, value from return_implies where call_id = '138154805589552';
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0'. Was 4096-ptr_max,(-12). Now T:4096-ptr_max,(-12) F:4096-ptr_max,(-12)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12)) (was 4096-ptr_max,(-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp'. Was 4096-ptr_max,(-12). Now T:4096-ptr_max,(-12) F:4096-ptr_max,(-12)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_modification_hooks] *tmp = 'IS_ERR(tmp)' (was __smatch_about(tmp))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_modification_hooks] '*tmp'. Was IS_ERR(tmp). Now T:IS_ERR(tmp) F:IS_ERR(tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_buf_size] __fake_param_0x7da6ac1c7630_0 = '(-1),32'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_buf_size] '__fake_param_0x7da6ac1c7630_0'. Was (-1),32. Now T:(-1),32 F:(-1),32
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360 = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_comparison] '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360'. Was ==. Now T:== F:==
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_comparison] '__fake_param_0x7da6ac1c7630_0 vs tmp'. Was ==. Now T:== F:==
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_comparison_links] __fake_param_0x7da6ac1c7630_0 = '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_comparison_links] '__fake_param_0x7da6ac1c7630_0'. Was __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp. Now T:__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp F:__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_comparison_links] tmp = '__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp' (was __fake_param_0x7da6ac1c7450_0 vs tmp, return 0x7da6ac1c7360 vs tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_comparison_links] 'tmp'. Was __fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp. Now T:__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp F:__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_assigned_expr] '__fake_param_0x7da6ac1c7630_0'. Was tmp. Now T:tmp F:tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0' (was __fake_param_0x7da6ac1c7450_0)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_assigned_expr_links] 'tmp'. Was __fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0. Now T:__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0 F:__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0
debug: select distinct return from return_states where call_id = '138154805589552';
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() select distinct return from return_states where call_id = '138154805589552';
1
0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [check_err_ptr_deref] 'tmp' err_ptr
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [check_err_ptr_deref] 'tmp' checked
debug: select return_id, return, type, parameter, key, value from return_states where call_id = '138154805589552' order by return_id, type;
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() select return_id, return, type, parameter, key, value from return_states where call_id = '138154805589552' order by return_id, type;
93, 1, 0, -1, , bool(*)(void*)
93, 1, 103, 0, $, (-12)
93, 1, 1037, -1, , 2
94, 0, 0, -1, , bool(*)(void*)
94, 0, 103, 0, $, 4096-ptr_max
94, 0, 1037, -1, , 2
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [internal] 'unnull_path' true => true
'tmp = (-12)' from 176 is true. [leaf][stree 3]
'tmp = 4096-ptr_max' from 176 is false. [leaf][stree 4]
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '(-12)' [merged] (was 4096-ptr_max,(-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_smatch_extra] tmp->bp = '' [merged] (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_smatch_extra] tmp->list.next = '' [merged] (was 0)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_smatch_extra] tmp->list.prev = '' [merged] (was 0)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_untracked_param] bp = 'undefined' [merged] (was merged)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_smatch_extra_links] 'tmp' tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' 4096-ptr_max,(-12) => (-12)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra] 'tmp' 4096-ptr_max,(-12) => (-12)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' (-12) => (-12)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra_links] 'tmp' tmp => __fake_param_0x7da6ac1c7630_0, tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' (-12) => (-12)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '(-12)' [merged] (was (-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_buf_size] tmp = '(-1)' [merged] (was (-1),32)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [check_uninitialized] tmp = 'initialized' [merged] (was initialized)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 11 => 13
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [internal] 'unnull_path' true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp->bp = '0-u64max' [merged] (0-u64max, 0-u64max, , 0-u64max, )
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp->list.next = '0' [merged] (0, 0, , 0, )
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp->list.prev = '0' [merged] (0, 0, , 0, )
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *bp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *tmp = 'IS_ERR(tmp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_definition_db_callbacks] db_incomplete = 'incomplete'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_untracked_param] bp = 'merged' [merged] (untracked, merged, undefined)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_buf_size] __fake_param_0x7da6ac1c7630_0 = '(-1),32'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_buf_size] tmp = '(-1),32' [merged] ((-1), (-1),32, 32)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360 = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] bp vs bp orig = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] return 0x7da6ac1c7360 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] __fake_param_0x7da6ac1c7630_0 = '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] bp = 'bp vs bp orig'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] return 0x7da6ac1c7360 = 'return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] tmp = '__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_statement_count] stmts = '11'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_fresh_alloc] tmp = 'undefined'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_dereferences_param] bp = 'param'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_uninitialized] tmp = 'initialized' [merged]
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree change [internal] unnull_path = 'true' [merged] (was true)
debug: select return_id, return, type, parameter, key, value from return_states where call_id = '138154805589552' order by return_id, type;
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() select return_id, return, type, parameter, key, value from return_states where call_id = '138154805589552' order by return_id, type;
93, 1, 0, -1, , bool(*)(void*)
93, 1, 103, 0, $, (-12)
93, 1, 1037, -1, , 2
94, 0, 0, -1, , bool(*)(void*)
94, 0, 103, 0, $, 4096-ptr_max
94, 0, 1037, -1, , 2
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [internal] 'unnull_path' true => true
'tmp = (-12)' from 176 is false. [leaf][stree 3]
'tmp = 4096-ptr_max' from 176 is true. [leaf][stree 4]
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '4096-ptr_max' [merged] (was 4096-ptr_max,(-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_smatch_extra] tmp->bp = '0-u64max' [merged] (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_smatch_extra] tmp->list.next = '0' [merged] (was 0)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_smatch_extra] tmp->list.prev = '0' [merged] (was 0)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_fake_stree change [register_untracked_param] bp = 'untracked' [merged] (was merged)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_smatch_extra_links] 'tmp' tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' 4096-ptr_max,(-12) => 4096-ptr_max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra] 'tmp' 4096-ptr_max,(-12) => 4096-ptr_max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' 4096-ptr_max => 4096-ptr_max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra_links] 'tmp' tmp => __fake_param_0x7da6ac1c7630_0, tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' 4096-ptr_max => 4096-ptr_max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '4096-ptr_max' [merged] (was 4096-ptr_max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_buf_size] tmp = '32' [merged] (was (-1),32)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [check_uninitialized] tmp = 'initialized' [merged] (was initialized)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 11 => 13
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [internal] 'unnull_path' true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp = '4096-ptr_max,(-12)' [merged] (4096-ptr_max,(-12), 4096-ptr_max, (-12), 4096-ptr_max, (-12))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp->bp = '0-u64max' [merged] (0-u64max, 0-u64max, , 0-u64max, )
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp->list.next = '0' [merged] (0, 0, , 0, )
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp->list.prev = '0' [merged] (0, 0, , 0, )
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *bp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *tmp = 'IS_ERR(tmp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_definition_db_callbacks] db_incomplete = 'incomplete'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_untracked_param] bp = 'merged' [merged] (untracked, merged, undefined)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_buf_size] __fake_param_0x7da6ac1c7630_0 = '(-1),32'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_buf_size] tmp = '(-1),32' [merged] ((-1), (-1),32, 32)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360 = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] bp vs bp orig = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] return 0x7da6ac1c7360 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] __fake_param_0x7da6ac1c7630_0 = '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] bp = 'bp vs bp orig'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] return 0x7da6ac1c7360 = 'return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] tmp = '__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_statement_count] stmts = '11'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_fresh_alloc] tmp = 'undefined'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_dereferences_param] bp = 'param'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_uninitialized] tmp = 'initialized' [merged]
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree change [internal] unnull_path = 'true' [merged] (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0'. Was 4096-ptr_max,(-12). Now T:(-12) F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp'. Was 4096-ptr_max,(-12). Now T:(-12) F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp->bp'. Was 0-u64max. Now T: F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp->list.next'. Was 0. Now T: F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp->list.prev'. Was 0. Now T: F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra_links] 'tmp'. Was (null). Now T:__fake_param_0x7da6ac1c7630_0, tmp F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_untracked_param] 'bp'. Was merged. Now T:undefined F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_buf_size] 'tmp'. Was (-1),32. Now T:(-1) F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_statement_count] 'stmts'. Was 11. Now T:13 F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_uninitialized] 'tmp'. Was initialized. Now T:initialized F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [internal] 'unnull_path'. Was true. Now T:true F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0'. Was 4096-ptr_max,(-12). Now T:(null) F:4096-ptr_max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp'. Was 4096-ptr_max,(-12). Now T:(null) F:4096-ptr_max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp->bp'. Was 0-u64max. Now T:(null) F:0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp->list.next'. Was 0. Now T:(null) F:0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp->list.prev'. Was 0. Now T:(null) F:0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra_links] 'tmp'. Was (null). Now T:(null) F:__fake_param_0x7da6ac1c7630_0, tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_untracked_param] 'bp'. Was merged. Now T:(null) F:untracked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_buf_size] 'tmp'. Was (-1),32. Now T:(null) F:32
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_statement_count] 'stmts'. Was 11. Now T:(null) F:13
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_uninitialized] 'tmp'. Was initialized. Now T:(null) F:initialized
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [internal] 'unnull_path'. Was true. Now T:(null) F:true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_err_ptr_deref] 'tmp'. Was (null). Now T:err_ptr F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_err_ptr_deref] 'tmp'. Was (null). Now T:(null) F:checked
debug: select distinct return from return_states where call_id = '138154805589552';
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() select distinct return from return_states where call_id = '138154805589552';
1
0
debug: select distinct return from return_states where call_id = '138154805589552';
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() select distinct return from return_states where call_id = '138154805589552';
1
0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_true_false_states [register_parsed_conditions] 'condition 0x7da6ac1c7630'. Was (null). Now T:true_path F:false_path
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [internal] 'unnull_path'. Was true. Now T:true F:true
179 done __split_whole_condition
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 13 => 14
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:180 task_bps_add() set_state change [register_statement_count] 'stmts' 14 => 15
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() ---- about ----
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() implied: tmp = '(-12)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() buf size: 'tmp' 0 elements, 0 bytes
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() strlen: 'tmp' characters
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() real absolute: tmp = '(-12)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() mtag = 0 offset = 0 rl = ''
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [register_smatch_extra] tmp = '(-12)' [merged]
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [register_smatch_extra_links] tmp = '__fake_param_0x7da6ac1c7630_0, tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [register_buf_size] tmp = '(-1)' [merged]
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [register_comparison_links] tmp = '__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, __fake_param_0x7da6ac1c77c0_0 vs tmp, return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [register_fresh_alloc] tmp = 'undefined'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [check_uninitialized] tmp = 'initialized' [merged]
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [check_err_ptr_deref] tmp = 'err_ptr'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:181 task_bps_add() [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0, __fake_param_0x7da6ac1c77c0_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:178 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:178 task_bps_add() __set_sm change [register_definition_db_callbacks] db_incomplete = 'incomplete' (was incomplete)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 5 => 6
179 in __split_whole_condition
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() 179 in split_conditions (IS_ERR(tmp))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' 0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_assigned_expr] '__fake_param_0x7da6ac1c7630_0' tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_assigned_expr_links] 'tmp' __fake_param_0x7da6ac1c7450_0 => __fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_modification_hooks] '*tmp' __smatch_about(tmp) => IS_ERR(tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0'. Was 0-u64max. Now T:0-u64max F:0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp'. Was 0-u64max. Now T:0-u64max F:0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_modification_hooks] *tmp = 'IS_ERR(tmp)' (was __smatch_about(tmp))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_modification_hooks] '*tmp'. Was IS_ERR(tmp). Now T:IS_ERR(tmp) F:IS_ERR(tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_assigned_expr] '__fake_param_0x7da6ac1c7630_0'. Was tmp. Now T:tmp F:tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0' (was __fake_param_0x7da6ac1c7450_0)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_assigned_expr_links] 'tmp'. Was __fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0. Now T:__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0 F:__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [check_err_ptr_deref] 'tmp' err_ptr
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [check_err_ptr_deref] 'tmp' checked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [internal] 'unnull_path' true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp = '4096-ptr_max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->overflow_handler = '4096-ptr_max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *bp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *tmp = 'IS_ERR(tmp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_definition_db_callbacks] db_incomplete = 'incomplete'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_untracked_param] bp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] bp vs bp orig = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] bp = 'bp vs bp orig'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_statement_count] stmts = '6'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_kernel_user_data2] this_function = 'called'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_dereferences_param] bp = 'param'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_uninitialized] tmp = 'initialized'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [internal] 'unnull_path' true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp = '4096-ptr_max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->overflow_handler = '4096-ptr_max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *bp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *tmp = 'IS_ERR(tmp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_definition_db_callbacks] db_incomplete = 'incomplete'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_untracked_param] bp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] bp vs bp orig = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] bp = 'bp vs bp orig'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_statement_count] stmts = '6'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_kernel_user_data2] this_function = 'called'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_dereferences_param] bp = 'param'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_uninitialized] tmp = 'initialized'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_definition_db_callbacks] 'db_incomplete'. Was incomplete. Now T:incomplete F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_definition_db_callbacks] 'db_incomplete'. Was incomplete. Now T:(null) F:incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_untracked_param] 'tmp' untracked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_err_ptr_deref] 'tmp'. Was (null). Now T:err_ptr F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_err_ptr_deref] 'tmp'. Was (null). Now T:(null) F:checked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_true_false_states [register_parsed_conditions] 'condition 0x7da6ac1c7630'. Was (null). Now T:true_path F:false_path
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_untracked_param] tmp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_untracked_param] 'tmp'. Was untracked. Now T:untracked F:untracked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [internal] 'unnull_path'. Was true. Now T:true F:true
179 done __split_whole_condition
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 6 => 7
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:180 task_bps_add() set_state change [register_statement_count] 'stmts' 7 => 8
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:178 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:178 task_bps_add() __set_sm change [register_definition_db_callbacks] db_incomplete = 'incomplete' (was incomplete)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 5 => 6
179 in __split_whole_condition
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() 179 in split_conditions (IS_ERR(tmp))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' 0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_assigned_expr] '__fake_param_0x7da6ac1c7630_0' tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_assigned_expr_links] 'tmp' __fake_param_0x7da6ac1c7450_0 => __fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_modification_hooks] '*tmp' __smatch_about(tmp) => IS_ERR(tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0'. Was 0-u64max. Now T:0-u64max F:0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp'. Was 0-u64max. Now T:0-u64max F:0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_modification_hooks] *tmp = 'IS_ERR(tmp)' (was __smatch_about(tmp))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_modification_hooks] '*tmp'. Was IS_ERR(tmp). Now T:IS_ERR(tmp) F:IS_ERR(tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_assigned_expr] '__fake_param_0x7da6ac1c7630_0'. Was tmp. Now T:tmp F:tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0' (was __fake_param_0x7da6ac1c7450_0)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_assigned_expr_links] 'tmp'. Was __fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0. Now T:__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0 F:__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [check_err_ptr_deref] 'tmp' err_ptr
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [check_err_ptr_deref] 'tmp' checked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [internal] 'unnull_path' true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp = '4096-ptr_max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->attr.bp_addr = '0-13835058055282163711'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->cpu = '(-1)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->hw.target = '1-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->overflow_handler = '0-4644892087836254207,4644892087836254209-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *bp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *tmp = 'IS_ERR(tmp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_definition_db_callbacks] db_incomplete = 'incomplete'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_untracked_param] bp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_capped] bp->hw.target = 'capped'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] bp vs bp orig = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] bp = 'bp vs bp orig'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_statement_count] stmts = '6'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_kernel_user_data2] this_function = 'called'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_dereferences_param] bp = 'param'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_uninitialized] tmp = 'initialized'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [internal] 'unnull_path' true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp = '4096-ptr_max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->attr.bp_addr = '0-13835058055282163711'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->cpu = '(-1)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->hw.target = '1-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->overflow_handler = '0-4644892087836254207,4644892087836254209-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *bp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *tmp = 'IS_ERR(tmp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_definition_db_callbacks] db_incomplete = 'incomplete'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_untracked_param] bp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_capped] bp->hw.target = 'capped'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] bp vs bp orig = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] bp = 'bp vs bp orig'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_statement_count] stmts = '6'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_kernel_user_data2] this_function = 'called'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_dereferences_param] bp = 'param'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_uninitialized] tmp = 'initialized'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_definition_db_callbacks] 'db_incomplete'. Was incomplete. Now T:incomplete F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_definition_db_callbacks] 'db_incomplete'. Was incomplete. Now T:(null) F:incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_untracked_param] 'tmp' untracked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_err_ptr_deref] 'tmp'. Was (null). Now T:err_ptr F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_err_ptr_deref] 'tmp'. Was (null). Now T:(null) F:checked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_true_false_states [register_parsed_conditions] 'condition 0x7da6ac1c7630'. Was (null). Now T:true_path F:false_path
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_untracked_param] tmp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_untracked_param] 'tmp'. Was untracked. Now T:untracked F:untracked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [internal] 'unnull_path'. Was true. Now T:true F:true
179 done __split_whole_condition
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 6 => 7
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:180 task_bps_add() set_state change [register_statement_count] 'stmts' 7 => 8
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:178 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:178 task_bps_add() __set_sm change [register_definition_db_callbacks] db_incomplete = 'incomplete' (was incomplete)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 5 => 6
179 in __split_whole_condition
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() 179 in split_conditions (IS_ERR(tmp))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0' 0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_comparison] '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360' ==
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_comparison_links] '__fake_param_0x7da6ac1c7630_0' __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_comparison] '__fake_param_0x7da6ac1c7630_0 vs tmp' ==
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_comparison_links] '__fake_param_0x7da6ac1c7630_0' __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360 => __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_comparison_links] 'tmp' __fake_param_0x7da6ac1c7450_0 vs tmp, return 0x7da6ac1c7360 vs tmp => __fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_assigned_expr] '__fake_param_0x7da6ac1c7630_0' tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_assigned_expr_links] 'tmp' __fake_param_0x7da6ac1c7450_0 => __fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_modification_hooks] '*tmp' __smatch_about(tmp) => IS_ERR(tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] '__fake_param_0x7da6ac1c7630_0'. Was 0-u64max. Now T:0-u64max F:0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_smatch_extra] tmp = '0-u64max' (was 0-u64max)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_smatch_extra] 'tmp'. Was 0-u64max. Now T:0-u64max F:0-u64max
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_modification_hooks] *tmp = 'IS_ERR(tmp)' (was __smatch_about(tmp))
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_modification_hooks] '*tmp'. Was IS_ERR(tmp). Now T:IS_ERR(tmp) F:IS_ERR(tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360 = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_comparison] '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360'. Was ==. Now T:== F:==
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_comparison] '__fake_param_0x7da6ac1c7630_0 vs tmp'. Was ==. Now T:== F:==
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_comparison_links] __fake_param_0x7da6ac1c7630_0 = '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_comparison_links] '__fake_param_0x7da6ac1c7630_0'. Was __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp. Now T:__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp F:__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_comparison_links] tmp = '__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp' (was __fake_param_0x7da6ac1c7450_0 vs tmp, return 0x7da6ac1c7360 vs tmp)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_comparison_links] 'tmp'. Was __fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp. Now T:__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp F:__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_assigned_expr] '__fake_param_0x7da6ac1c7630_0'. Was tmp. Now T:tmp F:tmp
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0' (was __fake_param_0x7da6ac1c7450_0)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_assigned_expr_links] 'tmp'. Was __fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0. Now T:__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0 F:__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [check_err_ptr_deref] 'tmp' err_ptr
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [check_err_ptr_deref] 'tmp' checked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [internal] 'unnull_path' true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp = '4096-ptr_max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->attr.bp_addr = '0-13835058055282163711'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->overflow_handler = '0-4644892087836254207,4644892087836254209-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *bp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *tmp = 'IS_ERR(tmp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_definition_db_callbacks] db_incomplete = 'incomplete'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_untracked_param] bp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360 = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] bp vs bp orig = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] return 0x7da6ac1c7360 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] __fake_param_0x7da6ac1c7630_0 = '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] bp = 'bp vs bp orig'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] return 0x7da6ac1c7360 = 'return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] tmp = '__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_statement_count] stmts = '6'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_kernel_user_data2] this_function = 'called'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_dereferences_param] bp = 'param'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_uninitialized] tmp = 'initialized'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_definition_db_callbacks] 'db_incomplete' incomplete => incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [internal] 'unnull_path' true
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] __fake_param_0x7da6ac1c7630_0 = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp = '4096-ptr_max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->attr.bp_addr = '0-13835058055282163711'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] bp->overflow_handler = '0-4644892087836254207,4644892087836254209-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_smatch_extra] tmp = '0-u64max'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *bp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] *tmp = 'IS_ERR(tmp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_modification_hooks] tmp = 'tmp = alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_definition_db_callbacks] db_incomplete = 'incomplete'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_untracked_param] bp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360 = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] __fake_param_0x7da6ac1c7630_0 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] bp vs bp orig = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison] return 0x7da6ac1c7360 vs tmp = '=='
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] __fake_param_0x7da6ac1c7630_0 = '__fake_param_0x7da6ac1c7630_0 vs return 0x7da6ac1c7360, __fake_param_0x7da6ac1c7630_0 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] bp = 'bp vs bp orig'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] return 0x7da6ac1c7360 = 'return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_comparison_links] tmp = '__fake_param_0x7da6ac1c7450_0 vs tmp, __fake_param_0x7da6ac1c7630_0 vs tmp, return 0x7da6ac1c7360 vs tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_statement_count] stmts = '6'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_kernel_user_data2] this_function = 'called'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_deref] tmp = 'ok'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_dereferences_param] bp = 'param'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [check_uninitialized] tmp = 'initialized'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] __fake_param_0x7da6ac1c7630_0 = 'tmp'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr] tmp = 'alloc_breakpoint(bp)'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree new [register_assigned_expr_links] tmp = '__fake_param_0x7da6ac1c7450_0, __fake_param_0x7da6ac1c7630_0'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm_cur_stree change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_definition_db_callbacks] 'db_incomplete'. Was incomplete. Now T:incomplete F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_definition_db_callbacks] 'db_incomplete'. Was incomplete. Now T:(null) F:incomplete
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state new [register_untracked_param] 'tmp' untracked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_err_ptr_deref] 'tmp'. Was (null). Now T:err_ptr F:(null)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [check_err_ptr_deref] 'tmp'. Was (null). Now T:(null) F:checked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_true_false_states [register_parsed_conditions] 'condition 0x7da6ac1c7630'. Was (null). Now T:true_path F:false_path
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm new [register_untracked_param] tmp = 'untracked'
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [register_untracked_param] 'tmp'. Was untracked. Now T:untracked F:untracked
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_sm change [internal] unnull_path = 'true' (was true)
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() __set_true_false_sm [internal] 'unnull_path'. Was true. Now T:true F:true
179 done __split_whole_condition
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:179 task_bps_add() set_state change [register_statement_count] 'stmts' 6 => 7
/home/michael/linux/arch/powerpc/kernel/hw_breakpoint.c:180 task_bps_add() set_state change [register_statement_count] 'stmts' 7 => 8
^ permalink raw reply
* [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT
From: Sourabh Jain @ 2021-04-16 12:46 UTC (permalink / raw)
To: mpe; +Cc: mahesh, bauerman, hbathini, linuxppc-dev
kexec_file_load uses initial_boot_params in setting up the device-tree
for the kernel to be loaded. Though initial_boot_params holds info
about CPUs at the time of boot, it doesn't account for hot added CPUs.
So, kexec'ing with kexec_file_load syscall would leave the kexec'ed
kernel with inaccurate CPU info. Also, if kdump kernel is loaded with
kexec_file_load syscall and the system crashes on a hot added CPU,
capture kernel hangs failing to identify the boot CPU.
Kernel panic - not syncing: sysrq triggered crash
CPU: 24 PID: 6065 Comm: echo Kdump: loaded Not tainted 5.12.0-rc5upstream #54
Call Trace:
[c0000000e590fac0] [c0000000007b2400] dump_stack+0xc4/0x114 (unreliable)
[c0000000e590fb00] [c000000000145290] panic+0x16c/0x41c
[c0000000e590fba0] [c0000000008892e0] sysrq_handle_crash+0x30/0x40
[c0000000e590fc00] [c000000000889cdc] __handle_sysrq+0xcc/0x1f0
[c0000000e590fca0] [c00000000088a538] write_sysrq_trigger+0xd8/0x178
[c0000000e590fce0] [c0000000005e9b7c] proc_reg_write+0x10c/0x1b0
[c0000000e590fd10] [c0000000004f26d0] vfs_write+0xf0/0x330
[c0000000e590fd60] [c0000000004f2aec] ksys_write+0x7c/0x140
[c0000000e590fdb0] [c000000000031ee0] system_call_exception+0x150/0x290
[c0000000e590fe10] [c00000000000ca5c] system_call_common+0xec/0x278
--- interrupt: c00 at 0x7fff905b9664
NIP: 00007fff905b9664 LR: 00007fff905320c4 CTR: 0000000000000000
REGS: c0000000e590fe80 TRAP: 0c00 Not tainted (5.12.0-rc5upstream)
MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 28000242
XER: 00000000
IRQMASK: 0
GPR00: 0000000000000004 00007ffff5fedf30 00007fff906a7300 0000000000000001
GPR04: 000001002a7355b0 0000000000000002 0000000000000001 00007ffff5fef616
GPR08: 0000000000000001 0000000000000000 0000000000000000 0000000000000000
GPR12: 0000000000000000 00007fff9073a160 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 00007fff906a4ee0 0000000000000002 0000000000000001
GPR24: 00007fff906a0898 0000000000000000 0000000000000002 000001002a7355b0
GPR28: 0000000000000002 00007fff906a1790 000001002a7355b0 0000000000000002
NIP [00007fff905b9664] 0x7fff905b9664
LR [00007fff905320c4] 0x7fff905320c4
--- interrupt: c00
To avoid this from happening, extract current CPU info from of_root
device node and use it for setting up the fdt in kexec_file_load case.
Fixes: 6ecd0163d360 ("powerpc/kexec_file: Add appropriate regions for memory reserve map")
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
arch/powerpc/kexec/file_load_64.c | 98 +++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
---
Changelog:
v1 -> v2
- fdt should be updated regardless of kexec type
- updated commit message and title
---
diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c
index 02b9e4d0dc40..21d2f0e172ed 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -960,6 +960,99 @@ unsigned int kexec_fdt_totalsize_ppc64(struct kimage *image)
return fdt_size;
}
+/**
+ * add_node_prop - Read property from device node structure and add
+ * them to fdt.
+ * @fdt: Flattened device tree of the kernel
+ * @node_offset: offset of the node to add a property at
+ * np: device node pointer
+ *
+ * Returns 0 on success, negative errno on error.
+ */
+int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
+{
+ int ret = 0;
+ struct property *pp;
+ unsigned long flags;
+
+ if (!np)
+ return -EINVAL;
+
+ raw_spin_lock_irqsave(&devtree_lock, flags);
+ for (pp = np->properties; pp; pp = pp->next) {
+ ret = fdt_setprop(fdt, node_offset, pp->name,
+ pp->value, pp->length);
+ if (ret < 0) {
+ pr_err("Unable to add %s property: %s\n",
+ pp->name, fdt_strerror(ret));
+ goto out;
+ }
+ }
+out:
+ raw_spin_unlock_irqrestore(&devtree_lock, flags);
+ return ret;
+}
+
+/**
+ * update_cpus_node - Update cpus node of flattened device-tree using of_root
+ * device node.
+ * @fdt: Flattened device tree of the kernel.
+ *
+ * Returns 0 on success, negative errno on error.
+ */
+int update_cpus_node(void *fdt)
+{
+ struct device_node *cpus_node, *dn;
+ int cpus_offset, cpus_subnode_off, ret = 0;
+
+ cpus_offset = fdt_path_offset(fdt, "/cpus");
+ if (cpus_offset == -FDT_ERR_NOTFOUND || cpus_offset > 0) {
+ if (cpus_offset > 0) {
+ ret = fdt_del_node(fdt, cpus_offset);
+ if (ret < 0) {
+ pr_err("Error deleting /cpus node: %s\n",
+ fdt_strerror(ret));
+ return -EINVAL;
+ }
+ }
+
+ /* Add cpus node to fdt */
+ cpus_offset = fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"),
+ "cpus");
+ if (cpus_offset < 0) {
+ pr_err("Error creating /cpus node: %s\n",
+ fdt_strerror(cpus_offset));
+ return -EINVAL;
+ }
+
+ /* Add cpus node properties */
+ cpus_node = of_find_node_by_path("/cpus");
+ ret = add_node_prop(fdt, cpus_offset, cpus_node);
+ if (ret < 0)
+ return ret;
+
+ /* Loop through all subnodes of cpus and add them to fdt */
+ for_each_node_by_type(dn, "cpu") {
+ cpus_subnode_off = fdt_add_subnode(fdt,
+ cpus_offset,
+ dn->full_name);
+ if (cpus_subnode_off < 0) {
+ pr_err("Unable to add %s subnode: %s\n",
+ dn->full_name, fdt_strerror(cpus_subnode_off));
+ return cpus_subnode_off;
+ }
+ ret = add_node_prop(fdt, cpus_subnode_off, dn);
+ if (ret < 0)
+ return ret;
+ }
+ } else if (cpus_offset < 0) {
+ pr_err("Malformed device tree: error reading /cpus node: %s\n",
+ fdt_strerror(cpus_offset));
+ }
+
+ return ret;
+}
+
/**
* setup_new_fdt_ppc64 - Update the flattend device-tree of the kernel
* being loaded.
@@ -1020,6 +1113,11 @@ int setup_new_fdt_ppc64(const struct kimage *image, void *fdt,
}
}
+ /* Update cpus nodes information to account hotplug CPUs. */
+ ret = update_cpus_node(fdt);
+ if (ret < 0)
+ return ret;
+
/* Update memory reserve map */
ret = get_reserved_memory_ranges(&rmem);
if (ret)
--
2.26.3
^ permalink raw reply related
* Re: [PATCH 2/2] tools: do not include scripts/Kbuild.include
From: Masahiro Yamada @ 2021-04-16 12:53 UTC (permalink / raw)
To: Christian Borntraeger
Cc: Song Liu, kvm, Alexei Starovoitov, Paul Mackerras,
open list:KERNEL SELFTEST FRAMEWORK, Shuah Khan, Janosch Frank,
Daniel Borkmann, John Fastabend, Andrii Nakryiko,
clang-built-linux, Harish, Yonghong Song,
Linux Kbuild mailing list, KP Singh, Nathan Chancellor,
Networking, Nick Desaulniers, Linux Kernel Mailing List,
Paolo Bonzini, bpf, linuxppc-dev, Martin KaFai Lau
In-Reply-To: <0eeed665-a105-917b-e7fb-8dafe2ae9d94@de.ibm.com>
On Fri, Apr 16, 2021 at 2:56 PM Christian Borntraeger
<borntraeger@de.ibm.com> wrote:
>
>
> On 15.04.21 10:06, Christian Borntraeger wrote:
> >
> > On 15.04.21 09:27, Masahiro Yamada wrote:
> >> Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to
> >> scripts/Makefile.compiler"), some kselftests fail to build.
> >>
> >> The tools/ directory opted out Kbuild, and went in a different
> >> direction. They copy any kind of files to the tools/ directory
> >> in order to do whatever they want to do in their world.
> >>
> >> tools/build/Build.include mimics scripts/Kbuild.include, but some
> >> tool Makefiles included the Kbuild one to import a feature that is
> >> missing in tools/build/Build.include:
> >>
> >> - Commit ec04aa3ae87b ("tools/thermal: tmon: use "-fstack-protector"
> >> only if supported") included scripts/Kbuild.include from
> >> tools/thermal/tmon/Makefile to import the cc-option macro.
> >>
> >> - Commit c2390f16fc5b ("selftests: kvm: fix for compilers that do
> >> not support -no-pie") included scripts/Kbuild.include from
> >> tools/testing/selftests/kvm/Makefile to import the try-run macro.
> >>
> >> - Commit 9cae4ace80ef ("selftests/bpf: do not ignore clang
> >> failures") included scripts/Kbuild.include from
> >> tools/testing/selftests/bpf/Makefile to import the .DELETE_ON_ERROR
> >> target.
> >>
> >> - Commit 0695f8bca93e ("selftests/powerpc: Handle Makefile for
> >> unrecognized option") included scripts/Kbuild.include from
> >> tools/testing/selftests/powerpc/pmu/ebb/Makefile to import the
> >> try-run macro.
> >>
> >> Copy what they want there, and stop including scripts/Kbuild.include
> >> from the tool Makefiles.
> >>
> >> Link: https://lore.kernel.org/lkml/86dadf33-70f7-a5ac-cb8c-64966d2f45a1@linux.ibm.com/
> >> Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler")
> >> Reported-by: Janosch Frank <frankja@linux.ibm.com>
> >> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> >> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> >
> > When applying this on top of d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler")
> >
> > I still do get
> >
> > # ==== Test Assertion Failure ====
> > # lib/kvm_util.c:142: vm->fd >= 0
> > # pid=315635 tid=315635 - Invalid argument
> > # 1 0x0000000001002f4b: vm_open at kvm_util.c:142
> > # 2 (inlined by) vm_create at kvm_util.c:258
> > # 3 0x00000000010015ef: test_add_max_memory_regions at set_memory_region_test.c:351
> > # 4 (inlined by) main at set_memory_region_test.c:397
> > # 5 0x000003ff971abb89: ?? ??:0
> > # 6 0x00000000010017ad: .annobin_abi_note.c.hot at crt1.o:?
> > # KVM_CREATE_VM ioctl failed, rc: -1 errno: 22
> > not ok 7 selftests: kvm: set_memory_region_test # exit=254
> >
> > and the testcase compilation does not pickup the pgste option.
>
> What does work is the following:
> diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> index a6d61f451f88..d9c6d9c2069e 100644
> --- a/tools/testing/selftests/kvm/Makefile
> +++ b/tools/testing/selftests/kvm/Makefile
> @@ -1,5 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0-only
> include ../../../../scripts/Kbuild.include
> +include ../../../../scripts/Makefile.compiler
>
> all:
>
>
> as it does pickup the linker option handling.
Kbuild and the tools are divorced.
They cannot be married unless the tools/
build system is largely refactored.
That will be a tons of works (and
I am not sure if it is welcome).
The Kbuild refactoring should not be bothered by
the tools.
For now, I want them separated from each other.
--
Best Regards
Masahiro Yamada
^ permalink raw reply
* Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()
From: Steven Price @ 2021-04-16 13:00 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, akpm
Cc: linux-arch, linux-s390, x86, linux-kernel, linux-mm, linux-riscv,
linuxppc-dev, linux-arm-kernel
In-Reply-To: <6ff4816b-8ff6-19de-73a2-3fcadc003ccd@csgroup.eu>
On 16/04/2021 12:08, Christophe Leroy wrote:
>
>
> Le 16/04/2021 à 12:51, Steven Price a écrit :
>> On 16/04/2021 11:38, Christophe Leroy wrote:
>>>
>>>
>>> Le 16/04/2021 à 11:28, Steven Price a écrit :
>>>> On 15/04/2021 18:18, Christophe Leroy wrote:
>>>>> In order to support large pages on powerpc, notepage()
>>>>> needs to know the page size of the page.
>>>>>
>>>>> Add a page_size argument to notepage().
>>>>>
>>>>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>>>>> ---
>>>>> arch/arm64/mm/ptdump.c | 2 +-
>>>>> arch/riscv/mm/ptdump.c | 2 +-
>>>>> arch/s390/mm/dump_pagetables.c | 3 ++-
>>>>> arch/x86/mm/dump_pagetables.c | 2 +-
>>>>> include/linux/ptdump.h | 2 +-
>>>>> mm/ptdump.c | 16 ++++++++--------
>>>>> 6 files changed, 14 insertions(+), 13 deletions(-)
>>>>>
>>>> [...]
>>>>> diff --git a/mm/ptdump.c b/mm/ptdump.c
>>>>> index da751448d0e4..61cd16afb1c8 100644
>>>>> --- a/mm/ptdump.c
>>>>> +++ b/mm/ptdump.c
>>>>> @@ -17,7 +17,7 @@ static inline int note_kasan_page_table(struct
>>>>> mm_walk *walk,
>>>>> {
>>>>> struct ptdump_state *st = walk->private;
>>>>> - st->note_page(st, addr, 4, pte_val(kasan_early_shadow_pte[0]));
>>>>> + st->note_page(st, addr, 4, pte_val(kasan_early_shadow_pte[0]),
>>>>> PAGE_SIZE);
>>>>
>>>> I'm not completely sure what the page_size is going to be used for,
>>>> but note that KASAN presents an interesting case here. We short-cut
>>>> by detecting it's a KASAN region at a high level (PGD/P4D/PUD/PMD)
>>>> and instead of walking the tree down just call note_page() *once*
>>>> but with level==4 because we know KASAN sets up the page table like
>>>> that.
>>>>
>>>> However the one call actually covers a much larger region - so while
>>>> PAGE_SIZE matches the level it doesn't match the region covered.
>>>> AFAICT this will lead to odd results if you enable KASAN on powerpc.
>>>
>>> Hum .... I successfully tested it with KASAN, I now realise that I
>>> tested it with CONFIG_KASAN_VMALLOC selected. In this situation,
>>> since https://github.com/torvalds/linux/commit/af3d0a686 we don't
>>> have any common shadow page table anymore.
>>>
>>> I'll test again without CONFIG_KASAN_VMALLOC.
>>>
>>>>
>>>> To be honest I don't fully understand why powerpc requires the
>>>> page_size - it appears to be using it purely to find "holes" in the
>>>> calls to note_page(), but I haven't worked out why such holes would
>>>> occur.
>>>
>>> I was indeed introduced for KASAN. We have a first commit
>>> https://github.com/torvalds/linux/commit/cabe8138 which uses page
>>> size to detect whether it is a KASAN like stuff.
>>>
>>> Then came https://github.com/torvalds/linux/commit/b00ff6d8c as a
>>> fix. I can't remember what the problem was exactly, something around
>>> the use of hugepages for kernel memory, came as part of the series
>>> https://patchwork.ozlabs.org/project/linuxppc-dev/cover/cover.1589866984.git.christophe.leroy@csgroup.eu/
>>
>>
>>
>> Ah, that's useful context. So it looks like powerpc took a different
>> route to reducing the KASAN output to x86.
>>
>> Given the generic ptdump code has handling for KASAN already it should
>> be possible to drop that from the powerpc arch code, which I think
>> means we don't actually need to provide page size to notepage().
>> Hopefully that means more code to delete ;)
>>
>
> Yes ... and no.
>
> It looks like the generic ptdump handles the case when several pgdir
> entries points to the same kasan_early_shadow_pte. But it doesn't take
> into account the powerpc case where we have regular page tables where
> several (if not all) PTEs are pointing to the kasan_early_shadow_page .
I'm not sure I follow quite how powerpc is different here. But could you
have a similar check for PTEs against kasan_early_shadow_pte as the
other levels already have?
I'm just worried that page_size isn't well defined in this interface and
it's going to cause problems in the future.
Steve
^ permalink raw reply
* [PATCH v2] tools: do not include scripts/Kbuild.include
From: Masahiro Yamada @ 2021-04-16 13:00 UTC (permalink / raw)
To: linux-kbuild
Cc: Song Liu, kvm, Alexei Starovoitov, Paul Mackerras,
linux-kselftest, Shuah Khan, Janosch Frank, Daniel Borkmann,
clang-built-linux, Masahiro Yamada, John Fastabend,
Andrii Nakryiko, Christian Borntraeger, Yonghong Song, KP Singh,
Nathan Chancellor, netdev, Nick Desaulniers, linux-kernel,
Paolo Bonzini, bpf, linuxppc-dev, Martin KaFai Lau
Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to
scripts/Makefile.compiler"), some kselftests fail to build.
The tools/ directory opted out Kbuild, and went in a different
direction. They copy any kind of files to the tools/ directory
in order to do whatever they want in their world.
tools/build/Build.include mimics scripts/Kbuild.include, but some
tool Makefiles included the Kbuild one to import a feature that is
missing in tools/build/Build.include:
- Commit ec04aa3ae87b ("tools/thermal: tmon: use "-fstack-protector"
only if supported") included scripts/Kbuild.include from
tools/thermal/tmon/Makefile to import the cc-option macro.
- Commit c2390f16fc5b ("selftests: kvm: fix for compilers that do
not support -no-pie") included scripts/Kbuild.include from
tools/testing/selftests/kvm/Makefile to import the try-run macro.
- Commit 9cae4ace80ef ("selftests/bpf: do not ignore clang
failures") included scripts/Kbuild.include from
tools/testing/selftests/bpf/Makefile to import the .DELETE_ON_ERROR
target.
- Commit 0695f8bca93e ("selftests/powerpc: Handle Makefile for
unrecognized option") included scripts/Kbuild.include from
tools/testing/selftests/powerpc/pmu/ebb/Makefile to import the
try-run macro.
Copy what they need into tools/build/Build.include, and make them
include it instead of scripts/Kbuild.include.
Link: https://lore.kernel.org/lkml/86dadf33-70f7-a5ac-cb8c-64966d2f45a1@linux.ibm.com/
Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler")
Reported-by: Janosch Frank <frankja@linux.ibm.com>
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Changes in v2:
- copy macros to tools/build/BUild.include
tools/build/Build.include | 24 +++++++++++++++++++
tools/testing/selftests/bpf/Makefile | 2 +-
tools/testing/selftests/kvm/Makefile | 2 +-
.../selftests/powerpc/pmu/ebb/Makefile | 2 +-
tools/thermal/tmon/Makefile | 2 +-
5 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/tools/build/Build.include b/tools/build/Build.include
index 585486e40995..2cf3b1bde86e 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -100,3 +100,27 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXX
## HOSTCC C flags
host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(KBUILD_HOSTCFLAGS) -D"BUILD_STR(s)=\#s" $(HOSTCFLAGS_$(basetarget).o) $(HOSTCFLAGS_$(obj))
+
+# output directory for tests below
+TMPOUT = .tmp_$$$$
+
+# try-run
+# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
+# Exit code chooses option. "$$TMP" serves as a temporary file and is
+# automatically cleaned up.
+try-run = $(shell set -e; \
+ TMP=$(TMPOUT)/tmp; \
+ mkdir -p $(TMPOUT); \
+ trap "rm -rf $(TMPOUT)" EXIT; \
+ if ($(1)) >/dev/null 2>&1; \
+ then echo "$(2)"; \
+ else echo "$(3)"; \
+ fi)
+
+# cc-option
+# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
+cc-option = $(call try-run, \
+ $(CC) -Werror $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
+
+# delete partially updated (i.e. corrupted) files on error
+.DELETE_ON_ERROR:
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 044bfdcf5b74..17a5cdf48d37 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-include ../../../../scripts/Kbuild.include
+include ../../../build/Build.include
include ../../../scripts/Makefile.arch
include ../../../scripts/Makefile.include
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index a6d61f451f88..5ef141f265bd 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-include ../../../../scripts/Kbuild.include
+include ../../../build/Build.include
all:
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index af3df79d8163..c5ecb4634094 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-include ../../../../../../scripts/Kbuild.include
+include ../../../../../build/Build.include
noarg:
$(MAKE) -C ../../
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 59e417ec3e13..9db867df7679 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
# We need this for the "cc-option" macro.
-include ../../../scripts/Kbuild.include
+include ../../build/Build.include
VERSION = 1.0
--
2.27.0
^ permalink raw reply related
* [PATCH] powerpc/pseries/mce: Fix a typo in error type assignment
From: Ganesh Goudar @ 2021-04-16 12:57 UTC (permalink / raw)
To: linuxppc-dev, mpe; +Cc: Ganesh Goudar, mahesh, npiggin
The error type is ICACHE and DCACHE, for case MCE_ERROR_TYPE_ICACHE.
Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
---
arch/powerpc/platforms/pseries/ras.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index f8b390a9d9fb..9d4ef65da7f3 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -699,7 +699,7 @@ static int mce_handle_err_virtmode(struct pt_regs *regs,
mce_err.error_type = MCE_ERROR_TYPE_DCACHE;
break;
case MC_ERROR_TYPE_I_CACHE:
- mce_err.error_type = MCE_ERROR_TYPE_DCACHE;
+ mce_err.error_type = MCE_ERROR_TYPE_ICACHE;
break;
case MC_ERROR_TYPE_UNKNOWN:
default:
--
2.26.2
^ permalink raw reply related
* Re: [PATCH v2] tools: do not include scripts/Kbuild.include
From: Christian Borntraeger @ 2021-04-16 13:26 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild
Cc: Song Liu, kvm, Alexei Starovoitov, Paul Mackerras,
linux-kselftest, Shuah Khan, Janosch Frank, Daniel Borkmann,
John Fastabend, Andrii Nakryiko, clang-built-linux, Yonghong Song,
KP Singh, Nathan Chancellor, netdev, Nick Desaulniers,
linux-kernel, Paolo Bonzini, bpf, linuxppc-dev, Martin KaFai Lau
In-Reply-To: <20210416130051.239782-1-masahiroy@kernel.org>
On 16.04.21 15:00, Masahiro Yamada wrote:
> Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to
> scripts/Makefile.compiler"), some kselftests fail to build.
>
> The tools/ directory opted out Kbuild, and went in a different
> direction. They copy any kind of files to the tools/ directory
> in order to do whatever they want in their world.
>
> tools/build/Build.include mimics scripts/Kbuild.include, but some
> tool Makefiles included the Kbuild one to import a feature that is
> missing in tools/build/Build.include:
>
> - Commit ec04aa3ae87b ("tools/thermal: tmon: use "-fstack-protector"
> only if supported") included scripts/Kbuild.include from
> tools/thermal/tmon/Makefile to import the cc-option macro.
>
> - Commit c2390f16fc5b ("selftests: kvm: fix for compilers that do
> not support -no-pie") included scripts/Kbuild.include from
> tools/testing/selftests/kvm/Makefile to import the try-run macro.
>
> - Commit 9cae4ace80ef ("selftests/bpf: do not ignore clang
> failures") included scripts/Kbuild.include from
> tools/testing/selftests/bpf/Makefile to import the .DELETE_ON_ERROR
> target.
>
> - Commit 0695f8bca93e ("selftests/powerpc: Handle Makefile for
> unrecognized option") included scripts/Kbuild.include from
> tools/testing/selftests/powerpc/pmu/ebb/Makefile to import the
> try-run macro.
>
> Copy what they need into tools/build/Build.include, and make them
> include it instead of scripts/Kbuild.include.
>
> Link: https://lore.kernel.org/lkml/86dadf33-70f7-a5ac-cb8c-64966d2f45a1@linux.ibm.com/
> Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler")
> Reported-by: Janosch Frank <frankja@linux.ibm.com>
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
looks better.
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
^ permalink raw reply
* Re: [PATCH v2] tools: do not include scripts/Kbuild.include
From: Paolo Bonzini @ 2021-04-16 13:27 UTC (permalink / raw)
To: Christian Borntraeger, Masahiro Yamada, linux-kbuild
Cc: Song Liu, kvm, Alexei Starovoitov, Paul Mackerras,
linux-kselftest, Shuah Khan, Janosch Frank, Daniel Borkmann,
John Fastabend, Andrii Nakryiko, clang-built-linux, Yonghong Song,
KP Singh, Nathan Chancellor, netdev, Nick Desaulniers,
linux-kernel, bpf, linuxppc-dev, Martin KaFai Lau
In-Reply-To: <ee99eb80-5711-9349-23a4-0faf8d7b60a8@de.ibm.com>
On 16/04/21 15:26, Christian Borntraeger wrote:
>
>
> On 16.04.21 15:00, Masahiro Yamada wrote:
>> Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to
>> scripts/Makefile.compiler"), some kselftests fail to build.
>>
>> The tools/ directory opted out Kbuild, and went in a different
>> direction. They copy any kind of files to the tools/ directory
>> in order to do whatever they want in their world.
>>
>> tools/build/Build.include mimics scripts/Kbuild.include, but some
>> tool Makefiles included the Kbuild one to import a feature that is
>> missing in tools/build/Build.include:
>>
>> - Commit ec04aa3ae87b ("tools/thermal: tmon: use "-fstack-protector"
>> only if supported") included scripts/Kbuild.include from
>> tools/thermal/tmon/Makefile to import the cc-option macro.
>>
>> - Commit c2390f16fc5b ("selftests: kvm: fix for compilers that do
>> not support -no-pie") included scripts/Kbuild.include from
>> tools/testing/selftests/kvm/Makefile to import the try-run macro.
>>
>> - Commit 9cae4ace80ef ("selftests/bpf: do not ignore clang
>> failures") included scripts/Kbuild.include from
>> tools/testing/selftests/bpf/Makefile to import the .DELETE_ON_ERROR
>> target.
>>
>> - Commit 0695f8bca93e ("selftests/powerpc: Handle Makefile for
>> unrecognized option") included scripts/Kbuild.include from
>> tools/testing/selftests/powerpc/pmu/ebb/Makefile to import the
>> try-run macro.
>>
>> Copy what they need into tools/build/Build.include, and make them
>> include it instead of scripts/Kbuild.include.
>>
>> Link:
>> https://lore.kernel.org/lkml/86dadf33-70f7-a5ac-cb8c-64966d2f45a1@linux.ibm.com/
>>
>> Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to
>> scripts/Makefile.compiler")
>> Reported-by: Janosch Frank <frankja@linux.ibm.com>
>> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>
> looks better.
> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
>
Thank you very much Masahiro, this look great.
Paolo
^ permalink raw reply
* Re: Bogus struct page layout on 32-bit
From: Arnd Bergmann @ 2021-04-16 14:10 UTC (permalink / raw)
To: Grygorii Strashko
Cc: kbuild-all, kernel test robot, clang-built-linux,
Ilias Apalodimas, open list, Matthew Wilcox, David S. Miller,
Linux-MM, netdev@vger.kernel.org, Jesper Dangaard Brouer,
linux-fsdevel, Paul Mackerras, Matteo Croce, linuxppc-dev,
Christoph Hellwig, Linux ARM
In-Reply-To: <ab9f1a6c-4099-2b59-457d-fcc45d2396f4@ti.com>
On Fri, Apr 16, 2021 at 11:27 AM 'Grygorii Strashko' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
> On 10/04/2021 11:52, Ilias Apalodimas wrote:
> > +CC Grygorii for the cpsw part as Ivan's email is not valid anymore
> The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit DMA even in case of LPAE (dma-ranges are used).
> Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been selected for the LPAE case
> on TI platforms and the fact that it became set is the result of multi-paltform/allXXXconfig/DMA
> optimizations and unification.
> (just checked - not set in 4.14)
>
> Probable commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig").
I completely missed this change in the past, and I don't really agree
with it either.
Most 32-bit Arm platforms are in fact limited to 32-bit DMA, even when they have
MMIO or RAM areas above the 4GB boundary that require LPAE.
> The TI drivers have been updated, finally to accept ARCH_DMA_ADDR_T_64BIT=y by using
> things like (__force u32) for example.
>
> Honestly, I've done sanity check of CPSW with LPAE=y (ARCH_DMA_ADDR_T_64BIT=y) very long time ago.
This is of course a good idea, drivers should work with any
combination of 32-bit
or 64-bit phys_addr_t and dma_addr_t.
Arnd
^ permalink raw reply
* Re: [PATCH] powerpc: Initialize local variable fdt to NULL in elf64_load()
From: Lakshmi Ramasubramanian @ 2021-04-16 14:37 UTC (permalink / raw)
To: Michael Ellerman, Daniel Axtens, robh, dan.carpenter
Cc: devicetree, linuxppc-dev, kbuild-all, bauerman, lkp
In-Reply-To: <87tuo6eh0j.fsf@mpe.ellerman.id.au>
On 4/16/21 2:05 AM, Michael Ellerman wrote:
> Daniel Axtens <dja@axtens.net> writes:
>>> On 4/15/21 12:14 PM, Lakshmi Ramasubramanian wrote:
>>>
>>> Sorry - missed copying device-tree and powerpc mailing lists.
>>>
>>>> There are a few "goto out;" statements before the local variable "fdt"
>>>> is initialized through the call to of_kexec_alloc_and_setup_fdt() in
>>>> elf64_load(). This will result in an uninitialized "fdt" being passed
>>>> to kvfree() in this function if there is an error before the call to
>>>> of_kexec_alloc_and_setup_fdt().
>>>>
>>>> Initialize the local variable "fdt" to NULL.
>>>>
>> I'm a huge fan of initialising local variables! But I'm struggling to
>> find the code path that will lead to an uninit fdt being returned...
>>
>> The out label reads in part:
>>
>> /* Make kimage_file_post_load_cleanup free the fdt buffer for us. */
>> return ret ? ERR_PTR(ret) : fdt;
>>
>> As far as I can tell, any time we get a non-zero ret, we're going to
>> return an error pointer rather than the uninitialised value...
As Dan pointed out, the new code is in linux-next.
I have copied the new one below - the function doesn't return fdt, but
instead sets it in the arch specific field (please see the link to the
updated elf_64.c below).
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/tree/arch/powerpc/kexec/elf_64.c?h=for-next
>>
>> (btw, it does look like we might leak fdt if we have an error after we
>> successfully kmalloc it.)
>>
>> Am I missing something? Can you link to the report for the kernel test
>> robot or from Dan?
/*
* Once FDT buffer has been successfully passed to
kexec_add_buffer(),
* the FDT buffer address is saved in image->arch.fdt. In that
case,
* the memory cannot be freed here in case of any other error.
*/
if (ret && !image->arch.fdt)
kvfree(fdt);
return ret ? ERR_PTR(ret) : NULL;
In case of an error, the memory allocated for fdt is freed unless it has
already been passed to kexec_add_buffer().
thanks,
-lakshmi
>>
>> FWIW, I think it's worth including this patch _anyway_ because initing
>> local variables is good practice, but I'm just not sure on the
>> justification.
>
> Why is it good practice?
>
> It defeats -Wuninitialized. So you're guaranteed to be returning
> something initialised, but not necessarily initialised to the right
> value.
>
> In a case like this NULL seems like a safe choice, but it's still wrong.
> The function is meant to return a pointer to the successfully allocated
> fdt, or an ERR_PTR() value. NULL is neither of those.
>
> I agree there are security reasons that initialising stack variables is
> desirable, but I think that should be handled by the compiler, not at
> the source level.
>
> cheers
>
^ permalink raw reply
* Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()
From: Christophe Leroy @ 2021-04-16 14:40 UTC (permalink / raw)
To: Steven Price, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, akpm
Cc: linux-arch, linux-s390, x86, linux-kernel, linux-mm, linux-riscv,
linuxppc-dev, linux-arm-kernel
In-Reply-To: <e39d500a-2154-3c5d-9393-8bf53a567fad@arm.com>
Le 16/04/2021 à 15:00, Steven Price a écrit :
> On 16/04/2021 12:08, Christophe Leroy wrote:
>>
>>
>> Le 16/04/2021 à 12:51, Steven Price a écrit :
>>> On 16/04/2021 11:38, Christophe Leroy wrote:
>>>>
>>>>
>>>> Le 16/04/2021 à 11:28, Steven Price a écrit :
>>>>> On 15/04/2021 18:18, Christophe Leroy wrote:
>>>>>> In order to support large pages on powerpc, notepage()
>>>>>> needs to know the page size of the page.
>>>>>>
>>>>>> Add a page_size argument to notepage().
>>>>>>
>>>>>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>>>>>> ---
>>>>>> arch/arm64/mm/ptdump.c | 2 +-
>>>>>> arch/riscv/mm/ptdump.c | 2 +-
>>>>>> arch/s390/mm/dump_pagetables.c | 3 ++-
>>>>>> arch/x86/mm/dump_pagetables.c | 2 +-
>>>>>> include/linux/ptdump.h | 2 +-
>>>>>> mm/ptdump.c | 16 ++++++++--------
>>>>>> 6 files changed, 14 insertions(+), 13 deletions(-)
>>>>>>
>>>>> [...]
>>>>>> diff --git a/mm/ptdump.c b/mm/ptdump.c
>>>>>> index da751448d0e4..61cd16afb1c8 100644
>>>>>> --- a/mm/ptdump.c
>>>>>> +++ b/mm/ptdump.c
>>>>>> @@ -17,7 +17,7 @@ static inline int note_kasan_page_table(struct mm_walk *walk,
>>>>>> {
>>>>>> struct ptdump_state *st = walk->private;
>>>>>> - st->note_page(st, addr, 4, pte_val(kasan_early_shadow_pte[0]));
>>>>>> + st->note_page(st, addr, 4, pte_val(kasan_early_shadow_pte[0]), PAGE_SIZE);
>>>>>
>>>>> I'm not completely sure what the page_size is going to be used for, but note that KASAN
>>>>> presents an interesting case here. We short-cut by detecting it's a KASAN region at a high
>>>>> level (PGD/P4D/PUD/PMD) and instead of walking the tree down just call note_page() *once* but
>>>>> with level==4 because we know KASAN sets up the page table like that.
>>>>>
>>>>> However the one call actually covers a much larger region - so while PAGE_SIZE matches the
>>>>> level it doesn't match the region covered. AFAICT this will lead to odd results if you enable
>>>>> KASAN on powerpc.
>>>>
>>>> Hum .... I successfully tested it with KASAN, I now realise that I tested it with
>>>> CONFIG_KASAN_VMALLOC selected. In this situation, since
>>>> https://github.com/torvalds/linux/commit/af3d0a686 we don't have any common shadow page table
>>>> anymore.
>>>>
>>>> I'll test again without CONFIG_KASAN_VMALLOC.
>>>>
>>>>>
>>>>> To be honest I don't fully understand why powerpc requires the page_size - it appears to be
>>>>> using it purely to find "holes" in the calls to note_page(), but I haven't worked out why such
>>>>> holes would occur.
>>>>
>>>> I was indeed introduced for KASAN. We have a first commit
>>>> https://github.com/torvalds/linux/commit/cabe8138 which uses page size to detect whether it is a
>>>> KASAN like stuff.
>>>>
>>>> Then came https://github.com/torvalds/linux/commit/b00ff6d8c as a fix. I can't remember what the
>>>> problem was exactly, something around the use of hugepages for kernel memory, came as part of
>>>> the series
>>>> https://patchwork.ozlabs.org/project/linuxppc-dev/cover/cover.1589866984.git.christophe.leroy@csgroup.eu/
>>>
>>>
>>>
>>>
>>> Ah, that's useful context. So it looks like powerpc took a different route to reducing the KASAN
>>> output to x86.
>>>
>>> Given the generic ptdump code has handling for KASAN already it should be possible to drop that
>>> from the powerpc arch code, which I think means we don't actually need to provide page size to
>>> notepage(). Hopefully that means more code to delete ;)
>>>
>>
>> Yes ... and no.
>>
>> It looks like the generic ptdump handles the case when several pgdir entries points to the same
>> kasan_early_shadow_pte. But it doesn't take into account the powerpc case where we have regular
>> page tables where several (if not all) PTEs are pointing to the kasan_early_shadow_page .
>
> I'm not sure I follow quite how powerpc is different here. But could you have a similar check for
> PTEs against kasan_early_shadow_pte as the other levels already have?
>
> I'm just worried that page_size isn't well defined in this interface and it's going to cause
> problems in the future.
>
I'm trying. I reverted the two commits b00ff6d8c and cabe8138.
At the moment, I don't get exactly what I expect: For linear memory I get one line for each 8M page
whereas before reverting the patches I got one 16M line and one 112M line.
And for KASAN shadow area I get two lines for the 2x 8M pages shadowing linear mem then I get one 4M
line for each PGDIR entry pointing to kasan_early_shadow_pte.
0xf8000000-0xf87fffff 0x07000000 8M huge rw present
0xf8800000-0xf8ffffff 0x07800000 8M huge rw present
0xf9000000-0xf93fffff 0x01430000 4M r present
0xf9400000-0xf97fffff 0x01430000 4M r present
0xf9800000-0xf9bfffff 0x01430000 4M r present
0xf9c00000-0xf9ffffff 0x01430000 4M r present
0xfa000000-0xfa3fffff 0x01430000 4M r present
0xfa400000-0xfa7fffff 0x01430000 4M r present
0xfa800000-0xfabfffff 0x01430000 4M r present
0xfac00000-0xfaffffff 0x01430000 4M r present
0xfb000000-0xfb3fffff 0x01430000 4M r present
0xfb400000-0xfb7fffff 0x01430000 4M r present
0xfb800000-0xfbbfffff 0x01430000 4M r present
0xfbc00000-0xfbffffff 0x01430000 4M r present
0xfc000000-0xfc3fffff 0x01430000 4M r present
0xfc400000-0xfc7fffff 0x01430000 4M r present
0xfc800000-0xfcbfffff 0x01430000 4M r present
0xfcc00000-0xfcffffff 0x01430000 4M r present
0xfd000000-0xfd3fffff 0x01430000 4M r present
0xfd400000-0xfd7fffff 0x01430000 4M r present
0xfd800000-0xfdbfffff 0x01430000 4M r present
0xfdc00000-0xfdffffff 0x01430000 4M r present
0xfe000000-0xfe3fffff 0x01430000 4M r present
0xfe400000-0xfe7fffff 0x01430000 4M r present
0xfe800000-0xfebfffff 0x01430000 4M r present
0xfec00000-0xfeffffff 0x01430000 4M r present
Any idea ?
Christophe
^ permalink raw reply
* Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()
From: Christophe Leroy @ 2021-04-16 15:04 UTC (permalink / raw)
To: Steven Price, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, akpm
Cc: linux-arch, linux-s390, x86, linux-kernel, linux-mm, linux-riscv,
linuxppc-dev, linux-arm-kernel
In-Reply-To: <b6b5300d-35a0-3bc0-ad1d-f2af433ef27e@csgroup.eu>
Le 16/04/2021 à 16:40, Christophe Leroy a écrit :
>
>
> Le 16/04/2021 à 15:00, Steven Price a écrit :
>> On 16/04/2021 12:08, Christophe Leroy wrote:
>>>
>>>
>>> Le 16/04/2021 à 12:51, Steven Price a écrit :
>>>> On 16/04/2021 11:38, Christophe Leroy wrote:
>>>>>
>>>>>
>>>>> Le 16/04/2021 à 11:28, Steven Price a écrit :
>>>>>> To be honest I don't fully understand why powerpc requires the page_size - it appears to be
>>>>>> using it purely to find "holes" in the calls to note_page(), but I haven't worked out why such
>>>>>> holes would occur.
>>>>>
>>>>> I was indeed introduced for KASAN. We have a first commit
>>>>> https://github.com/torvalds/linux/commit/cabe8138 which uses page size to detect whether it is
>>>>> a KASAN like stuff.
>>>>>
>>>>> Then came https://github.com/torvalds/linux/commit/b00ff6d8c as a fix. I can't remember what
>>>>> the problem was exactly, something around the use of hugepages for kernel memory, came as part
>>>>> of the series
>>>>> https://patchwork.ozlabs.org/project/linuxppc-dev/cover/cover.1589866984.git.christophe.leroy@csgroup.eu/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Ah, that's useful context. So it looks like powerpc took a different route to reducing the KASAN
>>>> output to x86.
>>>>
>>>> Given the generic ptdump code has handling for KASAN already it should be possible to drop that
>>>> from the powerpc arch code, which I think means we don't actually need to provide page size to
>>>> notepage(). Hopefully that means more code to delete ;)
>>>>
>>>
>>> Yes ... and no.
>>>
>>> It looks like the generic ptdump handles the case when several pgdir entries points to the same
>>> kasan_early_shadow_pte. But it doesn't take into account the powerpc case where we have regular
>>> page tables where several (if not all) PTEs are pointing to the kasan_early_shadow_page .
>>
>> I'm not sure I follow quite how powerpc is different here. But could you have a similar check for
>> PTEs against kasan_early_shadow_pte as the other levels already have?
>>
>> I'm just worried that page_size isn't well defined in this interface and it's going to cause
>> problems in the future.
>>
>
> I'm trying. I reverted the two commits b00ff6d8c and cabe8138.
>
> At the moment, I don't get exactly what I expect: For linear memory I get one line for each 8M page
> whereas before reverting the patches I got one 16M line and one 112M line.
>
> And for KASAN shadow area I get two lines for the 2x 8M pages shadowing linear mem then I get one 4M
> line for each PGDIR entry pointing to kasan_early_shadow_pte.
>
> 0xf8000000-0xf87fffff 0x07000000 8M huge rw present
> 0xf8800000-0xf8ffffff 0x07800000 8M huge rw present
> 0xf9000000-0xf93fffff 0x01430000 4M r present
...
> 0xfec00000-0xfeffffff 0x01430000 4M r present
>
> Any idea ?
>
I think the different with other architectures is here:
} else if (flag != st->current_flags || level != st->level ||
addr >= st->marker[1].start_address ||
pa != st->last_pa + PAGE_SIZE) {
In addition to the checks everyone do, powerpc also checks "pa != st->last_pa + PAGE_SIZE".
And it is definitely for that test that page_size argument add been added.
I see that other architectures except RISCV don't dump the physical address. But even RISCV doesn't
include that check.
That physical address dump was added by commit aaa229529244 ("powerpc/mm: Add physical address to
Linux page table dump") [https://github.com/torvalds/linux/commit/aaa2295]
How do other architectures deal with the problem described by the commit log of that patch ?
Christophe
^ permalink raw reply
* Re: [PATCH v1 1/1] powerpc/papr_scm: Properly handle UUID types and API
From: Vaibhav Jain @ 2021-04-16 15:06 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Linux Kernel Mailing List, Paul Mackerras, Aneesh Kumar K . V,
Oliver O'Halloran, Andy Shevchenko,
open list:LINUX FOR POWERPC PA SEMI PWRFICIENT
In-Reply-To: <CAHp75VcPANL+LBTxy2V8f2Ksy=FJmdbU1=r60KKO7YSUf9BCLg@mail.gmail.com>
Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> On Thu, Apr 15, 2021 at 8:10 PM Vaibhav Jain <vaibhav@linux.ibm.com> wrote:
>>
>>
>> Thanks for the patch Andy,
>>
>> Unfortunately ran into a compilation issue due to missing "#include
>> <asm/unaligned.h>" that provides definition for
>> get_unaligned_le64(). Gcc reported following error:
>>
>> error: implicit declaration of function ‘get_unaligned_le64’
>
> Right, I have not tested it (as mentioned in the comments to the patch)
>
>> After including the necessary header file, kernel compiled fine and I
>> was able to test & verify the patch.
>
> Thank you very much for the testing.
>
> I'm not sure what the coverage of your test is.
Your patch updates the way the interleaved set-cookies are populated in
papr_scm which are then used to populate label entry for a namespace. I
verified that the reported region setcookie hasnt changed for an nvdimm
region before and after applying your patch for both BE and LE variants:
# 64-bit Little endian kernel before applying the patch
$ sudo cat /sys/devices/ndbus0/region0/set_cookie
0x8b6b26cbc930e2b5
# 64-bit Little endian kernel after applying your patch
$ sudo cat /sys/devices/ndbus0/region0/set_cookie
0x8b6b26cbc930e2b5
# 64-bit Big endian kernel before applying your patch
$ sudo cat /sys/devices/ndbus0/region0/set_cookie
0x8b6b26cbc930e2b5
# 64-bit Big endian kernel after applying your patch
$ sudo cat /sys/devices/ndbus0/region0/set_cookie
0x8b6b26cbc930e2b5
> That's why I have an
> additional question below. Is the byte ordering kept the same in BE
> (32- and 64-bit) cases? Because I'm worrying that I might have missed
> something.
Libnvdimm store these cookies in label area as little endian values and
based on the results above I think we are good.
>
>
> --
> With Best Regards,
> Andy Shevchenko
--
Cheers
~ Vaibhav
^ permalink raw reply
* Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()
From: Christophe Leroy @ 2021-04-16 15:15 UTC (permalink / raw)
To: Steven Price, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, akpm
Cc: linux-arch, linux-s390, x86, linux-kernel, linux-mm, linux-riscv,
linuxppc-dev, linux-arm-kernel
In-Reply-To: <b245cf06-f2e5-87a5-9a5e-64efc39d415a@csgroup.eu>
Le 16/04/2021 à 17:04, Christophe Leroy a écrit :
>
>
> Le 16/04/2021 à 16:40, Christophe Leroy a écrit :
>>
>>
>> Le 16/04/2021 à 15:00, Steven Price a écrit :
>>> On 16/04/2021 12:08, Christophe Leroy wrote:
>>>>
>>>>
>>>> Le 16/04/2021 à 12:51, Steven Price a écrit :
>>>>> On 16/04/2021 11:38, Christophe Leroy wrote:
>>>>>>
>>>>>>
>>>>>> Le 16/04/2021 à 11:28, Steven Price a écrit :
>>>>>>> To be honest I don't fully understand why powerpc requires the page_size - it appears to be
>>>>>>> using it purely to find "holes" in the calls to note_page(), but I haven't worked out why
>>>>>>> such holes would occur.
>>>>>>
>>>>>> I was indeed introduced for KASAN. We have a first commit
>>>>>> https://github.com/torvalds/linux/commit/cabe8138 which uses page size to detect whether it is
>>>>>> a KASAN like stuff.
>>>>>>
>>>>>> Then came https://github.com/torvalds/linux/commit/b00ff6d8c as a fix. I can't remember what
>>>>>> the problem was exactly, something around the use of hugepages for kernel memory, came as part
>>>>>> of the series
>>>>>> https://patchwork.ozlabs.org/project/linuxppc-dev/cover/cover.1589866984.git.christophe.leroy@csgroup.eu/
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Ah, that's useful context. So it looks like powerpc took a different route to reducing the
>>>>> KASAN output to x86.
>>>>>
>>>>> Given the generic ptdump code has handling for KASAN already it should be possible to drop that
>>>>> from the powerpc arch code, which I think means we don't actually need to provide page size to
>>>>> notepage(). Hopefully that means more code to delete ;)
>>>>>
>>>>
>>>> Yes ... and no.
>>>>
>>>> It looks like the generic ptdump handles the case when several pgdir entries points to the same
>>>> kasan_early_shadow_pte. But it doesn't take into account the powerpc case where we have regular
>>>> page tables where several (if not all) PTEs are pointing to the kasan_early_shadow_page .
>>>
>>> I'm not sure I follow quite how powerpc is different here. But could you have a similar check for
>>> PTEs against kasan_early_shadow_pte as the other levels already have?
>>>
>>> I'm just worried that page_size isn't well defined in this interface and it's going to cause
>>> problems in the future.
>>>
>>
>> I'm trying. I reverted the two commits b00ff6d8c and cabe8138.
>>
>> At the moment, I don't get exactly what I expect: For linear memory I get one line for each 8M
>> page whereas before reverting the patches I got one 16M line and one 112M line.
>>
>> And for KASAN shadow area I get two lines for the 2x 8M pages shadowing linear mem then I get one
>> 4M line for each PGDIR entry pointing to kasan_early_shadow_pte.
>>
>> 0xf8000000-0xf87fffff 0x07000000 8M huge rw present
>> 0xf8800000-0xf8ffffff 0x07800000 8M huge rw present
>> 0xf9000000-0xf93fffff 0x01430000 4M r present
> ...
>> 0xfec00000-0xfeffffff 0x01430000 4M r present
>>
>> Any idea ?
>>
>
>
> I think the different with other architectures is here:
>
> } else if (flag != st->current_flags || level != st->level ||
> addr >= st->marker[1].start_address ||
> pa != st->last_pa + PAGE_SIZE) {
>
>
> In addition to the checks everyone do, powerpc also checks "pa != st->last_pa + PAGE_SIZE".
> And it is definitely for that test that page_size argument add been added.
By replacing that test by (pa - st->start_pa != addr - st->start_address) it works again. So we
definitely don't need the real page size.
>
> I see that other architectures except RISCV don't dump the physical address. But even RISCV doesn't
> include that check.
>
> That physical address dump was added by commit aaa229529244 ("powerpc/mm: Add physical address to
> Linux page table dump") [https://github.com/torvalds/linux/commit/aaa2295]
>
> How do other architectures deal with the problem described by the commit log of that patch ?
>
> Christophe
^ permalink raw reply
* Re: [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT
From: kernel test robot @ 2021-04-16 15:27 UTC (permalink / raw)
To: Sourabh Jain, mpe; +Cc: mahesh, kbuild-all, hbathini, bauerman, linuxppc-dev
In-Reply-To: <20210416124658.718860-1-sourabhjain@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 5194 bytes --]
Hi Sourabh,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on linus/master v5.12-rc7 next-20210416]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sourabh-Jain/powerpc-kexec_file-use-current-CPU-info-while-setting-up-FDT/20210416-204821
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c4f40243a6928fb16798b2b98c5371815b49e4cc
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sourabh-Jain/powerpc-kexec_file-use-current-CPU-info-while-setting-up-FDT/20210416-204821
git checkout c4f40243a6928fb16798b2b98c5371815b49e4cc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> arch/powerpc/kexec/file_load_64.c:972:5: warning: no previous prototype for 'add_node_prop' [-Wmissing-prototypes]
972 | int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
| ^~~~~~~~~~~~~
>> arch/powerpc/kexec/file_load_64.c:1003:5: warning: no previous prototype for 'update_cpus_node' [-Wmissing-prototypes]
1003 | int update_cpus_node(void *fdt)
| ^~~~~~~~~~~~~~~~
vim +/add_node_prop +972 arch/powerpc/kexec/file_load_64.c
962
963 /**
964 * add_node_prop - Read property from device node structure and add
965 * them to fdt.
966 * @fdt: Flattened device tree of the kernel
967 * @node_offset: offset of the node to add a property at
968 * np: device node pointer
969 *
970 * Returns 0 on success, negative errno on error.
971 */
> 972 int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
973 {
974 int ret = 0;
975 struct property *pp;
976 unsigned long flags;
977
978 if (!np)
979 return -EINVAL;
980
981 raw_spin_lock_irqsave(&devtree_lock, flags);
982 for (pp = np->properties; pp; pp = pp->next) {
983 ret = fdt_setprop(fdt, node_offset, pp->name,
984 pp->value, pp->length);
985 if (ret < 0) {
986 pr_err("Unable to add %s property: %s\n",
987 pp->name, fdt_strerror(ret));
988 goto out;
989 }
990 }
991 out:
992 raw_spin_unlock_irqrestore(&devtree_lock, flags);
993 return ret;
994 }
995
996 /**
997 * update_cpus_node - Update cpus node of flattened device-tree using of_root
998 * device node.
999 * @fdt: Flattened device tree of the kernel.
1000 *
1001 * Returns 0 on success, negative errno on error.
1002 */
> 1003 int update_cpus_node(void *fdt)
1004 {
1005 struct device_node *cpus_node, *dn;
1006 int cpus_offset, cpus_subnode_off, ret = 0;
1007
1008 cpus_offset = fdt_path_offset(fdt, "/cpus");
1009 if (cpus_offset == -FDT_ERR_NOTFOUND || cpus_offset > 0) {
1010 if (cpus_offset > 0) {
1011 ret = fdt_del_node(fdt, cpus_offset);
1012 if (ret < 0) {
1013 pr_err("Error deleting /cpus node: %s\n",
1014 fdt_strerror(ret));
1015 return -EINVAL;
1016 }
1017 }
1018
1019 /* Add cpus node to fdt */
1020 cpus_offset = fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"),
1021 "cpus");
1022 if (cpus_offset < 0) {
1023 pr_err("Error creating /cpus node: %s\n",
1024 fdt_strerror(cpus_offset));
1025 return -EINVAL;
1026 }
1027
1028 /* Add cpus node properties */
1029 cpus_node = of_find_node_by_path("/cpus");
1030 ret = add_node_prop(fdt, cpus_offset, cpus_node);
1031 if (ret < 0)
1032 return ret;
1033
1034 /* Loop through all subnodes of cpus and add them to fdt */
1035 for_each_node_by_type(dn, "cpu") {
1036 cpus_subnode_off = fdt_add_subnode(fdt,
1037 cpus_offset,
1038 dn->full_name);
1039 if (cpus_subnode_off < 0) {
1040 pr_err("Unable to add %s subnode: %s\n",
1041 dn->full_name, fdt_strerror(cpus_subnode_off));
1042 return cpus_subnode_off;
1043 }
1044 ret = add_node_prop(fdt, cpus_subnode_off, dn);
1045 if (ret < 0)
1046 return ret;
1047 }
1048 } else if (cpus_offset < 0) {
1049 pr_err("Malformed device tree: error reading /cpus node: %s\n",
1050 fdt_strerror(cpus_offset));
1051 }
1052
1053 return ret;
1054 }
1055
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 72716 bytes --]
^ permalink raw reply
* Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems
From: Matthew Wilcox @ 2021-04-16 15:27 UTC (permalink / raw)
To: Jesper Dangaard Brouer
Cc: Arnd Bergmann, Grygorii Strashko, netdev@vger.kernel.org,
Ilias Apalodimas, linux-kernel@vger.kernel.org,
linux-mips@vger.kernel.org, linux-mm@kvack.org, David Laight,
Matteo Croce, linuxppc-dev@lists.ozlabs.org, Christoph Hellwig,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <20210415200832.32796445@carbon>
On Thu, Apr 15, 2021 at 08:08:32PM +0200, Jesper Dangaard Brouer wrote:
> See below patch. Where I swap32 the dma address to satisfy
> page->compound having bit zero cleared. (It is the simplest fix I could
> come up with).
I think this is slightly simpler, and as a bonus code that assumes the
old layout won't compile.
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 6613b26a8894..5aacc1c10a45 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -97,10 +97,10 @@ struct page {
};
struct { /* page_pool used by netstack */
/**
- * @dma_addr: might require a 64-bit value even on
+ * @dma_addr: might require a 64-bit value on
* 32-bit architectures.
*/
- dma_addr_t dma_addr;
+ unsigned long dma_addr[2];
};
struct { /* slab, slob and slub */
union {
diff --git a/include/net/page_pool.h b/include/net/page_pool.h
index b5b195305346..db7c7020746a 100644
--- a/include/net/page_pool.h
+++ b/include/net/page_pool.h
@@ -198,7 +198,17 @@ static inline void page_pool_recycle_direct(struct page_pool *pool,
static inline dma_addr_t page_pool_get_dma_addr(struct page *page)
{
- return page->dma_addr;
+ dma_addr_t ret = page->dma_addr[0];
+ if (sizeof(dma_addr_t) > sizeof(unsigned long))
+ ret |= (dma_addr_t)page->dma_addr[1] << 32;
+ return ret;
+}
+
+static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t addr)
+{
+ page->dma_addr[0] = addr;
+ if (sizeof(dma_addr_t) > sizeof(unsigned long))
+ page->dma_addr[1] = addr >> 32;
}
static inline bool is_page_pool_compiled_in(void)
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index ad8b0707af04..f014fd8c19a6 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -174,8 +174,10 @@ static void page_pool_dma_sync_for_device(struct page_pool *pool,
struct page *page,
unsigned int dma_sync_size)
{
+ dma_addr_t dma_addr = page_pool_get_dma_addr(page);
+
dma_sync_size = min(dma_sync_size, pool->p.max_len);
- dma_sync_single_range_for_device(pool->p.dev, page->dma_addr,
+ dma_sync_single_range_for_device(pool->p.dev, dma_addr,
pool->p.offset, dma_sync_size,
pool->p.dma_dir);
}
@@ -226,7 +228,7 @@ static struct page *__page_pool_alloc_pages_slow(struct page_pool *pool,
put_page(page);
return NULL;
}
- page->dma_addr = dma;
+ page_pool_set_dma_addr(page, dma);
if (pool->p.flags & PP_FLAG_DMA_SYNC_DEV)
page_pool_dma_sync_for_device(pool, page, pool->p.max_len);
@@ -294,13 +296,13 @@ void page_pool_release_page(struct page_pool *pool, struct page *page)
*/
goto skip_dma_unmap;
- dma = page->dma_addr;
+ dma = page_pool_get_dma_addr(page);
- /* When page is unmapped, it cannot be returned our pool */
+ /* When page is unmapped, it cannot be returned to our pool */
dma_unmap_page_attrs(pool->p.dev, dma,
PAGE_SIZE << pool->p.order, pool->p.dma_dir,
DMA_ATTR_SKIP_CPU_SYNC);
- page->dma_addr = 0;
+ page_pool_set_dma_addr(page, 0);
skip_dma_unmap:
/* This may be the last page returned, releasing the pool, so
* it is not safe to reference pool afterwards.
^ permalink raw reply related
* Re: [PATCH 3/3] powerpc/smp: Cache CPU to chip lookup
From: Gautham R Shenoy @ 2021-04-16 15:57 UTC (permalink / raw)
To: Srikar Dronamraju
Cc: Nathan Lynch, Gautham R Shenoy, Peter Zijlstra,
Daniel Henrique Barboza, Valentin Schneider, qemu-ppc,
Cedric Le Goater, linuxppc-dev, Ingo Molnar, David Gibson
In-Reply-To: <20210415175110.GE2633526@linux.vnet.ibm.com>
On Thu, Apr 15, 2021 at 11:21:10PM +0530, Srikar Dronamraju wrote:
> * Gautham R Shenoy <ego@linux.vnet.ibm.com> [2021-04-15 22:49:21]:
>
> > >
> > > +int *chip_id_lookup_table;
> > > +
> > > #ifdef CONFIG_PPC64
> > > int __initdata iommu_is_off;
> > > int __initdata iommu_force_on;
> > > @@ -914,13 +916,22 @@ EXPORT_SYMBOL(of_get_ibm_chip_id);
> > > int cpu_to_chip_id(int cpu)
> > > {
> > > struct device_node *np;
> > > + int ret = -1, idx;
> > > +
> > > + idx = cpu / threads_per_core;
> > > + if (chip_id_lookup_table && chip_id_lookup_table[idx] != -1)
> >
>
> > The value -1 is ambiguous since we won't be able to determine if
> > it is because we haven't yet made a of_get_ibm_chip_id() call
> > or if of_get_ibm_chip_id() call was made and it returned a -1.
> >
>
> We don't allocate chip_id_lookup_table unless cpu_to_chip_id() return
> !-1 value for the boot-cpuid. So this ensures that we dont
> unnecessarily allocate chip_id_lookup_table. Also I check for
> chip_id_lookup_table before calling cpu_to_chip_id() for other CPUs.
> So this avoids overhead of calling cpu_to_chip_id() for platforms that
> dont support it. Also its most likely that if the
> chip_id_lookup_table is initialized then of_get_ibm_chip_id() call
> would return a valid value.
>
> + Below we are only populating the lookup table, only when the
> of_get_cpu_node is valid.
>
> So I dont see any drawbacks of initializing it to -1. Do you see
any?
Only if other callers of cpu_to_chip_id() don't check for whether the
chip_id_lookup_table() has been allocated or not. From a code
readability point of view, it is easier to have that check this inside
cpu_to_chip_id() instead of requiring all its callers to make that
check.
>
> > Thus, perhaps we can initialize chip_id_lookup_table[idx] with a
> > different unique negative value. How about S32_MIN ? and check
> > chip_id_lookup_table[idx] is different here ?
> >
>
> I had initially initialized to -2, But then I thought we adding in
> more confusion than necessary and it was not solving any issues.
>
>
> --
> Thanks and Regards
> Srikar Dronamraju
^ permalink raw reply
* Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()
From: Steven Price @ 2021-04-16 16:00 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, akpm
Cc: linux-arch, linux-s390, x86, linux-kernel, linux-mm, linux-riscv,
linuxppc-dev, linux-arm-kernel
In-Reply-To: <10adad00-14de-61b6-ce2a-bdde23a34bcf@csgroup.eu>
On 16/04/2021 16:15, Christophe Leroy wrote:
>
>
> Le 16/04/2021 à 17:04, Christophe Leroy a écrit :
>>
>>
>> Le 16/04/2021 à 16:40, Christophe Leroy a écrit :
>>>
>>>
>>> Le 16/04/2021 à 15:00, Steven Price a écrit :
>>>> On 16/04/2021 12:08, Christophe Leroy wrote:
>>>>>
>>>>>
>>>>> Le 16/04/2021 à 12:51, Steven Price a écrit :
>>>>>> On 16/04/2021 11:38, Christophe Leroy wrote:
>>>>>>>
>>>>>>>
>>>>>>> Le 16/04/2021 à 11:28, Steven Price a écrit :
>>>>>>>> To be honest I don't fully understand why powerpc requires the
>>>>>>>> page_size - it appears to be using it purely to find "holes" in
>>>>>>>> the calls to note_page(), but I haven't worked out why such
>>>>>>>> holes would occur.
>>>>>>>
>>>>>>> I was indeed introduced for KASAN. We have a first commit
>>>>>>> https://github.com/torvalds/linux/commit/cabe8138 which uses page
>>>>>>> size to detect whether it is a KASAN like stuff.
>>>>>>>
>>>>>>> Then came https://github.com/torvalds/linux/commit/b00ff6d8c as a
>>>>>>> fix. I can't remember what the problem was exactly, something
>>>>>>> around the use of hugepages for kernel memory, came as part of
>>>>>>> the series
>>>>>>> https://patchwork.ozlabs.org/project/linuxppc-dev/cover/cover.1589866984.git.christophe.leroy@csgroup.eu/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Ah, that's useful context. So it looks like powerpc took a
>>>>>> different route to reducing the KASAN output to x86.
>>>>>>
>>>>>> Given the generic ptdump code has handling for KASAN already it
>>>>>> should be possible to drop that from the powerpc arch code, which
>>>>>> I think means we don't actually need to provide page size to
>>>>>> notepage(). Hopefully that means more code to delete ;)
>>>>>>
>>>>>
>>>>> Yes ... and no.
>>>>>
>>>>> It looks like the generic ptdump handles the case when several
>>>>> pgdir entries points to the same kasan_early_shadow_pte. But it
>>>>> doesn't take into account the powerpc case where we have regular
>>>>> page tables where several (if not all) PTEs are pointing to the
>>>>> kasan_early_shadow_page .
>>>>
>>>> I'm not sure I follow quite how powerpc is different here. But could
>>>> you have a similar check for PTEs against kasan_early_shadow_pte as
>>>> the other levels already have?
>>>>
>>>> I'm just worried that page_size isn't well defined in this interface
>>>> and it's going to cause problems in the future.
>>>>
>>>
>>> I'm trying. I reverted the two commits b00ff6d8c and cabe8138.
>>>
>>> At the moment, I don't get exactly what I expect: For linear memory I
>>> get one line for each 8M page whereas before reverting the patches I
>>> got one 16M line and one 112M line.
>>>
>>> And for KASAN shadow area I get two lines for the 2x 8M pages
>>> shadowing linear mem then I get one 4M line for each PGDIR entry
>>> pointing to kasan_early_shadow_pte.
>>>
>>> 0xf8000000-0xf87fffff 0x07000000 8M huge rw
>>> present
>>> 0xf8800000-0xf8ffffff 0x07800000 8M huge rw
>>> present
>>> 0xf9000000-0xf93fffff 0x01430000 4M r
>>> present
>> ...
>>> 0xfec00000-0xfeffffff 0x01430000 4M r
>>> present
>>>
>>> Any idea ?
>>>
>>
>>
>> I think the different with other architectures is here:
>>
>> } else if (flag != st->current_flags || level != st->level ||
>> addr >= st->marker[1].start_address ||
>> pa != st->last_pa + PAGE_SIZE) {
>>
>>
>> In addition to the checks everyone do, powerpc also checks "pa !=
>> st->last_pa + PAGE_SIZE".
>> And it is definitely for that test that page_size argument add been
>> added.
>
> By replacing that test by (pa - st->start_pa != addr -
> st->start_address) it works again. So we definitely don't need the real
> page size.
Yes that should work. Thanks for figuring it out!
>
>>
>> I see that other architectures except RISCV don't dump the physical
>> address. But even RISCV doesn't include that check.
Yes not having the physical address certainly simplifies things -
although I can see why that can be handy to see. The disadvantage is
that user space or vmalloc()'d memory will produce a lot of output
because the physical addresses are unlikely to be contiguous. And for
most uses you don't need the information.
>> That physical address dump was added by commit aaa229529244
>> ("powerpc/mm: Add physical address to Linux page table dump")
>> [https://github.com/torvalds/linux/commit/aaa2295]
>>
>> How do other architectures deal with the problem described by the
>> commit log of that patch ?
AFAIK other architectures are "broken" in this regard. In practice I
don't think it often causes an issue though.
Steve
^ permalink raw reply
* Re: [PATCH 3/3] powerpc/smp: Cache CPU to chip lookup
From: Srikar Dronamraju @ 2021-04-16 16:57 UTC (permalink / raw)
To: Gautham R Shenoy
Cc: Nathan Lynch, Peter Zijlstra, Daniel Henrique Barboza,
Valentin Schneider, qemu-ppc, Cedric Le Goater, linuxppc-dev,
Ingo Molnar, David Gibson
In-Reply-To: <20210416155748.GA26496@in.ibm.com>
* Gautham R Shenoy <ego@linux.vnet.ibm.com> [2021-04-16 21:27:48]:
> On Thu, Apr 15, 2021 at 11:21:10PM +0530, Srikar Dronamraju wrote:
> > * Gautham R Shenoy <ego@linux.vnet.ibm.com> [2021-04-15 22:49:21]:
> >
> > > >
> > > > +int *chip_id_lookup_table;
> > > > +
> > > > #ifdef CONFIG_PPC64
> > > > int __initdata iommu_is_off;
> > > > int __initdata iommu_force_on;
> > > > @@ -914,13 +916,22 @@ EXPORT_SYMBOL(of_get_ibm_chip_id);
> > > > int cpu_to_chip_id(int cpu)
> > > > {
> > > > struct device_node *np;
> > > > + int ret = -1, idx;
> > > > +
> > > > + idx = cpu / threads_per_core;
> > > > + if (chip_id_lookup_table && chip_id_lookup_table[idx] != -1)
> > >
> >
> > > The value -1 is ambiguous since we won't be able to determine if
> > > it is because we haven't yet made a of_get_ibm_chip_id() call
> > > or if of_get_ibm_chip_id() call was made and it returned a -1.
> > >
> >
> > We don't allocate chip_id_lookup_table unless cpu_to_chip_id() return
> > !-1 value for the boot-cpuid. So this ensures that we dont
> > unnecessarily allocate chip_id_lookup_table. Also I check for
> > chip_id_lookup_table before calling cpu_to_chip_id() for other CPUs.
> > So this avoids overhead of calling cpu_to_chip_id() for platforms that
> > dont support it. Also its most likely that if the
> > chip_id_lookup_table is initialized then of_get_ibm_chip_id() call
> > would return a valid value.
> >
> > + Below we are only populating the lookup table, only when the
> > of_get_cpu_node is valid.
> >
> > So I dont see any drawbacks of initializing it to -1. Do you see
> any?
>
>
> Only if other callers of cpu_to_chip_id() don't check for whether the
> chip_id_lookup_table() has been allocated or not. From a code
> readability point of view, it is easier to have that check this inside
> cpu_to_chip_id() instead of requiring all its callers to make that
> check.
>
I didn't understand your comment. However let me reiterate what I said
earlier. We don't have control over who and when cpu_to_chip_id() gets
called. If the cpu_to_chip_id() might be called for non present CPU,
in which case it will return -1, Should we cache it or not?
If we cache it, we will return wrong value when the CPU may turn out
to be present. If we cache and retry it then having one value for
initializing and another for invalid is all the same as having just 1
value for initializing and invalid. Just that we end up adding more
confusing code. Atleast to me, code isnt readable if I say retry for
-1 and -2 too. After few years, we ourselves will wonder why we have
two values if we are checking and performing same actions.
> >
> > > Thus, perhaps we can initialize chip_id_lookup_table[idx] with a
> > > different unique negative value. How about S32_MIN ? and check
> > > chip_id_lookup_table[idx] is different here ?
> > >
> >
> > I had initially initialized to -2, But then I thought we adding in
> > more confusion than necessary and it was not solving any issues.
> >
> >
> > --
> > Thanks and Regards
> > Srikar Dronamraju
--
Thanks and Regards
Srikar Dronamraju
^ permalink raw reply
* Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems
From: Jesper Dangaard Brouer @ 2021-04-16 17:08 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Arnd Bergmann, Grygorii Strashko, netdev@vger.kernel.org,
Ilias Apalodimas, linux-kernel@vger.kernel.org,
linux-mips@vger.kernel.org, linux-mm@kvack.org, David Laight,
brouer, Matteo Croce, linuxppc-dev@lists.ozlabs.org,
Christoph Hellwig, linux-arm-kernel@lists.infradead.org
In-Reply-To: <20210416152755.GL2531743@casper.infradead.org>
On Fri, 16 Apr 2021 16:27:55 +0100
Matthew Wilcox <willy@infradead.org> wrote:
> On Thu, Apr 15, 2021 at 08:08:32PM +0200, Jesper Dangaard Brouer wrote:
> > See below patch. Where I swap32 the dma address to satisfy
> > page->compound having bit zero cleared. (It is the simplest fix I could
> > come up with).
>
> I think this is slightly simpler, and as a bonus code that assumes the
> old layout won't compile.
This is clever, I like it! When reading the code one just have to
remember 'unsigned long' size difference between 64-bit vs 32-bit.
And I assume compiler can optimize the sizeof check out then doable.
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 6613b26a8894..5aacc1c10a45 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -97,10 +97,10 @@ struct page {
> };
> struct { /* page_pool used by netstack */
> /**
> - * @dma_addr: might require a 64-bit value even on
> + * @dma_addr: might require a 64-bit value on
> * 32-bit architectures.
> */
> - dma_addr_t dma_addr;
> + unsigned long dma_addr[2];
> };
> struct { /* slab, slob and slub */
> union {
> diff --git a/include/net/page_pool.h b/include/net/page_pool.h
> index b5b195305346..db7c7020746a 100644
> --- a/include/net/page_pool.h
> +++ b/include/net/page_pool.h
> @@ -198,7 +198,17 @@ static inline void page_pool_recycle_direct(struct page_pool *pool,
>
> static inline dma_addr_t page_pool_get_dma_addr(struct page *page)
> {
> - return page->dma_addr;
> + dma_addr_t ret = page->dma_addr[0];
> + if (sizeof(dma_addr_t) > sizeof(unsigned long))
> + ret |= (dma_addr_t)page->dma_addr[1] << 32;
> + return ret;
> +}
> +
> +static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t addr)
> +{
> + page->dma_addr[0] = addr;
> + if (sizeof(dma_addr_t) > sizeof(unsigned long))
> + page->dma_addr[1] = addr >> 32;
> }
>
> static inline bool is_page_pool_compiled_in(void)
> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
> index ad8b0707af04..f014fd8c19a6 100644
> --- a/net/core/page_pool.c
> +++ b/net/core/page_pool.c
> @@ -174,8 +174,10 @@ static void page_pool_dma_sync_for_device(struct page_pool *pool,
> struct page *page,
> unsigned int dma_sync_size)
> {
> + dma_addr_t dma_addr = page_pool_get_dma_addr(page);
> +
> dma_sync_size = min(dma_sync_size, pool->p.max_len);
> - dma_sync_single_range_for_device(pool->p.dev, page->dma_addr,
> + dma_sync_single_range_for_device(pool->p.dev, dma_addr,
> pool->p.offset, dma_sync_size,
> pool->p.dma_dir);
> }
> @@ -226,7 +228,7 @@ static struct page *__page_pool_alloc_pages_slow(struct page_pool *pool,
> put_page(page);
> return NULL;
> }
> - page->dma_addr = dma;
> + page_pool_set_dma_addr(page, dma);
>
> if (pool->p.flags & PP_FLAG_DMA_SYNC_DEV)
> page_pool_dma_sync_for_device(pool, page, pool->p.max_len);
> @@ -294,13 +296,13 @@ void page_pool_release_page(struct page_pool *pool, struct page *page)
> */
> goto skip_dma_unmap;
>
> - dma = page->dma_addr;
> + dma = page_pool_get_dma_addr(page);
>
> - /* When page is unmapped, it cannot be returned our pool */
> + /* When page is unmapped, it cannot be returned to our pool */
> dma_unmap_page_attrs(pool->p.dev, dma,
> PAGE_SIZE << pool->p.order, pool->p.dma_dir,
> DMA_ATTR_SKIP_CPU_SYNC);
> - page->dma_addr = 0;
> + page_pool_set_dma_addr(page, 0);
> skip_dma_unmap:
> /* This may be the last page returned, releasing the pool, so
> * it is not safe to reference pool afterwards.
>
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox