1. 19 Dec, 2019 5 commits
  2. 18 Dec, 2019 7 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 80a0c2e5
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A slightly high amount at this time, but all good and small fixes:
      
         - A PCM core fix that initializes the buffer properly for avoiding
           information leaks; it is a long-standing minor problem, but good to
           fix better now
      
         - A few ASoC core fixes for the init / cleanup ordering issues that
           surfaced after the recent refactoring
      
         - Lots of SOF and topology-related fixes went in, as usual as such
           hot topics
      
         - Several ASoC codec and platform-specific small fixes: wm89xx,
           realtek, and max98090, AMD, Intel-SST
      
         - A fix for the previous incomplete regression of HD-audio, now
           hitting Nvidia HDMI
      
         - A few HD-audio CA0132 codec fixes"
      
      * tag 'sound-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (27 commits)
        ALSA: hda - Downgrade error message for single-cmd fallback
        ASoC: wm8962: fix lambda value
        ALSA: hda: Fix regression by strip mask fix
        ALSA: hda/ca0132 - Fix work handling in delayed HP detection
        ALSA: hda/ca0132 - Avoid endless loop
        ALSA: hda/ca0132 - Keep power on during processing DSP response
        ALSA: pcm: Avoid possible info leaks from PCM stream buffers
        ASoC: Intel: common: work-around incorrect ACPI HID for CML boards
        ASoC: SOF: Intel: split cht and byt debug window sizes
        ASoC: SOF: loader: fix snd_sof_fw_parse_ext_data
        ASoC: SOF: loader: snd_sof_fw_parse_ext_data log warning on unknown header
        ASoC: simple-card: Don't create separate link when platform is present
        ASoC: topology: Check return value for soc_tplg_pcm_create()
        ASoC: topology: Check return value for snd_soc_add_dai_link()
        ASoC: core: only flush inited work during free
        ASoC: Intel: bytcr_rt5640: Update quirk for Teclast X89
        ASoC: core: Init pcm runtime work early to avoid warnings
        ASoC: Intel: sst: Add missing include <linux/io.h>
        ASoC: max98090: fix possible race conditions
        ASoC: max98090: exit workaround earlier if PLL is locked
        ...
      80a0c2e5
    • Changbin Du's avatar
      lib/Kconfig.debug: fix some messed up configurations · 045f6d79
      Changbin Du authored
      Some configuration items are messed up during conflict resolving.  For
      example, STRICT_DEVMEM should not in testing menu, but kunit should.
      This patch fixes all of them.
      
      [akpm@linux-foundation.org: coding style fixes]
      Link: http://lkml.kernel.org/r/20191209155653.7509-1-changbin.du@gmail.comSigned-off-by: default avatarChangbin Du <changbin.du@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      045f6d79
    • Yang Shi's avatar
      mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG · 42a9a53b
      Yang Shi authored
      Since commit 0a432dcb ("mm: shrinker: make shrinker not depend on
      memcg kmem"), shrinkers' idr is protected by CONFIG_MEMCG instead of
      CONFIG_MEMCG_KMEM, so it makes no sense to protect shrinker idr replace
      with CONFIG_MEMCG_KMEM.
      
      And in the CONFIG_MEMCG && CONFIG_SLOB case, shrinker_idr contains only
      shrinker, and it is deferred_split_shrinker.  But it is never actually
      called, since idr_replace() is never compiled due to the wrong #ifdef.
      The deferred_split_shrinker all the time is staying in half-registered
      state, and it's never called for subordinate mem cgroups.
      
      Link: http://lkml.kernel.org/r/1575486978-45249-1-git-send-email-yang.shi@linux.alibaba.com
      Fixes: 0a432dcb ("mm: shrinker: make shrinker not depend on memcg kmem")
      Signed-off-by: default avatarYang Shi <yang.shi@linux.alibaba.com>
      Reviewed-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Shakeel Butt <shakeelb@google.com>
      Cc: Roman Gushchin <guro@fb.com>
      Cc: <stable@vger.kernel.org>	[5.4+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      42a9a53b
    • Daniel Axtens's avatar
      kasan: don't assume percpu shadow allocations will succeed · 253a496d
      Daniel Axtens authored
      syzkaller and the fault injector showed that I was wrong to assume that
      we could ignore percpu shadow allocation failures.
      
      Handle failures properly.  Merge all the allocated areas back into the
      free list and release the shadow, then clean up and return NULL.  The
      shadow is released unconditionally, which relies upon the fact that the
      release function is able to tolerate pages not being present.
      
      Also clean up shadows in the recovery path - currently they are not
      released, which leaks a bit of memory.
      
      Link: http://lkml.kernel.org/r/20191205140407.1874-3-dja@axtens.net
      Fixes: 3c5c3cfb ("kasan: support backing vmalloc space with real shadow memory")
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Reported-by: syzbot+82e323920b78d54aaed5@syzkaller.appspotmail.com
      Reported-by: syzbot+59b7daa4315e07a994f1@syzkaller.appspotmail.com
      Reviewed-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Qian Cai <cai@lca.pw>
      Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      253a496d
    • Daniel Axtens's avatar
      kasan: use apply_to_existing_page_range() for releasing vmalloc shadow · e218f1ca
      Daniel Axtens authored
      kasan_release_vmalloc uses apply_to_page_range to release vmalloc
      shadow.  Unfortunately, apply_to_page_range can allocate memory to fill
      in page table entries, which is not what we want.
      
      Also, kasan_release_vmalloc is called under free_vmap_area_lock, so if
      apply_to_page_range does allocate memory, we get a sleep in atomic bug:
      
      	BUG: sleeping function called from invalid context at mm/page_alloc.c:4681
      	in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 15087, name:
      
      	Call Trace:
      	 __dump_stack lib/dump_stack.c:77 [inline]
      	 dump_stack+0x199/0x216 lib/dump_stack.c:118
      	 ___might_sleep.cold.97+0x1f5/0x238 kernel/sched/core.c:6800
      	 __might_sleep+0x95/0x190 kernel/sched/core.c:6753
      	 prepare_alloc_pages mm/page_alloc.c:4681 [inline]
      	 __alloc_pages_nodemask+0x3cd/0x890 mm/page_alloc.c:4730
      	 alloc_pages_current+0x10c/0x210 mm/mempolicy.c:2211
      	 alloc_pages include/linux/gfp.h:532 [inline]
      	 __get_free_pages+0xc/0x40 mm/page_alloc.c:4786
      	 __pte_alloc_one_kernel include/asm-generic/pgalloc.h:21 [inline]
      	 pte_alloc_one_kernel include/asm-generic/pgalloc.h:33 [inline]
      	 __pte_alloc_kernel+0x1d/0x200 mm/memory.c:459
      	 apply_to_pte_range mm/memory.c:2031 [inline]
      	 apply_to_pmd_range mm/memory.c:2068 [inline]
      	 apply_to_pud_range mm/memory.c:2088 [inline]
      	 apply_to_p4d_range mm/memory.c:2108 [inline]
      	 apply_to_page_range+0x77d/0xa00 mm/memory.c:2133
      	 kasan_release_vmalloc+0xa7/0xc0 mm/kasan/common.c:970
      	 __purge_vmap_area_lazy+0xcbb/0x1f30 mm/vmalloc.c:1313
      	 try_purge_vmap_area_lazy mm/vmalloc.c:1332 [inline]
      	 free_vmap_area_noflush+0x2ca/0x390 mm/vmalloc.c:1368
      	 free_unmap_vmap_area mm/vmalloc.c:1381 [inline]
      	 remove_vm_area+0x1cc/0x230 mm/vmalloc.c:2209
      	 vm_remove_mappings mm/vmalloc.c:2236 [inline]
      	 __vunmap+0x223/0xa20 mm/vmalloc.c:2299
      	 __vfree+0x3f/0xd0 mm/vmalloc.c:2356
      	 __vmalloc_area_node mm/vmalloc.c:2507 [inline]
      	 __vmalloc_node_range+0x5d5/0x810 mm/vmalloc.c:2547
      	 __vmalloc_node mm/vmalloc.c:2607 [inline]
      	 __vmalloc_node_flags mm/vmalloc.c:2621 [inline]
      	 vzalloc+0x6f/0x80 mm/vmalloc.c:2666
      	 alloc_one_pg_vec_page net/packet/af_packet.c:4233 [inline]
      	 alloc_pg_vec net/packet/af_packet.c:4258 [inline]
      	 packet_set_ring+0xbc0/0x1b50 net/packet/af_packet.c:4342
      	 packet_setsockopt+0xed7/0x2d90 net/packet/af_packet.c:3695
      	 __sys_setsockopt+0x29b/0x4d0 net/socket.c:2117
      	 __do_sys_setsockopt net/socket.c:2133 [inline]
      	 __se_sys_setsockopt net/socket.c:2130 [inline]
      	 __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2130
      	 do_syscall_64+0xfa/0x780 arch/x86/entry/common.c:294
      	 entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Switch to using the apply_to_existing_page_range() helper instead, which
      won't allocate memory.
      
      [akpm@linux-foundation.org: s/apply_to_existing_pages/apply_to_existing_page_range/]
      Link: http://lkml.kernel.org/r/20191205140407.1874-2-dja@axtens.net
      Fixes: 3c5c3cfb ("kasan: support backing vmalloc space with real shadow memory")
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Reviewed-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Qian Cai <cai@lca.pw>
      Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e218f1ca
    • Daniel Axtens's avatar
      mm/memory.c: add apply_to_existing_page_range() helper · be1db475
      Daniel Axtens authored
      apply_to_page_range() takes an address range, and if any parts of it are
      not covered by the existing page table hierarchy, it allocates memory to
      fill them in.
      
      In some use cases, this is not what we want - we want to be able to
      operate exclusively on PTEs that are already in the tables.
      
      Add apply_to_existing_page_range() for this.  Adjust the walker
      functions for apply_to_page_range to take 'create', which switches them
      between the old and new modes.
      
      This will be used in KASAN vmalloc.
      
      [akpm@linux-foundation.org: reduce code duplication]
      [akpm@linux-foundation.org: s/apply_to_existing_pages/apply_to_existing_page_range/]
      [akpm@linux-foundation.org: initialize __apply_to_page_range::err]
      Link: http://lkml.kernel.org/r/20191205140407.1874-1-dja@axtens.netSigned-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Daniel Axtens <dja@axtens.net>
      Cc: Qian Cai <cai@lca.pw>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      be1db475
    • Andrey Ryabinin's avatar
      kasan: fix crashes on access to memory mapped by vm_map_ram() · d98c9e83
      Andrey Ryabinin authored
      With CONFIG_KASAN_VMALLOC=y any use of memory obtained via vm_map_ram()
      will crash because there is no shadow backing that memory.
      
      Instead of sprinkling additional kasan_populate_vmalloc() calls all over
      the vmalloc code, move it into alloc_vmap_area(). This will fix
      vm_map_ram() and simplify the code a bit.
      
      [aryabinin@virtuozzo.com: v2]
        Link: http://lkml.kernel.org/r/20191205095942.1761-1-aryabinin@virtuozzo.comLink: http://lkml.kernel.org/r/20191204204534.32202-1-aryabinin@virtuozzo.com
      Fixes: 3c5c3cfb ("kasan: support backing vmalloc space with real shadow memory")
      Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Reviewed-by: default avatarUladzislau Rezki (Sony) <urezki@gmail.com>
      Cc: Daniel Axtens <dja@axtens.net>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Daniel Axtens <dja@axtens.net>
      Cc: Qian Cai <cai@lca.pw>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d98c9e83
  3. 17 Dec, 2019 18 commits
  4. 16 Dec, 2019 10 commits