aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin/export-to-sqlite-report
diff options
context:
space:
mode:
authorAndrey Ryabinin <aryabinin@virtuozzo.com>2019-08-24 17:55:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-08-24 19:48:42 -0700
commit00fb24a42a68b1ee0f6495993fe1be7124433dfb (patch)
tree9f3fcacaa2959553d071e78d35b298b43e799165 /tools/perf/scripts/python/bin/export-to-sqlite-report
parentmm/zsmalloc.c: fix race condition in zs_destroy_pool (diff)
downloadlinux-00fb24a42a68b1ee0f6495993fe1be7124433dfb.tar.gz
linux-00fb24a42a68b1ee0f6495993fe1be7124433dfb.zip
mm/kasan: fix false positive invalid-free reports with CONFIG_KASAN_SW_TAGS=y
The code like this: ptr = kmalloc(size, GFP_KERNEL); page = virt_to_page(ptr); offset = offset_in_page(ptr); kfree(page_address(page) + offset); may produce false-positive invalid-free reports on the kernel with CONFIG_KASAN_SW_TAGS=y. In the example above we lose the original tag assigned to 'ptr', so kfree() gets the pointer with 0xFF tag. In kfree() we check that 0xFF tag is different from the tag in shadow hence print false report. Instead of just comparing tags, do the following: 1) Check that shadow doesn't contain KASAN_TAG_INVALID. Otherwise it's double-free and it doesn't matter what tag the pointer have. 2) If pointer tag is different from 0xFF, make sure that tag in the shadow is the same as in the pointer. Link: http://lkml.kernel.org/r/20190819172540.19581-1-aryabinin@virtuozzo.com Fixes: 7f94ffbc4c6a ("kasan: add hooks implementation for tag-based mode") Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Reported-by: Walter Wu <walter-zh.wu@mediatek.com> Reported-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Andrey Konovalov <andreyknvl@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-sqlite-report')
0 files changed, 0 insertions, 0 deletions
it/drivers/scsi/ufs/ufshcd.h?id=5a244e0ea67b293abb1d26c825db2ddde5f2862f&follow=1'>scsi: ufs: fix Auto-Hibern8 error detectionStanley Chu2-1/+8 2020-02-10scsi: ufs: ufs-mediatek: support linkoff state during suspendStanley Chu1-5/+7 2020-02-10scsi: ufs: ufs-mediatek: ensure UniPro is not powered down before linkupStanley Chu1-9/+10 2020-02-10scsi: megaraid_sas: fix indentation issueColin Ian King1-2/+2 2020-02-10scsi: iscsi: Perform connection failure entirely in kernel spaceBharath Ravi2-0/+69 2020-02-10scsi: tcm_qla2xxx: Make qlt_alloc_qfull_cmd() set cmd->se_cmd.map_tagBart Van Assche3-22/+33 2020-02-09Linux 5.6-rc1v5.6-rc1Linus Torvalds1-2/+2 2020-02-09irqchip/gic-v4.1: Avoid 64bit division for the sake of 32bit ARMMarc Zyngier1-2/+2 2020-02-08fs: Add VirtualBox guest shared folder (vboxsf) supportHans de Goede12-0/+3280 2020-02-08Fix up remaining devm_ioremap_nocache() in SGI IOC3 8250 UART driverLinus Torvalds1-1/+1 2020-02-08pipe: use exclusive waits when reading or writingLinus Torvalds4-30/+51 2020-02-08compat_ioctl: fix FIONREAD on devicesArnd Bergmann1-4/+7 2020-02-08net: thunderx: use proper interface type for RGMIITim Harvey1-1/+1 2020-02-08powerpc: Fix CONFIG_TRACE_IRQFLAGS with CONFIG_VMAP_STACKChristophe Leroy1-1/+1 2020-02-08powerpc/futex: Fix incorrect user access blockingMichael Ellerman1-4/+6 2020-02-08irqchip/gic-v3-its: Rename VPENDBASER/VPROPBASER accessorsZenghui Yu3-24/+24 2020-02-08irqchip/gic-v3-its: Remove superfluous WARN_ONZenghui Yu1-1/+0 2020-02-08irqchip/gic-v4.1: Drop 'tmp' in inherit_vpe_l1_table_from_rd()Zenghui Yu1-3/+1 2020-02-08irqchip/gic-v4.1: Ensure L2 vPE table is allocated at RD levelZenghui Yu1-0/+80 2020-02-08irqchip/gic-v4.1: Set vpe_l1_base for all redistributorsZenghui Yu2-2/+5 2020-02-08irqchip/gic-v4.1: Fix programming of GICR_VPROPBASER_4_1_SIZEZenghui Yu1-1/+1 2020-02-08mt76: mt7615: fix max_nss in mt7615_eeprom_parse_hw_capLorenzo Bianconi1-1/+2 2020-02-07bpf: Improve bucket_log calculation logicMartin KaFai Lau1-2/+3