1. 29 Apr, 2020 4 commits
    • Wei Yongjun's avatar
      crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static · 259ea41f
      Wei Yongjun authored
      commit ce4e4584 upstream.
      
      Fixes the following sparse warnings:
      
      drivers/crypto/mxs-dcp.c:39:15: warning:
       symbol 'sha1_null_hash' was not declared. Should it be static?
      drivers/crypto/mxs-dcp.c:43:15: warning:
       symbol 'sha256_null_hash' was not declared. Should it be static?
      
      Fixes: c709eeba ("crypto: mxs-dcp - Fix SHA null hashes and output length")
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      259ea41f
    • Martin KaFai Lau's avatar
      bpftool: Fix printing incorrect pointer in btf_dump_ptr · 0d6f9d8f
      Martin KaFai Lau authored
      commit 555089fd upstream.
      
      For plain text output, it incorrectly prints the pointer value
      "void *data".  The "void *data" is actually pointing to memory that
      contains a bpf-map's value.  The intention is to print the content of
      the bpf-map's value instead of printing the pointer pointing to the
      bpf-map's value.
      
      In this case, a member of the bpf-map's value is a pointer type.
      Thus, it should print the "*(void **)data".
      
      Fixes: 22c349e8 ("tools: bpftool: fix format strings and arguments for jsonw_printf()")
      Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
      Link: https://lore.kernel.org/bpf/20200110231644.3484151-1-kafai@fb.com
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0d6f9d8f
    • Rob Clark's avatar
      drm/msm: Use the correct dma_sync calls harder · 05fe33ca
      Rob Clark authored
      commit 9f614197 upstream.
      
      Looks like the dma_sync calls don't do what we want on armv7 either.
      Fixes:
      
        Unable to handle kernel paging request at virtual address 50001000
        pgd = (ptrval)
        [50001000] *pgd=00000000
        Internal error: Oops: 805 [#1] SMP ARM
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.3.0-rc6-00271-g9f159ae0 #4
        Hardware name: Freescale i.MX53 (Device Tree Support)
        PC is at v7_dma_clean_range+0x20/0x38
        LR is at __dma_page_cpu_to_dev+0x28/0x90
        pc : [<c011c76c>]    lr : [<c01181c4>]    psr: 20000013
        sp : d80b5a88  ip : de96c000  fp : d840ce6c
        r10: 00000000  r9 : 00000001  r8 : d843e010
        r7 : 00000000  r6 : 00008000  r5 : ddb6c000  r4 : 00000000
        r3 : 0000003f  r2 : 00000040  r1 : 50008000  r0 : 50001000
        Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
        Control: 10c5387d  Table: 70004019  DAC: 00000051
        Process swapper/0 (pid: 1, stack limit = 0x(ptrval))
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      Fixes: 3de433c5 ("drm/msm: Use the correct dma_sync calls in msm_gem")
      Tested-by: default avatarFabio Estevam <festevam@gmail.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05fe33ca
    • Dmitry Monakhov's avatar
      ext4: fix extent_status fragmentation for plain files · b61c29e3
      Dmitry Monakhov authored
      [ Upstream commit 4068664e ]
      
      Extents are cached in read_extent_tree_block(); as a result, extents
      are not cached for inodes with depth == 0 when we try to find the
      extent using ext4_find_extent().  The result of the lookup is cached
      in ext4_map_blocks() but is only a subset of the extent on disk.  As a
      result, the contents of extents status cache can get very badly
      fragmented for certain workloads, such as a random 4k read workload.
      
      File size of /mnt/test is 33554432 (8192 blocks of 4096 bytes)
       ext:     logical_offset:        physical_offset: length:   expected: flags:
         0:        0..    8191:      40960..     49151:   8192:             last,eof
      
      $ perf record -e 'ext4:ext4_es_*' /root/bin/fio --name=t --direct=0 --rw=randread --bs=4k --filesize=32M --size=32M --filename=/mnt/test
      $ perf script | grep ext4_es_insert_extent | head -n 10
                   fio   131 [000]    13.975421:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [494/1) mapped 41454 status W
                   fio   131 [000]    13.975939:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [6064/1) mapped 47024 status W
                   fio   131 [000]    13.976467:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [6907/1) mapped 47867 status W
                   fio   131 [000]    13.976937:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [3850/1) mapped 44810 status W
                   fio   131 [000]    13.977440:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [3292/1) mapped 44252 status W
                   fio   131 [000]    13.977931:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [6882/1) mapped 47842 status W
                   fio   131 [000]    13.978376:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [3117/1) mapped 44077 status W
                   fio   131 [000]    13.978957:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [2896/1) mapped 43856 status W
                   fio   131 [000]    13.979474:           ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [7479/1) mapped 48439 status W
      
      Fix this by caching the extents for inodes with depth == 0 in
      ext4_find_extent().
      
      [ Renamed ext4_es_cache_extents() to ext4_cache_extents() since this
        newly added function is not in extents_cache.c, and to avoid
        potential visual confusion with ext4_es_cache_extent().  -TYT ]
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@gmail.com>
      Link: https://lore.kernel.org/r/20191106122502.19986-1-dmonakhov@gmail.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      b61c29e3
  2. 23 Apr, 2020 36 commits