Buildresult: powerpc-next/parisc-defconfig/parisc-gcc8 built on Jul 20 2018, 01:18
kisskb
Revisions
|
Branches
|
Compilers
|
Configs
|
Build Results
|
Build Failures
|
Status:
OK
Date/Time:
Jul 20 2018, 01:18
Duration:
0:01:07.364916
Builder:
ka3
Revision:
powerpc/mm: Don't report PUDs as memory leaks when using kmemleak (
2bc2026269beb0d7923317f5a4a28ce4d5bbc94c)
Target:
powerpc-next/parisc-defconfig/parisc-gcc8
Branch:
powerpc-next
Compiler:
parisc-gcc8
(hppa-linux-gcc (GCC) 8.1.0)
Config:
defconfig
(
download
)
Log:
Download original
Possible warnings (8)
<stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp] crypto/blkcipher.c:513:2: warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] crypto/ablkcipher.c:374:2: warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] crypto/ablkcipher.c:448:2: warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] fs/kernfs/symlink.c:91:3: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] fs/ext4/super.c:326:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] fs/ext4/super.c:330:3: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] lib/kobject.c:128:3: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
Full Log
# git rev-parse -q --verify 2bc2026269beb0d7923317f5a4a28ce4d5bbc94c^{commit} 2bc2026269beb0d7923317f5a4a28ce4d5bbc94c already have revision, skipping fetch # git checkout -q -f -B kisskb 2bc2026269beb0d7923317f5a4a28ce4d5bbc94c # git clean -qxdf # < git log -1 # commit 2bc2026269beb0d7923317f5a4a28ce4d5bbc94c # Author: Michael Ellerman <mpe@ellerman.id.au> # Date: Thu Jul 19 23:36:10 2018 +1000 # # powerpc/mm: Don't report PUDs as memory leaks when using kmemleak # # Paul Menzel reported that kmemleak was producing reports such as: # # unreferenced object 0xc0000000f8b80000 (size 16384): # comm "init", pid 1, jiffies 4294937416 (age 312.240s) # hex dump (first 32 bytes): # 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ # 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ # backtrace: # [<00000000d997deb7>] __pud_alloc+0x80/0x190 # [<0000000087f2e8a3>] move_page_tables+0xbac/0xdc0 # [<00000000091e51c2>] shift_arg_pages+0xc0/0x210 # [<00000000ab88670c>] setup_arg_pages+0x22c/0x2a0 # [<0000000060871529>] load_elf_binary+0x41c/0x1648 # [<00000000ecd9d2d4>] search_binary_handler.part.11+0xbc/0x280 # [<0000000034e0cdd7>] __do_execve_file.isra.13+0x73c/0x940 # [<000000005f953a6e>] sys_execve+0x58/0x70 # [<000000009700a858>] system_call+0x5c/0x70 # # Indicating that a PUD was being leaked. # # However what's really happening is that kmemleak is not able to # recognise the references from the PGD to the PUD, because they are not # fully qualified pointers. # # We can confirm that in xmon, eg: # # Find the task struct for pid 1 "init": # 0:mon> P # task_struct ->thread.ksp PID PPID S P CMD # c0000001fe7c0000 c0000001fe803960 1 0 S 13 systemd # # Dump virtual address 0 to find the PGD: # 0:mon> dv 0 c0000001fe7c0000 # pgd @ 0xc0000000f8b01000 # # Dump the memory of the PGD: # 0:mon> d c0000000f8b01000 # c0000000f8b01000 00000000f8b90000 0000000000000000 |................| # c0000000f8b01010 0000000000000000 0000000000000000 |................| # c0000000f8b01020 0000000000000000 0000000000000000 |................| # c0000000f8b01030 0000000000000000 00000000f8b80000 |................| # ^^^^^^^^^^^^^^^^ # # There we can see the reference to our supposedly leaked PUD. But # because it's missing the leading 0xc, kmemleak won't recognise it. # # We can confirm it's still in use by translating an address that is # mapped via it: # 0:mon> dv 7fff94000000 c0000001fe7c0000 # pgd @ 0xc0000000f8b01000 # pgdp @ 0xc0000000f8b01038 = 0x00000000f8b80000 <-- # pudp @ 0xc0000000f8b81ff8 = 0x00000000037c4000 # pmdp @ 0xc0000000037c5ca0 = 0x00000000fbd89000 # ptep @ 0xc0000000fbd89000 = 0xc0800001d5ce0386 # Maps physical address = 0x00000001d5ce0000 # Flags = Accessed Dirty Read Write # # The fix is fairly simple. We need to tell kmemleak to ignore PUD # allocations and never report them as leaks. We can also tell it not to # scan the PGD, because it will never find pointers in there. However it # will still notice if we allocate a PGD and then leak it. # # Reported-by: Paul Menzel <pmenzel@molgen.mpg.de> # Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux-gcc --version # < git log --format=%s --max-count=1 2bc2026269beb0d7923317f5a4a28ce4d5bbc94c # < make -s -j 80 ARCH=parisc O=/kisskb/build/powerpc-next_parisc-defconfig_parisc CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux- defconfig # make -s -j 80 ARCH=parisc O=/kisskb/build/powerpc-next_parisc-defconfig_parisc CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/hppa-linux/bin/hppa-linux- /kisskb/src/net/Makefile:24: CC cannot link executables. Skipping bpfilter. <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp] /kisskb/src/net/Makefile:24: CC cannot link executables. Skipping bpfilter. /kisskb/src/crypto/blkcipher.c: In function 'crypto_blkcipher_report': /kisskb/src/crypto/blkcipher.c:513:2: warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] strncpy(rblkcipher.geniv, alg->cra_blkcipher.geniv ?: "<default>", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sizeof(rblkcipher.geniv)); ~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/crypto/ablkcipher.c: In function 'crypto_ablkcipher_report': /kisskb/src/crypto/ablkcipher.c:374:2: warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] strncpy(rblkcipher.geniv, alg->cra_ablkcipher.geniv ?: "<default>", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sizeof(rblkcipher.geniv)); ~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/crypto/ablkcipher.c: In function 'crypto_givcipher_report': /kisskb/src/crypto/ablkcipher.c:448:2: warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] strncpy(rblkcipher.geniv, alg->cra_ablkcipher.geniv ?: "<built-in>", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sizeof(rblkcipher.geniv)); ~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'kernfs_get_target_path', inlined from 'kernfs_getlink.isra.0' at /kisskb/src/fs/kernfs/symlink.c:109:10, inlined from 'kernfs_iop_get_link.part.1' at /kisskb/src/fs/kernfs/symlink.c:127:10, inlined from 'kernfs_iop_get_link': /kisskb/src/fs/kernfs/symlink.c:91:3: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy(s + len, kn->name, slen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/fs/kernfs/symlink.c: In function 'kernfs_iop_get_link': /kisskb/src/fs/kernfs/symlink.c:88:14: note: length computed here int slen = strlen(kn->name); ^~~~~~~~~~~~~~~~ /kisskb/src/fs/ext4/super.c: In function '__save_error_info.isra.5': /kisskb/src/fs/ext4/super.c:326:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/fs/ext4/super.c:330:3: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] strncpy(es->s_first_error_func, func, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sizeof(es->s_first_error_func)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'fill_kobj_path', inlined from 'kobject_get_path' at /kisskb/src/lib/kobject.c:155:2: /kisskb/src/lib/kobject.c:128:3: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy(path + length, kobject_name(parent), cur); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/lib/kobject.c: In function 'kobject_get_path': /kisskb/src/lib/kobject.c:125:13: note: length computed here int cur = strlen(kobject_name(parent)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Completed OK # rm -rf /kisskb/build/powerpc-next_parisc-defconfig_parisc # Build took: 0:01:07.364916
© Michael Ellerman 2006-2018.