Commit Graph

539 Commits

Author SHA1 Message Date
Michael Bestas
0d750eaafc Merge tag 'ASB-2024-08-05_4.19-stable' of https://android.googlesource.com/kernel/common into android-msm-pixel-4.19
https://source.android.com/docs/security/bulletin/2024-08-01
CVE-2024-36971

* tag 'ASB-2024-08-05_4.19-stable' of https://android.googlesource.com/kernel/common: (2363 commits)
  Linux 4.19.318
  i2c: rcar: bring hardware to known state when probing
  nilfs2: fix kernel bug on rename operation of broken directory
  SUNRPC: Fix RPC client cleaned up the freed pipefs dentries
  tcp: avoid too many retransmit packets
  tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
  net: tcp: fix unexcepted socket die when snd_wnd is 0
  tcp: refactor tcp_retransmit_timer()
  libceph: fix race between delayed_work() and ceph_monc_stop()
  hpet: Support 32-bit userspace
  USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
  usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
  USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
  USB: serial: option: add Rolling RW350-GL variants
  USB: serial: option: add Netprisma LCUK54 series modules
  USB: serial: option: add support for Foxconn T99W651
  USB: serial: option: add Fibocom FM350-GL
  USB: serial: option: add Telit FN912 rmnet compositions
  USB: serial: option: add Telit generic core-dump composition
  ARM: davinci: Convert comma to semicolon
  ...

 Conflicts:
	Documentation/devicetree/bindings/sound/rt5645.txt
	android/abi_gki_aarch64.xml
	drivers/clk/qcom/clk-rcg2.c
	drivers/hwtracing/coresight/coresight-etm4x.c
	drivers/leds/leds-pwm.c
	drivers/mmc/core/host.c
	drivers/mmc/core/sdio.c
	drivers/mmc/host/cqhci.c
	drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
	drivers/rpmsg/qcom_glink_native.c
	drivers/scsi/ufs/ufshcd.c
	drivers/thermal/thermal_core.c
	drivers/usb/dwc3/core.c
	drivers/usb/gadget/function/f_ncm.c
	fs/f2fs/gc.c
	fs/pstore/ram_core.c
	include/linux/fs.h
	include/linux/timer.h
	include/net/tcp.h
	init/initramfs.c
	kernel/events/core.c
	kernel/sched/idle.c
	kernel/time/timer.c
	mm/page_alloc.c
	net/wireless/scan.c
	scripts/checkpatch.pl

Change-Id: Ice08f3ba5dc64a093bc381710ef2408d963cb983
2024-09-06 02:00:44 +03:00
Greg Kroah-Hartman
32e0a5db51 Merge 4.19.311 into android-4.19-stable
Changes in 4.19.311
	ASoC: rt5645: Make LattePanda board DMI match more precise
	x86/xen: Add some null pointer checking to smp.c
	MIPS: Clear Cause.BD in instruction_pointer_set
	net/iucv: fix the allocation size of iucv_path_table array
	block: sed-opal: handle empty atoms when parsing response
	dm-verity, dm-crypt: align "struct bvec_iter" correctly
	scsi: mpt3sas: Prevent sending diag_reset when the controller is ready
	Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security
	firewire: core: use long bus reset on gap count error
	ASoC: Intel: bytcr_rt5640: Add an extra entry for the Chuwi Vi8 tablet
	Input: gpio_keys_polled - suppress deferred probe error for gpio
	ASoC: wm8962: Enable oscillator if selecting WM8962_FLL_OSC
	ASoC: wm8962: Enable both SPKOUTR_ENA and SPKOUTL_ENA in mono mode
	ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll
	crypto: algif_aead - fix uninitialized ctx->init
	crypto: af_alg - make some functions static
	crypto: algif_aead - Only wake up when ctx->more is zero
	do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak
	fs/select: rework stack allocation hack for clang
	md: switch to ->check_events for media change notifications
	block: add a new set_read_only method
	md: implement ->set_read_only to hook into BLKROSET processing
	md: Don't clear MD_CLOSING when the raid is about to stop
	aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts
	timekeeping: Fix cross-timestamp interpolation on counter wrap
	timekeeping: Fix cross-timestamp interpolation corner case decision
	timekeeping: Fix cross-timestamp interpolation for non-x86
	wifi: ath10k: fix NULL pointer dereference in ath10k_wmi_tlv_op_pull_mgmt_tx_compl_ev()
	b43: dma: Fix use true/false for bool type variable
	wifi: b43: Stop/wake correct queue in DMA Tx path when QoS is disabled
	wifi: b43: Stop/wake correct queue in PIO Tx path when QoS is disabled
	b43: main: Fix use true/false for bool type
	wifi: b43: Stop correct queue in DMA worker when QoS is disabled
	wifi: b43: Disable QoS for bcm4331
	wifi: mwifiex: debugfs: Drop unnecessary error check for debugfs_create_dir()
	sock_diag: annotate data-races around sock_diag_handlers[family]
	af_unix: Annotate data-race of gc_in_progress in wait_for_unix_gc().
	wifi: libertas: fix some memleaks in lbs_allocate_cmd_buffer()
	ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit()
	bus: tegra-aconnect: Update dependency to ARCH_TEGRA
	iommu/amd: Mark interrupt as managed
	wifi: brcmsmac: avoid function pointer casts
	ARM: dts: arm: realview: Fix development chip ROM compatible value
	ACPI: scan: Fix device check notification handling
	x86, relocs: Ignore relocations in .notes section
	SUNRPC: fix some memleaks in gssx_dec_option_array
	mmc: wmt-sdmmc: remove an incorrect release_mem_region() call in the .remove function
	igb: move PEROUT and EXTTS isr logic to separate functions
	igb: Fix missing time sync events
	Bluetooth: Remove superfluous call to hci_conn_check_pending()
	Bluetooth: hci_core: Fix possible buffer overflow
	sr9800: Add check for usbnet_get_endpoints
	bpf: Fix hashtab overflow check on 32-bit arches
	bpf: Fix stackmap overflow check on 32-bit arches
	ipv6: fib6_rules: flush route cache when rule is changed
	tcp: fix incorrect parameter validation in the do_tcp_getsockopt() function
	l2tp: fix incorrect parameter validation in the pppol2tp_getsockopt() function
	udp: fix incorrect parameter validation in the udp_lib_getsockopt() function
	net: kcm: fix incorrect parameter validation in the kcm_getsockopt) function
	net/x25: fix incorrect parameter validation in the x25_getsockopt() function
	nfp: flower: handle acti_netdevs allocation failure
	dm raid: fix false positive for requeue needed during reshape
	dm: call the resume method on internal suspend
	drm/tegra: dsi: Add missing check for of_find_device_by_node
	gpu: host1x: mipi: Update tegra_mipi_request() to be node based
	drm/tegra: dsi: Make use of the helper function dev_err_probe()
	drm/tegra: dsi: Fix some error handling paths in tegra_dsi_probe()
	drm/tegra: dsi: Fix missing pm_runtime_disable() in the error handling path of tegra_dsi_probe()
	drm/rockchip: inno_hdmi: Fix video timing
	drm: Don't treat 0 as -1 in drm_fixp2int_ceil
	drm/rockchip: lvds: do not overwrite error code
	drm/rockchip: lvds: do not print scary message when probing defer
	media: tc358743: register v4l2 async device only after successful setup
	perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample()
	ABI: sysfs-bus-pci-devices-aer_stats uses an invalid tag
	media: em28xx: annotate unchecked call to media_device_register()
	media: v4l2-tpg: fix some memleaks in tpg_alloc
	media: v4l2-mem2mem: fix a memleak in v4l2_m2m_register_entity
	media: dvbdev: remove double-unlock
	media: media/dvb: Use kmemdup rather than duplicating its implementation
	media: dvbdev: Fix memleak in dvb_register_device
	media: dvbdev: fix error logic at dvb_register_device()
	media: dvb-core: Fix use-after-free due to race at dvb_register_device()
	media: edia: dvbdev: fix a use-after-free
	clk: qcom: reset: Allow specifying custom reset delay
	clk: qcom: reset: support resetting multiple bits
	clk: qcom: reset: Commonize the de/assert functions
	clk: qcom: reset: Ensure write completion on reset de/assertion
	quota: code cleanup for __dquot_alloc_space()
	fs/quota: erase unused but set variable warning
	quota: check time limit when back out space/inode change
	quota: simplify drop_dquot_ref()
	quota: Fix potential NULL pointer dereference
	quota: Fix rcu annotations of inode dquot pointers
	perf thread_map: Free strlist on normal path in thread_map__new_by_tid_str()
	drm/radeon/ni: Fix wrong firmware size logging in ni_init_microcode()
	ALSA: seq: fix function cast warnings
	media: go7007: add check of return value of go7007_read_addr()
	media: pvrusb2: fix pvr2_stream_callback casts
	firmware: qcom: scm: Add WLAN VMID for Qualcomm SCM interface
	clk: qcom: dispcc-sdm845: Adjust internal GDSC wait times
	drm/mediatek: dsi: Fix DSI RGB666 formats and definitions
	PCI: Mark 3ware-9650SE Root Port Extended Tags as broken
	clk: hisilicon: hi3519: Release the correct number of gates in hi3519_clk_unregister()
	drm/tegra: put drm_gem_object ref on error in tegra_fb_create
	mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref
	crypto: arm - Rename functions to avoid conflict with crypto/sha256.h
	crypto: arm/sha - fix function cast warnings
	mtd: rawnand: lpc32xx_mlc: fix irq handler prototype
	ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs
	drm/amdgpu: Fix missing break in ATOM_ARG_IMM Case of atom_get_src_int()
	media: pvrusb2: fix uaf in pvr2_context_set_notify
	media: dvb-frontends: avoid stack overflow warnings with clang
	media: go7007: fix a memleak in go7007_load_encoder
	drm/mediatek: Fix a null pointer crash in mtk_drm_crtc_finish_page_flip
	powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks
	powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc.
	backlight: lm3630a: Initialize backlight_properties on init
	backlight: lm3630a: Don't set bl->props.brightness in get_brightness
	backlight: da9052: Fully initialize backlight_properties during probe
	backlight: lm3639: Fully initialize backlight_properties during probe
	backlight: lp8788: Fully initialize backlight_properties during probe
	sparc32: Fix section mismatch in leon_pci_grpci
	ALSA: usb-audio: Stop parsing channels bits when all channels are found.
	scsi: csiostor: Avoid function pointer casts
	scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn
	net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()
	NFS: Fix an off by one in root_nfs_cat()
	clk: qcom: gdsc: Add support to update GDSC transition delay
	serial: max310x: fix syntax error in IRQ error message
	tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT
	kconfig: fix infinite loop when expanding a macro at the end of file
	rtc: mt6397: select IRQ_DOMAIN instead of depending on it
	serial: 8250_exar: Don't remove GPIO device on suspend
	staging: greybus: fix get_channel_from_mode() failure path
	usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin
	net: hsr: fix placement of logical operator in a multi-line statement
	hsr: Fix uninit-value access in hsr_get_node()
	rds: introduce acquire/release ordering in acquire/release_in_xmit()
	hsr: Handle failures in module init
	net/bnx2x: Prevent access to a freed page in page_pool
	spi: spi-mt65xx: Fix NULL pointer access in interrupt handler
	crypto: af_alg - Fix regression on empty requests
	crypto: af_alg - Work around empty control messages without MSG_MORE
	Linux 4.19.311

Change-Id: I034e9a44b6dec1a7b5c600b3cd77aabc401044d7
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-16 10:07:50 +00:00
Herbert Xu
de564b5975 crypto: algif_aead - Only wake up when ctx->more is zero
[ Upstream commit f3c802a1f30013f8f723b62d7fa49eb9e991da23 ]

AEAD does not support partial requests so we must not wake up
while ctx->more is set.  In order to distinguish between the
case of no data sent yet and a zero-length request, a new init
flag has been added to ctx.

SKCIPHER has also been modified to ensure that at least a block
of data is available if there is more data to come.

Fixes: 2d97591ef4 ("crypto: af_alg - consolidation of...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:22:34 -04:00
Eric Biggers
0ca02d4bee crypto: af_alg - make some functions static
[ Upstream commit 466e0759269d31485074126700574230bfff3b1c ]

Some exported functions in af_alg.c aren't used outside of that file.
Therefore, un-export them and make them 'static'.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: f3c802a1f300 ("crypto: algif_aead - Only wake up when ctx->more is zero")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:22:34 -04:00
Greg Kroah-Hartman
bee81d3469 Merge 4.19.306 into android-4.19-stable
Changes in 4.19.306
	f2fs: explicitly null-terminate the xattr list
	ASoC: Intel: Skylake: mem leak in skl register function
	ASoC: cs43130: Fix the position of const qualifier
	ASoC: cs43130: Fix incorrect frame delay configuration
	ASoC: rt5650: add mutex to avoid the jack detection failure
	net/tg3: fix race condition in tg3_reset_task()
	ASoC: da7219: Support low DC impedance headset
	drm/exynos: fix a potential error pointer dereference
	clk: rockchip: rk3128: Fix HCLK_OTG gate register
	jbd2: correct the printing of write_flags in jbd2_write_superblock()
	drm/crtc: Fix uninit-value bug in drm_mode_setcrtc
	tracing: Have large events show up as '[LINE TOO BIG]' instead of nothing
	tracing: Add size check when printing trace_marker output
	ring-buffer: Do not record in NMI if the arch does not support cmpxchg in NMI
	reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
	Input: atkbd - skip ATKBD_CMD_GETID in translated mode
	Input: i8042 - add nomux quirk for Acer P459-G2-M
	s390/scm: fix virtual vs physical address confusion
	ARC: fix spare error
	Input: xpad - add Razer Wolverine V2 support
	ARM: sun9i: smp: fix return code check of of_property_match_string
	drm/crtc: fix uninitialized variable use
	binder: use EPOLLERR from eventpoll.h
	binder: fix comment on binder_alloc_new_buf() return value
	uio: Fix use-after-free in uio_open
	coresight: etm4x: Fix width of CCITMIN field
	x86/lib: Fix overflow when counting digits
	EDAC/thunderx: Fix possible out-of-bounds string access
	powerpc: add crtsavres.o to always-y instead of extra-y
	powerpc: remove redundant 'default n' from Kconfig-s
	powerpc/44x: select I2C for CURRITUCK
	powerpc/pseries/memhotplug: Quieten some DLPAR operations
	powerpc/pseries/memhp: Fix access beyond end of drmem array
	selftests/powerpc: Fix error handling in FPU/VMX preemption tests
	powerpc/powernv: Add a null pointer check in opal_event_init()
	powerpc/imc-pmu: Add a null pointer check in update_events_in_group()
	mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response
	ACPI: video: check for error while searching for backlight device parent
	ACPI: LPIT: Avoid u32 multiplication overflow
	net: netlabel: Fix kerneldoc warnings
	netlabel: remove unused parameter in netlbl_netlink_auditinfo()
	calipso: fix memory leak in netlbl_calipso_add_pass()
	mtd: Fix gluebi NULL pointer dereference caused by ftl notifier
	selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket
	crypto: virtio - Handle dataq logic with tasklet
	crypto: ccp - fix memleak in ccp_init_dm_workarea
	crypto: af_alg - Disallow multiple in-flight AIO requests
	crypto: sahara - remove FLAGS_NEW_KEY logic
	crypto: sahara - fix ahash selftest failure
	crypto: sahara - fix processing requests with cryptlen < sg->length
	crypto: sahara - fix error handling in sahara_hw_descriptor_create()
	pstore: ram_core: fix possible overflow in persistent_ram_init_ecc()
	crypto: virtio - Wait for tasklet to complete on device remove
	crypto: sahara - fix ahash reqsize
	crypto: sahara - fix wait_for_completion_timeout() error handling
	crypto: sahara - improve error handling in sahara_sha_process()
	crypto: sahara - fix processing hash requests with req->nbytes < sg->length
	crypto: sahara - do not resize req->src when doing hash operations
	crypto: scompress - return proper error code for allocation failure
	crypto: scompress - Use per-CPU struct instead multiple variables
	crypto: scomp - fix req->dst buffer overflow
	blocklayoutdriver: Fix reference leak of pnfs_device_node
	NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT
	bpf, lpm: Fix check prefixlen before walking trie
	wifi: libertas: stop selecting wext
	ARM: dts: qcom: apq8064: correct XOADC register address
	ncsi: internal.h: Fix a spello
	net/ncsi: Fix netlink major/minor version numbers
	firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()
	rtlwifi: Use ffs in <foo>_phy_calculate_bit_shift
	wifi: rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior
	scsi: hisi_sas: Replace with standard error code return value
	dma-mapping: clear dev->dma_mem to NULL after freeing it
	wifi: rtlwifi: add calculate_bit_shift()
	wifi: rtlwifi: rtl8188ee: phy: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192c: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192cu: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192ce: using calculate_bit_shift()
	rtlwifi: rtl8192de: make arrays static const, makes object smaller
	wifi: rtlwifi: rtl8192de: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192ee: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192se: using calculate_bit_shift()
	Bluetooth: Fix bogus check for re-auth no supported with non-ssp
	Bluetooth: btmtkuart: fix recv_buf() return value
	ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim()
	RDMA/usnic: Silence uninitialized symbol smatch warnings
	media: pvrusb2: fix use after free on context disconnection
	drm/bridge: Fix typo in post_disable() description
	f2fs: fix to avoid dirent corruption
	drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()
	drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check()
	drm/radeon: check return value of radeon_ring_lock()
	ASoC: cs35l33: Fix GPIO name and drop legacy include
	ASoC: cs35l34: Fix GPIO name and drop legacy include
	drm/msm/mdp4: flush vblank event on disable
	drm/drv: propagate errors from drm_modeset_register_all()
	drm/radeon: check the alloc_workqueue return value in radeon_crtc_init()
	drm/radeon/dpm: fix a memleak in sumo_parse_power_table
	drm/radeon/trinity_dpm: fix a memleak in trinity_parse_power_table
	media: cx231xx: fix a memleak in cx231xx_init_isoc
	media: dvbdev: drop refcount on error path in dvb_device_open()
	drm/amdgpu/debugfs: fix error code when smc register accessors are NULL
	drm/amd/pm: fix a double-free in si_dpm_init
	drivers/amd/pm: fix a use-after-free in kv_parse_power_table
	gpu/drm/radeon: fix two memleaks in radeon_vm_init
	watchdog: set cdev owner before adding
	watchdog/hpwdt: Only claim UNKNOWN NMI if from iLO
	watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling
	mmc: sdhci_omap: Fix TI SoC dependencies
	of: Fix double free in of_parse_phandle_with_args_map
	of: unittest: Fix of_count_phandle_with_args() expected value message
	binder: fix async space check for 0-sized buffers
	Input: atkbd - use ab83 as id when skipping the getid command
	Revert "ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek"
	xen-netback: don't produce zero-size SKB frags
	binder: fix race between mmput() and do_exit()
	binder: fix unused alloc->free_async_space
	tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug
	usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
	usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart
	Revert "usb: dwc3: Soft reset phy on probe for host"
	Revert "usb: dwc3: don't reset device side if dwc3 was configured as host-only"
	usb: chipidea: wait controller resume finished for wakeup irq
	Revert "usb: typec: class: fix typec_altmode_put_partner to put plugs"
	usb: typec: class: fix typec_altmode_put_partner to put plugs
	usb: mon: Fix atomicity violation in mon_bin_vma_fault
	ALSA: oxygen: Fix right channel of capture volume mixer
	fbdev: flush deferred work in fb_deferred_io_fsync()
	wifi: rtlwifi: Remove bogus and dangerous ASPM disable/enable code
	wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors
	wifi: mwifiex: configure BSSID consistently when starting AP
	HID: wacom: Correct behavior when processing some confidence == false touches
	MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()
	MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup()
	acpi: property: Let args be NULL in __acpi_node_get_property_reference
	perf genelf: Set ELF program header addresses properly
	apparmor: avoid crash when parsed profile name is empty
	serial: imx: Correct clock error message in function probe()
	net: qualcomm: rmnet: fix global oob in rmnet_policy
	net: ravb: Fix dma_addr_t truncation in error case
	net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe
	ipvs: avoid stat macros calls from preemptible context
	kdb: Censor attempts to set PROMPT without ENABLE_MEM_READ
	kdb: Fix a potential buffer overflow in kdb_local()
	i2c: s3c24xx: fix read transfers in polling mode
	i2c: s3c24xx: fix transferring more than one message in polling mode
	Revert "NFSD: Fix possible sleep during nfsd4_release_lockowner()"
	crypto: scompress - initialize per-CPU variables on each CPU
	Linux 4.19.306

Change-Id: Ib746be8cff1e4086680c032a03b0fc0ab5968a51
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-01-26 02:28:10 +00:00
Herbert Xu
19af0310c8 crypto: af_alg - Disallow multiple in-flight AIO requests
[ Upstream commit 67b164a871af1d736f131fd6fe78a610909f06f3 ]

Having multiple in-flight AIO requests results in unpredictable
output because they all share the same IV.  Fix this by only allowing
one request at a time.

Fixes: 83094e5e9e ("crypto: af_alg - add async support to algif_aead")
Fixes: a596999b7d ("crypto: algif - change algif_skcipher to be asynchronous")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 14:33:32 -08:00
Lucas Wei
eae5a83bf8 Merge android-4.19-stable (4.19.252) into android-msm-pixel-4.19-lts
Merge 4.19.252 into android-4.19-stable
Linux 4.19.252
    dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate
    dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate
    dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly
    dmaengine: pl330: Fix lockdep warning about non-static key
  * ida: don't use BUG_ON() for debugging
      lib/idr.c
    misc: rtsx_usb: set return value in rsp_buf alloc err path
  * misc: rtsx_usb: use separate command and response buffers
      include/linux/rtsx_usb.h
  * misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
      include/linux/rtsx_usb.h
    i2c: cadence: Unregister the clk notifier in error path
    selftests: forwarding: fix error message in learning_test
    selftests: forwarding: fix learning_test when h1 supports IFF_UNICAST_FLT
    selftests: forwarding: fix flood_unicast_test when h2 supports IFF_UNICAST_FLT
    ibmvnic: Properly dispose of all skbs during a failover.
    ARM: at91: pm: use proper compatible for sama5d2's rtc
    pinctrl: sunxi: a83t: Fix NAND function name for some pins
    ARM: meson: Fix refcount leak in meson_smp_prepare_cpus
    xfs: remove incorrect ASSERT in xfs_rename
    can: kvaser_usb: kvaser_usb_leaf: fix bittiming limits
    can: kvaser_usb: kvaser_usb_leaf: fix CAN clock frequency regression
    can: kvaser_usb: replace run-time checks with struct kvaser_usb_driver_info
    powerpc/powernv: delay rng platform device creation until later in boot
  * video: of_display_timing.h: include errno.h
      include/video/of_display_timing.h
    fbcon: Disallow setting font bigger than screen size
    iommu/vt-d: Fix PCI bus rescan device hot add
    net: rose: fix UAF bug caused by rose_t0timer_expiry
  * usbnet: fix memory leak in error case
      drivers/net/usb/usbnet.c
    can: gs_usb: gs_usb_open/close(): fix memory leak
    can: grcan: grcan_probe(): remove extra of_node_get()
    can: bcm: use call_rcu() instead of costly synchronize_rcu()
  * mm/slub: add missing TID updates on slab deactivation
      mm/slub.c
  * esp: limit skb_page_frag_refill use to a single page
      include/net/esp.h
      net/ipv4/esp4.c
      net/ipv6/esp6.c
    Merge 4.19.251 into android-4.19-stable
    Merge 4.19.250 into android-4.19-stable
  * ANDROID: revert some RNG function signature changes
      drivers/char/random.c
      include/linux/random.h
  * ANDROID: cpu/hotplug: avoid breaking Android ABI by fusing cpuhp steps
      include/linux/cpuhotplug.h
      kernel/cpu.c
    Merge 4.19.249 into android-4.19-stable
  * UPSTREAM: lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI
      include/crypto/internal/blake2s.h
      lib/crypto/blake2s.c
  * BACKPORT: lib/crypto: add prompts back to crypto libraries
      crypto/Kconfig
      lib/Kconfig
      lib/crypto/Kconfig
  * BACKPORT: lib/crypto: blake2s: include as built-in
      crypto/Kconfig
      drivers/net/Kconfig
      include/crypto/internal/blake2s.h
      lib/crypto/Kconfig
      lib/crypto/Makefile
      lib/crypto/blake2s-generic.c
      lib/crypto/blake2s.c
Linux 4.19.251
    net: usb: qmi_wwan: add Telit 0x1070 composition
    net: usb: qmi_wwan: add Telit 0x1060 composition
    xen/arm: Fix race in RB-tree based P2M accounting
    xen/blkfront: force data bouncing when backend is untrusted
    xen/netfront: force data bouncing when backend is untrusted
    xen/netfront: fix leaking data in shared pages
    xen/blkfront: fix leaking data in shared pages
  * ipv6/sit: fix ipip6_tunnel_get_prl return value
      net/ipv6/sit.c
  * sit: use min
      net/ipv6/sit.c
    net: dsa: bcm_sf2: force pause link settings
    hwmon: (ibmaem) don't call platform_device_del() if platform_device_add() fails
    xen/gntdev: Avoid blocking in unmap_grant_pages()
  * net: tun: avoid disabling NAPI twice
      drivers/net/tun.c
    NFC: nxp-nci: Don't issue a zero length i2c_master_read()
    nfc: nfcmrvl: Fix irq_of_parse_and_map() return value
  * net: bonding: fix use-after-free after 802.3ad slave unbind
      drivers/net/bonding/bond_3ad.c
  * net: bonding: fix possible NULL deref in rlb code
      drivers/net/bonding/bond_alb.c
    netfilter: nft_dynset: restore set element counter when failing to update
    caif_virtio: fix race between virtio_device_ready() and ndo_open()
    net: ipv6: unexport __init-annotated seg6_hmac_net_init()
  * usbnet: fix memory allocation in helpers
      drivers/net/usb/usbnet.c
    RDMA/qedr: Fix reporting QP timeout attribute
  * net: tun: stop NAPI when detaching queues
      drivers/net/tun.c
  * net: tun: unlink NAPI from device on destruction
      drivers/net/tun.c
    selftests/net: pass ipv6_args to udpgso_bench's IPv6 TCP test
    virtio-net: fix race between ndo_open() and virtio_device_ready()
  * net: usb: ax88179_178a: Fix packet receiving
      drivers/net/usb/ax88179_178a.c
    net: rose: fix UAF bugs caused by timer handler
    SUNRPC: Fix READ_PLUS crasher
    s390/archrandom: simplify back to earlier design and initialize earlier
    dm raid: fix KASAN warning in raid5_add_disks
    dm raid: fix accesses beyond end of raid member array
    nvdimm: Fix badblocks clear off-by-one error
  * UPSTREAM: crypto: poly1305 - fix poly1305_core_setkey() declaration
      include/crypto/internal/poly1305.h
      include/crypto/poly1305.h
      lib/crypto/poly1305-donna64.c
      lib/crypto/poly1305.c
  * UPSTREAM: mm: fix misplaced unlock_page in do_wp_page()
      mm/memory.c
  * BACKPORT: mm: do_wp_page() simplification
      mm/memory.c
  * UPSTREAM: mm/ksm: Remove reuse_ksm_page()
      include/linux/ksm.h
  * UPSTREAM: mm: reuse only-pte-mapped KSM page in do_wp_page()
      include/linux/ksm.h
      mm/memory.c
Linux 4.19.250
  * swiotlb: skip swiotlb_bounce when orig_addr is zero
      kernel/dma/swiotlb.c
  * net/sched: move NULL ptr check to qdisc_put() too
      net/sched/sch_generic.c
    net: mscc: ocelot: allow unregistered IP multicast flooding
  * kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
      include/linux/kexec.h
  * fdt: Update CRC check for rng-seed
      drivers/of/fdt.c
    xen: unexport __init-annotated xen_xlate_map_ballooned_pages()
  * drm: remove drm_fb_helper_modinit
      drivers/gpu/drm/drm_crtc_helper_internal.h
      drivers/gpu/drm/drm_kms_helper_common.c
    powerpc/pseries: wire up rng during setup_arch()
  * kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS (2nd attempt)
      Makefile
  * modpost: fix section mismatch check for exported init/exit sections
      scripts/mod/modpost.c
    ARM: cns3xxx: Fix refcount leak in cns3xxx_init
    ARM: Fix refcount leak in axxia_boot_secondary
    soc: bcm: brcmstb: pm: pm-arm: Fix refcount leak in brcmstb_pm_probe
    ARM: exynos: Fix refcount leak in exynos_map_pmu
    ARM: dts: imx6qdl: correct PU regulator ramp delay
    powerpc/powernv: wire up rng during setup_arch
    powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address
    powerpc: Enable execve syscall exit tracepoint
    xtensa: Fix refcount leak bug in time.c
    xtensa: xtfpga: Fix refcount leak bug in setup
    iio: adc: axp288: Override TS pin bias current for some models
    iio: trigger: sysfs: fix use-after-free on remove
    iio: gyro: mpu3050: Fix the error handling in mpu3050_power_up()
    iio: accel: mma8452: ignore the return value of reset operation
    iio:accel:bma180: rearrange iio trigger get and register
    iio:chemical:ccs811: rearrange iio trigger get and register
    usb: chipidea: udc: check request status before setting device address
  * xhci: turn off port power in shutdown
      drivers/usb/host/xhci-hub.c
      drivers/usb/host/xhci.c
      drivers/usb/host/xhci.h
    iio: adc: vf610: fix conversion mode sysfs node name
    gpio: winbond: Fix error code in winbond_gpio_get()
    virtio_net: fix xdp_rxq_info bug after suspend/resume
    igb: Make DMA faster when CPU is active on the PCIe link
    afs: Fix dynamic root getattr
    MIPS: Remove repetitive increase irq_err_count
    x86/xen: Remove undefined behavior in setup_features()
    erspan: do not assume transport header is always set
  * net/sched: sch_netem: Fix arithmetic in netem_dump() for 32-bit platforms
      net/sched/sch_netem.c
  * bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers
      drivers/net/bonding/bond_main.c
    USB: serial: option: add Quectel RM500K module support
    USB: serial: option: add Quectel EM05-G modem
    USB: serial: option: add Telit LE910Cx 0x1250 composition
  * random: quiet urandom warning ratelimit suppression message
      drivers/char/random.c
      include/linux/ratelimit.h
    dm era: commit metadata in postsuspend after worker stops
  * ata: libata: add qc->flags in ata_qc_complete_template tracepoint
      include/trace/events/libata.h
    ALSA: hda/realtek: Add quirk for Clevo PD70PNT
    ALSA: hda/conexant: Fix missing beep setup
    ALSA: hda/via: Fix missing beep setup
  * random: schedule mix_interrupt_randomness() less often
      drivers/char/random.c
    vt: drop old FONT ioctls
Linux 4.19.249
  * Revert "hwmon: Make chip parameter for with_info API mandatory"
      drivers/hwmon/hwmon.c
  * tcp: drop the hash_32() part from the index calculation
      net/ipv4/inet_hashtables.c
  * tcp: increase source port perturb table to 2^16
      net/ipv4/inet_hashtables.c
  * tcp: dynamically allocate the perturb table used by source ports
      net/ipv4/inet_hashtables.c
  * tcp: add small random increments to the source port
      net/ipv4/inet_hashtables.c
  * tcp: use different parts of the port_offset for index and offset
      net/ipv4/inet_hashtables.c
  * tcp: add some entropy in __inet_hash_connect()
      net/ipv4/inet_hashtables.c
    xprtrdma: fix incorrect header size calculations
  * usb: gadget: u_ether: fix regression in setting fixed MAC address
      drivers/usb/gadget/function/u_ether.c
    s390/mm: use non-quiescing sske for KVM switch to keyed guest
    powerpc/mm: Switch obsolete dssall to .long
    RISC-V: fix barrier() use in <vdso/processor.h>
    net: openvswitch: fix leak of nested actions
    net: openvswitch: fix misuse of the cached connection on tuple changes
    virtio-pci: Remove wrong address verification in vp_del_vqs()
  * ext4: add reserved GDT blocks check
      fs/ext4/resize.c
  * ext4: make variable "count" signed
      fs/ext4/namei.c
  * ext4: fix bug_on ext4_mb_use_inode_pa
      fs/ext4/mballoc.c
    serial: 8250: Store to lsr_save_flags after lsr read
    usb: gadget: lpc32xx_udc: Fix refcount leak in lpc32xx_udc_probe
    usb: dwc2: Fix memory leak in dwc2_hcd_init
    USB: serial: io_ti: add Agilent E5805A support
    USB: serial: option: add support for Cinterion MV31 with new baseline
    comedi: vmk80xx: fix expression for tx buffer size
  * irqchip/gic-v3: Fix refcount leak in gic_populate_ppi_partitions
      drivers/irqchip/irq-gic-v3.c
    irqchip/gic/realview: Fix refcount leak in realview_gic_of_init
    faddr2line: Fix overlapping text section failures, the sequel
    certs/blacklist_hashes.c: fix const confusion in certs blacklist
    arm64: ftrace: fix branch range checks
    net: bgmac: Fix an erroneous kfree() in bgmac_remove()
    mlxsw: spectrum_cnt: Reorder counter pools
    misc: atmel-ssc: Fix IRQ check in ssc_probe
    tty: goldfish: Fix free_irq() on remove
    i40e: Fix call trace in setup_tx_descriptors
    i40e: Fix adding ADQ filter to TC0
    pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
  * random: credit cpu and bootloader seeds by default
      drivers/char/Kconfig
    net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag
  * ipv6: Fix signed integer overflow in l2tp_ip6_sendmsg
      net/l2tp/l2tp_ip6.c
    nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
    virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed
    scsi: pmcraid: Fix missing resource cleanup in error case
    scsi: ipr: Fix missing/incorrect resource cleanup in error case
    scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology
    scsi: vmw_pvscsi: Expand vcpuHint to 16 bits
  * ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put()
      sound/soc/codecs/wm_adsp.c
    ASoC: es8328: Fix event generation for deemphasis control
    ASoC: wm8962: Fix suspend while playing music
    ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
    ASoC: cs42l56: Correct typo in minimum level for SX volume controls
    ASoC: cs42l52: Correct TLV for Bypass Volume
    ASoC: cs53l30: Correct number of volume levels on SX controls
    ASoC: cs42l52: Fix TLV scales for mixer controls
    powerpc/kasan: Silence KASAN warnings in __get_wchan()
  * random: account for arch randomness in bits
      drivers/char/random.c
  * random: mark bootloader randomness code as __init
      drivers/char/random.c
      include/linux/random.h
  * random: avoid checking crng_ready() twice in random_init()
      drivers/char/random.c
  * crypto: drbg - make reseeding from get_random_bytes() synchronous
      crypto/drbg.c
      drivers/char/random.c
      include/crypto/drbg.h
  * crypto: drbg - always try to free Jitter RNG instance
      crypto/drbg.c
  * crypto: drbg - move dynamic ->reseed_threshold adjustments to __drbg_seed()
      crypto/drbg.c
  * crypto: drbg - track whether DRBG was seeded with !rng_is_initialized()
      crypto/drbg.c
      include/crypto/drbg.h
  * crypto: drbg - prepare for more fine-grained tracking of seeding state
      crypto/drbg.c
      include/crypto/drbg.h
  * crypto: drbg - always seeded with SP800-90B compliant noise source
      crypto/drbg.c
      include/crypto/drbg.h
  * crypto: drbg - add FIPS 140-2 CTRNG for noise source
      crypto/drbg.c
      include/crypto/drbg.h
  * Revert "random: use static branch for crng_ready()"
      drivers/char/random.c
  * random: check for signals after page of pool writes
      drivers/char/random.c
  * random: wire up fops->splice_{read,write}_iter()
      drivers/char/random.c
  * random: convert to using fops->write_iter()
      drivers/char/random.c
  * random: move randomize_page() into mm where it belongs
      drivers/char/random.c
      include/linux/mm.h
      include/linux/random.h
      mm/util.c
  * random: move initialization functions out of hot pages
      drivers/char/random.c
  * random: use proper return types on get_random_{int,long}_wait()
      drivers/char/random.c
      include/linux/random.h
  * random: remove extern from functions in header
      include/linux/random.h
  * random: use static branch for crng_ready()
      drivers/char/random.c
  * random: credit architectural init the exact amount
      drivers/char/random.c
  * random: handle latent entropy and command line from random_init()
      drivers/char/random.c
      include/linux/random.h
      init/main.c
  * random: use proper jiffies comparison macro
      drivers/char/random.c
  * random: remove ratelimiting for in-kernel unseeded randomness
      drivers/char/random.c
      lib/Kconfig.debug
  * random: avoid initializing twice in credit race
      drivers/char/random.c
  * random: use symbolic constants for crng_init states
      drivers/char/random.c
  * siphash: use one source of truth for siphash permutations
      drivers/char/random.c
      include/linux/prandom.h
      include/linux/siphash.h
      lib/siphash.c
  * random: help compiler out with fast_mix() by using simpler arguments
      drivers/char/random.c
  * random: do not use input pool from hard IRQs
      drivers/char/random.c
  * random: order timer entropy functions below interrupt functions
      drivers/char/random.c
  * random: do not pretend to handle premature next security model
      drivers/char/random.c
  * random: do not use batches when !crng_ready()
      drivers/char/random.c
  * random: insist on random_get_entropy() existing in order to simplify
      drivers/char/random.c
    xtensa: use fallback for random_get_entropy() instead of zero
    sparc: use fallback for random_get_entropy() instead of zero
    um: use fallback for random_get_entropy() instead of zero
    x86/tsc: Use fallback for random_get_entropy() instead of zero
    nios2: use fallback for random_get_entropy() instead of zero
    arm: use fallback for random_get_entropy() instead of zero
    mips: use fallback for random_get_entropy() instead of just c0 random
    m68k: use fallback for random_get_entropy() instead of zero
  * timekeeping: Add raw clock fallback for random_get_entropy()
      include/linux/timex.h
      kernel/time/timekeeping.c
    powerpc: define get_cycles macro for arch-override
    alpha: define get_cycles macro for arch-override
    parisc: define get_cycles macro for arch-override
    s390: define get_cycles macro for arch-override
    ia64: define get_cycles macro for arch-override
  * init: call time_init() before rand_initialize()
      init/main.c
    random: fix sysctl documentation nits
  * random: document crng_fast_key_erasure() destination possibility
      drivers/char/random.c
  * random: make random_get_entropy() return an unsigned long
      drivers/char/random.c
      include/linux/timex.h
  * random: check for signals every PAGE_SIZE chunk of /dev/[u]random
      drivers/char/random.c
  * random: check for signal_pending() outside of need_resched() check
      drivers/char/random.c
  * random: do not allow user to keep crng key around on stack
      drivers/char/random.c
  * random: do not split fast init input in add_hwgenerator_randomness()
      drivers/char/random.c
  * random: mix build-time latent entropy into pool at init
      drivers/char/random.c
  * random: re-add removed comment about get_random_{u32,u64} reseeding
      drivers/char/random.c
  * random: treat bootloader trust toggle the same way as cpu trust toggle
      drivers/char/Kconfig
      drivers/char/random.c
  * random: skip fast_init if hwrng provides large chunk of entropy
      drivers/char/random.c
  * random: check for signal and try earlier when generating entropy
      drivers/char/random.c
  * random: reseed more often immediately after booting
      drivers/char/random.c
  * random: make consistent usage of crng_ready()
      drivers/char/random.c
  * random: use SipHash as interrupt entropy accumulator
      drivers/char/random.c
  * random: replace custom notifier chain with standard one
      crypto/drbg.c
      drivers/char/random.c
      include/crypto/drbg.h
      include/linux/random.h
      lib/random32.c
      lib/vsprintf.c
  * random: don't let 644 read-only sysctls be written to
      drivers/char/random.c
  * random: give sysctl_random_min_urandom_seed a more sensible value
      drivers/char/random.c
  * random: do crng pre-init loading in worker rather than irq
      drivers/char/random.c
  * random: unify cycles_t and jiffies usage and types
      drivers/char/random.c
  * random: cleanup UUID handling
      drivers/char/random.c
  * random: only wake up writers after zap if threshold was passed
      drivers/char/random.c
  * random: round-robin registers as ulong, not u32
      drivers/char/random.c
  * random: clear fast pool, crng, and batches in cpuhp bring up
      drivers/char/random.c
      include/linux/cpuhotplug.h
      include/linux/random.h
      kernel/cpu.c
  * random: pull add_hwgenerator_randomness() declaration into random.h
      drivers/char/hw_random/core.c
      include/linux/hw_random.h
      include/linux/random.h
  * random: check for crng_init == 0 in add_device_randomness()
      drivers/char/random.c
  * random: unify early init crng load accounting
      drivers/char/random.c
  * random: do not take pool spinlock at boot
      drivers/char/random.c
  * random: defer fast pool mixing to worker
      drivers/char/random.c
  * random: rewrite header introductory comment
      drivers/char/random.c
  * random: group sysctl functions
      drivers/char/random.c
  * random: group userspace read/write functions
      drivers/char/random.c
  * random: group entropy collection functions
      drivers/char/random.c
  * random: group entropy extraction functions
      drivers/char/random.c
  * random: group initialization wait functions
      drivers/char/random.c
  * random: remove whitespace and reorder includes
      drivers/char/random.c
  * random: remove useless header comment
      include/linux/random.h
  * random: introduce drain_entropy() helper to declutter crng_reseed()
      drivers/char/random.c
  * random: deobfuscate irq u32/u64 contributions
      drivers/char/random.c
  * random: add proper SPDX header
      drivers/char/random.c
  * random: remove unused tracepoints
      drivers/char/random.c
      lib/random32.c
  * random: remove ifdef'd out interrupt bench
      drivers/char/random.c
  * random: tie batched entropy generation to base_crng generation
      drivers/char/random.c
  * random: zero buffer after reading entropy from userspace
      drivers/char/random.c
  * random: remove outdated INT_MAX >> 6 check in urandom_read()
      drivers/char/random.c
  * random: use hash function for crng_slow_load()
      drivers/char/random.c
      include/linux/hw_random.h
      include/linux/random.h
  * random: absorb fast pool into input pool after fast load
      drivers/char/random.c
  * random: do not xor RDRAND when writing into /dev/random
      drivers/char/random.c
  * random: ensure early RDSEED goes through mixer on init
      drivers/char/random.c
  * random: inline leaves of rand_initialize()
      drivers/char/random.c
  * random: use RDSEED instead of RDRAND in entropy extraction
      drivers/char/random.c
  * random: fix locking in crng_fast_load()
      drivers/char/random.c
  * random: remove batched entropy locking
      drivers/char/random.c
  * random: remove use_input_pool parameter from crng_reseed()
      drivers/char/random.c
  * random: make credit_entropy_bits() always safe
      drivers/char/random.c
  * random: always wake up entropy writers after extraction
      drivers/char/random.c
  * random: use linear min-entropy accumulation crediting
      drivers/char/random.c
  * random: simplify entropy debiting
      drivers/char/random.c
  * random: use computational hash for entropy extraction
      drivers/char/random.c
  * random: only call crng_finalize_init() for primary_crng
      drivers/char/random.c
  * random: access primary_pool directly rather than through pointer
      drivers/char/random.c
  * random: continually use hwgenerator randomness
      drivers/char/random.c
  * random: simplify arithmetic function flow in account()
      drivers/char/random.c
  * random: access input_pool_data directly rather than through pointer
      drivers/char/random.c
  * random: cleanup fractional entropy shift constants
      drivers/char/random.c
  * random: prepend remaining pool constants with POOL_
      drivers/char/random.c
  * random: de-duplicate INPUT_POOL constants
      drivers/char/random.c
  * random: remove unused OUTPUT_POOL constants
      drivers/char/random.c
  * random: rather than entropy_store abstraction, use global
      drivers/char/random.c
  * random: remove unused extract_entropy() reserved argument
      drivers/char/random.c
  * random: remove incomplete last_data logic
      drivers/char/random.c
  * random: cleanup integer types
      drivers/char/random.c
  * random: cleanup poolinfo abstraction
      drivers/char/random.c
  * random: fix typo in comments
      drivers/char/random.c
  * random: don't reset crng_init_cnt on urandom_read()
      drivers/char/random.c
  * random: avoid superfluous call to RDRAND in CRNG extraction
      drivers/char/random.c
  * random: early initialization of ChaCha constants
      drivers/char/random.c
  * random: initialize ChaCha20 constants with correct endianness
      drivers/char/random.c
  * random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs
      drivers/char/random.c
  * random: harmonize "crng init done" messages
      drivers/char/random.c
  * random: mix bootloader randomness into pool
      drivers/char/random.c
  * random: do not re-init if crng_reseed completes before primary init
      drivers/char/random.c
  * random: do not sign extend bytes for rotation when mixing
      drivers/char/random.c
  * random: use BLAKE2s instead of SHA1 in extraction
      drivers/char/random.c
  * random: remove unused irq_flags argument from add_interrupt_randomness()
      drivers/char/random.c
      include/linux/random.h
      kernel/irq/handle.c
  * random: document add_hwgenerator_randomness() with other input functions
      drivers/char/random.c
  * crypto: blake2s - adjust include guard naming
      include/crypto/blake2s.h
      include/crypto/internal/blake2s.h
  * crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
      include/crypto/blake2s.h
    MAINTAINERS: co-maintain random.c
  * random: remove dead code left over from blocking pool
      drivers/char/random.c
  * random: avoid arch_get_random_seed_long() when collecting IRQ randomness
      drivers/char/random.c
  * random: add arch_get_random_*long_early()
      drivers/char/random.c
      include/linux/random.h
    powerpc: Use bool in archrandom.h
  * linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check
      include/linux/random.h
  * linux/random.h: Use false with bool
      include/linux/random.h
  * linux/random.h: Remove arch_has_random, arch_has_random_seed
      include/linux/random.h
    s390: Remove arch_has_random, arch_has_random_seed
    powerpc: Remove arch_has_random, arch_has_random_seed
    x86: Remove arch_has_random, arch_has_random_seed
  * random: avoid warnings for !CONFIG_NUMA builds
      drivers/char/random.c
  * random: split primary/secondary crng init paths
      drivers/char/random.c
  * random: remove some dead code of poolinfo
      drivers/char/random.c
  * random: fix typo in add_timer_randomness()
      drivers/char/random.c
  * random: Add and use pr_fmt()
      drivers/char/random.c
  * random: convert to ENTROPY_BITS for better code readability
      drivers/char/random.c
  * random: remove unnecessary unlikely()
      drivers/char/random.c
  * random: remove kernel.random.read_wakeup_threshold
      drivers/char/random.c
  * random: delete code to pull data into pools
      drivers/char/random.c
  * random: remove the blocking pool
      drivers/char/random.c
  * random: fix crash on multiple early calls to add_bootloader_randomness()
      drivers/char/random.c
  * char/random: silence a lockdep splat with printk()
      drivers/char/random.c
  * random: make /dev/random be almost like /dev/urandom
      drivers/char/random.c
  * random: ignore GRND_RANDOM in getentropy(2)
      drivers/char/random.c
      include/uapi/linux/random.h
  * random: add GRND_INSECURE to return best-effort non-cryptographic bytes
      drivers/char/random.c
      include/uapi/linux/random.h
  * random: Add a urandom_read_nowait() for random APIs that don't warn
      drivers/char/random.c
  * random: Don't wake crng_init_wait when crng_init == 1
      drivers/char/random.c
  * lib/crypto: sha1: re-roll loops to reduce code size
      lib/sha1.c
  * lib/crypto: blake2s: move hmac construction into wireguard
      include/crypto/blake2s.h
      lib/crypto/blake2s.c
  * crypto: blake2s - generic C library implementation and selftest
      include/crypto/blake2s.h
      include/crypto/internal/blake2s.h
      lib/Makefile
      lib/crypto/Makefile
      lib/crypto/blake2s-generic.c
      lib/crypto/blake2s.c
  * Revert "hwrng: core - Freeze khwrng thread during suspend"
      drivers/char/random.c
  * char/random: Add a newline at the end of the file
      drivers/char/random.c
  * random: Use wait_event_freezable() in add_hwgenerator_randomness()
      drivers/char/random.c
  * fdt: add support for rng-seed
      drivers/char/Kconfig
      drivers/char/random.c
      drivers/of/fdt.c
      include/linux/random.h
  * random: Support freezable kthreads in add_hwgenerator_randomness()
      drivers/char/random.c
  * random: fix soft lockup when trying to read from an uninitialized blocking pool
      drivers/char/random.c
  * latent_entropy: avoid build error when plugin cflags are not set
      include/linux/random.h
  * random: document get_random_int() family
      drivers/char/random.c
  * random: move rand_initialize() earlier
      drivers/char/random.c
      include/linux/random.h
      init/main.c
  * random: only read from /dev/random after its pool has received 128 bits
      drivers/char/random.c
  * drivers/char/random.c: make primary_crng static
      drivers/char/random.c
  * drivers/char/random.c: remove unused stuct poolinfo::poolbits
      drivers/char/random.c
  * drivers/char/random.c: constify poolinfo_table
      drivers/char/random.c
    9p: missing chunk of "fs/9p: Don't update file type when updating file attributes"

Bug: 240880948
Change-Id: I46de87f5e1ff2146dbc394d88275d609ee871bc1
Signed-off-by: Lucas Wei <lucaswei@google.com>
2022-08-09 10:46:08 +08:00
Greg Kroah-Hartman
25e813ddc6 Merge 4.19.249 into android-4.19-stable
Changes in 4.19.249
	9p: missing chunk of "fs/9p: Don't update file type when updating file attributes"
	drivers/char/random.c: constify poolinfo_table
	drivers/char/random.c: remove unused stuct poolinfo::poolbits
	drivers/char/random.c: make primary_crng static
	random: only read from /dev/random after its pool has received 128 bits
	random: move rand_initialize() earlier
	random: document get_random_int() family
	latent_entropy: avoid build error when plugin cflags are not set
	random: fix soft lockup when trying to read from an uninitialized blocking pool
	random: Support freezable kthreads in add_hwgenerator_randomness()
	fdt: add support for rng-seed
	random: Use wait_event_freezable() in add_hwgenerator_randomness()
	char/random: Add a newline at the end of the file
	Revert "hwrng: core - Freeze khwrng thread during suspend"
	crypto: blake2s - generic C library implementation and selftest
	lib/crypto: blake2s: move hmac construction into wireguard
	lib/crypto: sha1: re-roll loops to reduce code size
	random: Don't wake crng_init_wait when crng_init == 1
	random: Add a urandom_read_nowait() for random APIs that don't warn
	random: add GRND_INSECURE to return best-effort non-cryptographic bytes
	random: ignore GRND_RANDOM in getentropy(2)
	random: make /dev/random be almost like /dev/urandom
	char/random: silence a lockdep splat with printk()
	random: fix crash on multiple early calls to add_bootloader_randomness()
	random: remove the blocking pool
	random: delete code to pull data into pools
	random: remove kernel.random.read_wakeup_threshold
	random: remove unnecessary unlikely()
	random: convert to ENTROPY_BITS for better code readability
	random: Add and use pr_fmt()
	random: fix typo in add_timer_randomness()
	random: remove some dead code of poolinfo
	random: split primary/secondary crng init paths
	random: avoid warnings for !CONFIG_NUMA builds
	x86: Remove arch_has_random, arch_has_random_seed
	powerpc: Remove arch_has_random, arch_has_random_seed
	s390: Remove arch_has_random, arch_has_random_seed
	linux/random.h: Remove arch_has_random, arch_has_random_seed
	linux/random.h: Use false with bool
	linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check
	powerpc: Use bool in archrandom.h
	random: add arch_get_random_*long_early()
	random: avoid arch_get_random_seed_long() when collecting IRQ randomness
	random: remove dead code left over from blocking pool
	MAINTAINERS: co-maintain random.c
	crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
	crypto: blake2s - adjust include guard naming
	random: document add_hwgenerator_randomness() with other input functions
	random: remove unused irq_flags argument from add_interrupt_randomness()
	random: use BLAKE2s instead of SHA1 in extraction
	random: do not sign extend bytes for rotation when mixing
	random: do not re-init if crng_reseed completes before primary init
	random: mix bootloader randomness into pool
	random: harmonize "crng init done" messages
	random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs
	random: initialize ChaCha20 constants with correct endianness
	random: early initialization of ChaCha constants
	random: avoid superfluous call to RDRAND in CRNG extraction
	random: don't reset crng_init_cnt on urandom_read()
	random: fix typo in comments
	random: cleanup poolinfo abstraction
	random: cleanup integer types
	random: remove incomplete last_data logic
	random: remove unused extract_entropy() reserved argument
	random: rather than entropy_store abstraction, use global
	random: remove unused OUTPUT_POOL constants
	random: de-duplicate INPUT_POOL constants
	random: prepend remaining pool constants with POOL_
	random: cleanup fractional entropy shift constants
	random: access input_pool_data directly rather than through pointer
	random: simplify arithmetic function flow in account()
	random: continually use hwgenerator randomness
	random: access primary_pool directly rather than through pointer
	random: only call crng_finalize_init() for primary_crng
	random: use computational hash for entropy extraction
	random: simplify entropy debiting
	random: use linear min-entropy accumulation crediting
	random: always wake up entropy writers after extraction
	random: make credit_entropy_bits() always safe
	random: remove use_input_pool parameter from crng_reseed()
	random: remove batched entropy locking
	random: fix locking in crng_fast_load()
	random: use RDSEED instead of RDRAND in entropy extraction
	random: inline leaves of rand_initialize()
	random: ensure early RDSEED goes through mixer on init
	random: do not xor RDRAND when writing into /dev/random
	random: absorb fast pool into input pool after fast load
	random: use hash function for crng_slow_load()
	random: remove outdated INT_MAX >> 6 check in urandom_read()
	random: zero buffer after reading entropy from userspace
	random: tie batched entropy generation to base_crng generation
	random: remove ifdef'd out interrupt bench
	random: remove unused tracepoints
	random: add proper SPDX header
	random: deobfuscate irq u32/u64 contributions
	random: introduce drain_entropy() helper to declutter crng_reseed()
	random: remove useless header comment
	random: remove whitespace and reorder includes
	random: group initialization wait functions
	random: group entropy extraction functions
	random: group entropy collection functions
	random: group userspace read/write functions
	random: group sysctl functions
	random: rewrite header introductory comment
	random: defer fast pool mixing to worker
	random: do not take pool spinlock at boot
	random: unify early init crng load accounting
	random: check for crng_init == 0 in add_device_randomness()
	random: pull add_hwgenerator_randomness() declaration into random.h
	random: clear fast pool, crng, and batches in cpuhp bring up
	random: round-robin registers as ulong, not u32
	random: only wake up writers after zap if threshold was passed
	random: cleanup UUID handling
	random: unify cycles_t and jiffies usage and types
	random: do crng pre-init loading in worker rather than irq
	random: give sysctl_random_min_urandom_seed a more sensible value
	random: don't let 644 read-only sysctls be written to
	random: replace custom notifier chain with standard one
	random: use SipHash as interrupt entropy accumulator
	random: make consistent usage of crng_ready()
	random: reseed more often immediately after booting
	random: check for signal and try earlier when generating entropy
	random: skip fast_init if hwrng provides large chunk of entropy
	random: treat bootloader trust toggle the same way as cpu trust toggle
	random: re-add removed comment about get_random_{u32,u64} reseeding
	random: mix build-time latent entropy into pool at init
	random: do not split fast init input in add_hwgenerator_randomness()
	random: do not allow user to keep crng key around on stack
	random: check for signal_pending() outside of need_resched() check
	random: check for signals every PAGE_SIZE chunk of /dev/[u]random
	random: make random_get_entropy() return an unsigned long
	random: document crng_fast_key_erasure() destination possibility
	random: fix sysctl documentation nits
	init: call time_init() before rand_initialize()
	ia64: define get_cycles macro for arch-override
	s390: define get_cycles macro for arch-override
	parisc: define get_cycles macro for arch-override
	alpha: define get_cycles macro for arch-override
	powerpc: define get_cycles macro for arch-override
	timekeeping: Add raw clock fallback for random_get_entropy()
	m68k: use fallback for random_get_entropy() instead of zero
	mips: use fallback for random_get_entropy() instead of just c0 random
	arm: use fallback for random_get_entropy() instead of zero
	nios2: use fallback for random_get_entropy() instead of zero
	x86/tsc: Use fallback for random_get_entropy() instead of zero
	um: use fallback for random_get_entropy() instead of zero
	sparc: use fallback for random_get_entropy() instead of zero
	xtensa: use fallback for random_get_entropy() instead of zero
	random: insist on random_get_entropy() existing in order to simplify
	random: do not use batches when !crng_ready()
	random: do not pretend to handle premature next security model
	random: order timer entropy functions below interrupt functions
	random: do not use input pool from hard IRQs
	random: help compiler out with fast_mix() by using simpler arguments
	siphash: use one source of truth for siphash permutations
	random: use symbolic constants for crng_init states
	random: avoid initializing twice in credit race
	random: remove ratelimiting for in-kernel unseeded randomness
	random: use proper jiffies comparison macro
	random: handle latent entropy and command line from random_init()
	random: credit architectural init the exact amount
	random: use static branch for crng_ready()
	random: remove extern from functions in header
	random: use proper return types on get_random_{int,long}_wait()
	random: move initialization functions out of hot pages
	random: move randomize_page() into mm where it belongs
	random: convert to using fops->write_iter()
	random: wire up fops->splice_{read,write}_iter()
	random: check for signals after page of pool writes
	Revert "random: use static branch for crng_ready()"
	crypto: drbg - add FIPS 140-2 CTRNG for noise source
	crypto: drbg - always seeded with SP800-90B compliant noise source
	crypto: drbg - prepare for more fine-grained tracking of seeding state
	crypto: drbg - track whether DRBG was seeded with !rng_is_initialized()
	crypto: drbg - move dynamic ->reseed_threshold adjustments to __drbg_seed()
	crypto: drbg - always try to free Jitter RNG instance
	crypto: drbg - make reseeding from get_random_bytes() synchronous
	random: avoid checking crng_ready() twice in random_init()
	random: mark bootloader randomness code as __init
	random: account for arch randomness in bits
	powerpc/kasan: Silence KASAN warnings in __get_wchan()
	ASoC: cs42l52: Fix TLV scales for mixer controls
	ASoC: cs53l30: Correct number of volume levels on SX controls
	ASoC: cs42l52: Correct TLV for Bypass Volume
	ASoC: cs42l56: Correct typo in minimum level for SX volume controls
	ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
	ASoC: wm8962: Fix suspend while playing music
	ASoC: es8328: Fix event generation for deemphasis control
	ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put()
	scsi: vmw_pvscsi: Expand vcpuHint to 16 bits
	scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology
	scsi: ipr: Fix missing/incorrect resource cleanup in error case
	scsi: pmcraid: Fix missing resource cleanup in error case
	virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed
	nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
	ipv6: Fix signed integer overflow in l2tp_ip6_sendmsg
	net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag
	random: credit cpu and bootloader seeds by default
	pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
	i40e: Fix adding ADQ filter to TC0
	i40e: Fix call trace in setup_tx_descriptors
	tty: goldfish: Fix free_irq() on remove
	misc: atmel-ssc: Fix IRQ check in ssc_probe
	mlxsw: spectrum_cnt: Reorder counter pools
	net: bgmac: Fix an erroneous kfree() in bgmac_remove()
	arm64: ftrace: fix branch range checks
	certs/blacklist_hashes.c: fix const confusion in certs blacklist
	faddr2line: Fix overlapping text section failures, the sequel
	irqchip/gic/realview: Fix refcount leak in realview_gic_of_init
	irqchip/gic-v3: Fix refcount leak in gic_populate_ppi_partitions
	comedi: vmk80xx: fix expression for tx buffer size
	USB: serial: option: add support for Cinterion MV31 with new baseline
	USB: serial: io_ti: add Agilent E5805A support
	usb: dwc2: Fix memory leak in dwc2_hcd_init
	usb: gadget: lpc32xx_udc: Fix refcount leak in lpc32xx_udc_probe
	serial: 8250: Store to lsr_save_flags after lsr read
	ext4: fix bug_on ext4_mb_use_inode_pa
	ext4: make variable "count" signed
	ext4: add reserved GDT blocks check
	virtio-pci: Remove wrong address verification in vp_del_vqs()
	net: openvswitch: fix misuse of the cached connection on tuple changes
	net: openvswitch: fix leak of nested actions
	RISC-V: fix barrier() use in <vdso/processor.h>
	powerpc/mm: Switch obsolete dssall to .long
	s390/mm: use non-quiescing sske for KVM switch to keyed guest
	usb: gadget: u_ether: fix regression in setting fixed MAC address
	xprtrdma: fix incorrect header size calculations
	tcp: add some entropy in __inet_hash_connect()
	tcp: use different parts of the port_offset for index and offset
	tcp: add small random increments to the source port
	tcp: dynamically allocate the perturb table used by source ports
	tcp: increase source port perturb table to 2^16
	tcp: drop the hash_32() part from the index calculation
	Revert "hwmon: Make chip parameter for with_info API mandatory"
	Linux 4.19.249

Merge resolution notes:
  - Dropped the changes that added an LTS-specific backport of the
    blake2s library, since this branch already has a newer version of
    the blake2s library.

  - Added CHACHA20_KEY_SIZE and CHACHA20_BLOCK_SIZE constants to
    chacha.h, to minimize changes from the 4.19 LTS version of random.c

  - Retain a fix to the rng-seed support in drivers/of/fdt.c that this
    branch and 4.19.250 have, but 4.19.249 doesn't have.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If9d9e3168f0976f61ae1ab9b36c063558a7f6ebf
2022-07-07 21:13:57 +02:00
Jason A. Donenfeld
107101e75a UPSTREAM: lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI
blake2s_compress_generic is weakly aliased by blake2s_compress. The
current harness for function selection uses a function pointer, which is
ordinarily inlined and resolved at compile time. But when Clang's CFI is
enabled, CFI still triggers when making an indirect call via a weak
symbol. This seems like a bug in Clang's CFI, as though it's bucketing
weak symbols and strong symbols differently. It also only seems to
trigger when "full LTO" mode is used, rather than "thin LTO".

[    0.000000][    T0] Kernel panic - not syncing: CFI failure (target: blake2s_compress_generic+0x0/0x1444)
[    0.000000][    T0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.16.0-mainline-06981-g076c855b846e #1
[    0.000000][    T0] Hardware name: MT6873 (DT)
[    0.000000][    T0] Call trace:
[    0.000000][    T0]  dump_backtrace+0xfc/0x1dc
[    0.000000][    T0]  dump_stack_lvl+0xa8/0x11c
[    0.000000][    T0]  panic+0x194/0x464
[    0.000000][    T0]  __cfi_check_fail+0x54/0x58
[    0.000000][    T0]  __cfi_slowpath_diag+0x354/0x4b0
[    0.000000][    T0]  blake2s_update+0x14c/0x178
[    0.000000][    T0]  _extract_entropy+0xf4/0x29c
[    0.000000][    T0]  crng_initialize_primary+0x24/0x94
[    0.000000][    T0]  rand_initialize+0x2c/0x6c
[    0.000000][    T0]  start_kernel+0x2f8/0x65c
[    0.000000][    T0]  __primary_switched+0xc4/0x7be4
[    0.000000][    T0] Rebooting in 5 seconds..

Nonetheless, the function pointer method isn't so terrific anyway, so
this patch replaces it with a simple boolean, which also gets inlined
away. This successfully works around the Clang bug.

In general, I'm not too keen on all of the indirection involved here; it
clearly does more harm than good. Hopefully the whole thing can get
cleaned up down the road when lib/crypto is overhauled more
comprehensively. But for now, we go with a simple bandaid.

Fixes: 6048fdcc5f26 ("lib/crypto: blake2s: include as built-in")
Link: https://github.com/ClangBuiltLinux/linux/issues/1567
Reported-by: Miles Chen <miles.chen@mediatek.com>
Tested-by: Miles Chen <miles.chen@mediatek.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

(cherry picked from commit d2a02e3c8bb6b347818518edff5a4b40ff52d6d8)
Change-Id: I3a6461e3f05f57cd898f8a4f46e73fb0214037ef
Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-07-07 17:14:19 +00:00
Jason A. Donenfeld
c9ff7eb7e9 BACKPORT: lib/crypto: blake2s: include as built-in
In preparation for using blake2s in the RNG, we change the way that it
is wired-in to the build system. Instead of using ifdefs to select the
right symbol, we use weak symbols. And because ARM doesn't need the
generic implementation, we make the generic one default only if an arch
library doesn't need it already, and then have arch libraries that do
need it opt-in. So that the arch libraries can remain tristate rather
than bool, we then split the shash part from the glue code.

Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

(cherry picked from commit 6048fdcc5f269c7f31d774c295ce59081b36e6f9)

Conflicts:
	arch/x86/crypto/Makefile
	arch/x86/crypto/blake2s-glue.c
	lib/crypto/Kconfig

Change-Id: I6861048dfd30aba6fbab8c5543e852e4edca300e
Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-07-07 17:14:19 +00:00
Arnd Bergmann
0112cefd73 UPSTREAM: crypto: poly1305 - fix poly1305_core_setkey() declaration
gcc-11 points out a mismatch between the declaration and the definition
of poly1305_core_setkey():

lib/crypto/poly1305-donna32.c:13:67: error: argument 2 of type ‘const u8[16]’ {aka ‘const unsigned char[16]’} with mismatched bound [-Werror=array-parameter=]
   13 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 raw_key[16])
      |                                                          ~~~~~~~~~^~~~~~~~~~~
In file included from lib/crypto/poly1305-donna32.c:11:
include/crypto/internal/poly1305.h:21:68: note: previously declared as ‘const u8 *’ {aka ‘const unsigned char *’}
   21 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 *raw_key);

This is harmless in principle, as the calling conventions are the same,
but the more specific prototype allows better type checking in the
caller.

Change the declaration to match the actual function definition.
The poly1305_simd_init() is a bit suspicious here, as it previously
had a 32-byte argument type, but looks like it needs to take the
16-byte POLY1305_BLOCK_SIZE array instead.

Fixes: 1c08a104360f ("crypto: poly1305 - add new 32 and 64-bit generic versions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 8d195e7a8ada68928f2aedb2c18302a4518fe68e)
Change-Id: I41a75ab0b86449a77f9efc968544b93e21df90a9
Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-07-07 09:42:40 +00:00
Nicolai Stange
6276675530 crypto: drbg - make reseeding from get_random_bytes() synchronous
commit 074bcd4000e0d812bc253f86fedc40f81ed59ccc upstream.

get_random_bytes() usually hasn't full entropy available by the time DRBG
instances are first getting seeded from it during boot. Thus, the DRBG
implementation registers random_ready_callbacks which would in turn
schedule some work for reseeding the DRBGs once get_random_bytes() has
sufficient entropy available.

For reference, the relevant history around handling DRBG (re)seeding in
the context of a not yet fully seeded get_random_bytes() is:

  commit 16b369a91d ("random: Blocking API for accessing
                        nonblocking_pool")
  commit 4c7879907e ("crypto: drbg - add async seeding operation")

  commit 205a525c33 ("random: Add callback API for random pool
                        readiness")
  commit 57225e6797 ("crypto: drbg - Use callback API for random
                        readiness")
  commit c2719503f5 ("random: Remove kernel blocking API")

However, some time later, the initialization state of get_random_bytes()
has been made queryable via rng_is_initialized() introduced with commit
9a47249d44 ("random: Make crng state queryable"). This primitive now
allows for streamlining the DRBG reseeding from get_random_bytes() by
replacing that aforementioned asynchronous work scheduling from
random_ready_callbacks with some simpler, synchronous code in
drbg_generate() next to the related logic already present therein. Apart
from improving overall code readability, this change will also enable DRBG
users to rely on wait_for_random_bytes() for ensuring that the initial
seeding has completed, if desired.

The previous patches already laid the grounds by making drbg_seed() to
record at each DRBG instance whether it was being seeded at a time when
rng_is_initialized() still had been false as indicated by
->seeded == DRBG_SEED_STATE_PARTIAL.

All that remains to be done now is to make drbg_generate() check for this
condition, determine whether rng_is_initialized() has flipped to true in
the meanwhile and invoke a reseed from get_random_bytes() if so.

Make this move:
- rename the former drbg_async_seed() work handler, i.e. the one in charge
  of reseeding a DRBG instance from get_random_bytes(), to
  "drbg_seed_from_random()",
- change its signature as appropriate, i.e. make it take a struct
  drbg_state rather than a work_struct and change its return type from
  "void" to "int" in order to allow for passing error information from
  e.g. its __drbg_seed() invocation onwards to callers,
- make drbg_generate() invoke this drbg_seed_from_random() once it
  encounters a DRBG instance with ->seeded == DRBG_SEED_STATE_PARTIAL by
  the time rng_is_initialized() has flipped to true and
- prune everything related to the former, random_ready_callback based
  mechanism.

As drbg_seed_from_random() is now getting invoked from drbg_generate() with
the ->drbg_mutex being held, it must not attempt to recursively grab it
once again. Remove the corresponding mutex operations from what is now
drbg_seed_from_random(). Furthermore, as drbg_seed_from_random() can now
report errors directly to its caller, there's no need for it to temporarily
switch the DRBG's ->seeded state to DRBG_SEED_STATE_UNSEEDED so that a
failure of the subsequently invoked __drbg_seed() will get signaled to
drbg_generate(). Don't do it then.

Signed-off-by: Nicolai Stange <nstange@suse.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[Jason: for stable, undid the modifications for the backport of 5acd3548.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:13 +02:00
Nicolai Stange
bb117376f6 crypto: drbg - track whether DRBG was seeded with !rng_is_initialized()
commit 2bcd25443868aa8863779a6ebc6c9319633025d2 upstream.

Currently, the DRBG implementation schedules asynchronous works from
random_ready_callbacks for reseeding the DRBG instances with output from
get_random_bytes() once the latter has sufficient entropy available.

However, as the get_random_bytes() initialization state can get queried by
means of rng_is_initialized() now, there is no real need for this
asynchronous reseeding logic anymore and it's better to keep things simple
by doing it synchronously when needed instead, i.e. from drbg_generate()
once rng_is_initialized() has flipped to true.

Of course, for this to work, drbg_generate() would need some means by which
it can tell whether or not rng_is_initialized() has flipped to true since
the last seeding from get_random_bytes(). Or equivalently, whether or not
the last seed from get_random_bytes() has happened when
rng_is_initialized() was still evaluating to false.

As it currently stands, enum drbg_seed_state allows for the representation
of two different DRBG seeding states: DRBG_SEED_STATE_UNSEEDED and
DRBG_SEED_STATE_FULL. The former makes drbg_generate() to invoke a full
reseeding operation involving both, the rather expensive jitterentropy as
well as the get_random_bytes() randomness sources. The DRBG_SEED_STATE_FULL
state on the other hand implies that no reseeding at all is required for a
!->pr DRBG variant.

Introduce the new DRBG_SEED_STATE_PARTIAL state to enum drbg_seed_state for
representing the condition that a DRBG was being seeded when
rng_is_initialized() had still been false. In particular, this new state
implies that
- the given DRBG instance has been fully seeded from the jitterentropy
  source (if enabled)
- and drbg_generate() is supposed to reseed from get_random_bytes()
  *only* once rng_is_initialized() turns to true.

Up to now, the __drbg_seed() helper used to set the given DRBG instance's
->seeded state to constant DRBG_SEED_STATE_FULL. Introduce a new argument
allowing for the specification of the to be written ->seeded value instead.
Make the first of its two callers, drbg_seed(), determine the appropriate
value based on rng_is_initialized(). The remaining caller,
drbg_async_seed(), is known to get invoked only once rng_is_initialized()
is true, hence let it pass constant DRBG_SEED_STATE_FULL for the new
argument to __drbg_seed().

There is no change in behaviour, except for that the pr_devel() in
drbg_generate() would now report "unseeded" for ->pr DRBG instances which
had last been seeded when rng_is_initialized() was still evaluating to
false.

Signed-off-by: Nicolai Stange <nstange@suse.de>
Reviewed-by: Stephan Müller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:13 +02:00
Nicolai Stange
7612017d6b crypto: drbg - prepare for more fine-grained tracking of seeding state
commit ce8ce31b2c5c8b18667784b8c515650c65d57b4e upstream.

There are two different randomness sources the DRBGs are getting seeded
from, namely the jitterentropy source (if enabled) and get_random_bytes().
At initial DRBG seeding time during boot, the latter might not have
collected sufficient entropy for seeding itself yet and thus, the DRBG
implementation schedules a reseed work from a random_ready_callback once
that has happened. This is particularly important for the !->pr DRBG
instances, for which (almost) no further reseeds are getting triggered
during their lifetime.

Because collecting data from the jitterentropy source is a rather expensive
operation, the aforementioned asynchronously scheduled reseed work
restricts itself to get_random_bytes() only. That is, it in some sense
amends the initial DRBG seed derived from jitterentropy output at full
(estimated) entropy with fresh randomness obtained from get_random_bytes()
once that has been seeded with sufficient entropy itself.

With the advent of rng_is_initialized(), there is no real need for doing
the reseed operation from an asynchronously scheduled work anymore and a
subsequent patch will make it synchronous by moving it next to related
logic already present in drbg_generate().

However, for tracking whether a full reseed including the jitterentropy
source is required or a "partial" reseed involving only get_random_bytes()
would be sufficient already, the boolean struct drbg_state's ->seeded
member must become a tristate value.

Prepare for this by introducing the new enum drbg_seed_state and change
struct drbg_state's ->seeded member's type from bool to that type.

For facilitating review, enum drbg_seed_state is made to only contain
two members corresponding to the former ->seeded values of false and true
resp. at this point: DRBG_SEED_STATE_UNSEEDED and DRBG_SEED_STATE_FULL. A
third one for tracking the intermediate state of "seeded from jitterentropy
only" will be introduced with a subsequent patch.

There is no change in behaviour at this point.

Signed-off-by: Nicolai Stange <nstange@suse.de>
Reviewed-by: Stephan Müller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:13 +02:00
Stephan Müller
1f766964cc crypto: drbg - always seeded with SP800-90B compliant noise source
commit 97f2650e504033376e8813691cb6eccf73151676 upstream.

As the Jitter RNG provides an SP800-90B compliant noise source, use this
noise source always for the (re)seeding of the DRBG.

To make sure the DRBG is always properly seeded, the reseed threshold
is reduced to 1<<20 generate operations.

The Jitter RNG may report health test failures. Such health test
failures are treated as transient as follows. The DRBG will not reseed
from the Jitter RNG (but from get_random_bytes) in case of a health
test failure. Though, it produces the requested random number.

The Jitter RNG has a failure counter where at most 1024 consecutive
resets due to a health test failure are considered as a transient error.
If more consecutive resets are required, the Jitter RNG will return
a permanent error which is returned to the caller by the DRBG. With this
approach, the worst case reseed threshold is significantly lower than
mandated by SP800-90A in order to seed with an SP800-90B noise source:
the DRBG has a reseed threshold of 2^20 * 1024 = 2^30 generate requests.

Yet, in case of a transient Jitter RNG health test failure, the DRBG is
seeded with the data obtained from get_random_bytes.

However, if the Jitter RNG fails during the initial seeding operation
even due to a health test error, the DRBG will send an error to the
caller because at that time, the DRBG has received no seed that is
SP800-90B compliant.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:12 +02:00
Stephan Mueller
667b23513e crypto: drbg - add FIPS 140-2 CTRNG for noise source
commit db07cd26ac6a418dc2823187958edcfdb415fa83 upstream.

FIPS 140-2 section 4.9.2 requires a continuous self test of the noise
source. Up to kernel 4.8 drivers/char/random.c provided this continuous
self test. Afterwards it was moved to a location that is inconsistent
with the FIPS 140-2 requirements. The relevant patch was
e192be9d9a .

Thus, the FIPS 140-2 CTRNG is added to the DRBG when it obtains the
seed. This patch resurrects the function drbg_fips_continous_test that
existed some time ago and applies it to the noise sources. The patch
that removed the drbg_fips_continous_test was
b361476305 .

The Jitter RNG implements its own FIPS 140-2 self test and thus does not
need to be subjected to the test in the DRBG.

The patch contains a tiny fix to ensure proper zeroization in case of an
error during the Jitter RNG data gathering.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:12 +02:00
Jason A. Donenfeld
705ecf13e5 random: replace custom notifier chain with standard one
commit 5acd35487dc911541672b3ffc322851769c32a56 upstream.

We previously rolled our own randomness readiness notifier, which only
has two users in the whole kernel. Replace this with a more standard
atomic notifier block that serves the same purpose with less code. Also
unexport the symbols, because no modules use it, only unconditional
builtins. The only drawback is that it's possible for a notification
handler returning the "stop" code to prevent further processing, but
given that there are only two users, and that we're unexporting this
anyway, that doesn't seem like a significant drawback for the
simplification we receive here.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
[Jason: for stable, also backported to crypto/drbg.c, not unexporting.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:08 +02:00
Dominik Brodowski
fe98e903e9 random: early initialization of ChaCha constants
commit 96562f286884e2db89c74215b199a1084b5fb7f7 upstream.

Previously, the ChaCha constants for the primary pool were only
initialized in crng_initialize_primary(), called by rand_initialize().
However, some randomness is actually extracted from the primary pool
beforehand, e.g. by kmem_cache_create(). Therefore, statically
initialize the ChaCha constants for the primary pool.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: <linux-crypto@vger.kernel.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:02 +02:00
Eric Biggers
7ec9cf3a15 random: initialize ChaCha20 constants with correct endianness
commit a181e0fdb2164268274453b5b291589edbb9b22d upstream.

On big endian CPUs, the ChaCha20-based CRNG is using the wrong
endianness for the ChaCha20 constants.

This doesn't matter cryptographically, but technically it means it's not
ChaCha20 anymore.  Fix it to always use the standard constants.

Cc: linux-crypto@vger.kernel.org
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:02 +02:00
Eric Biggers
6a8e13abb7 crypto: blake2s - adjust include guard naming
commit 8786841bc2020f7f2513a6c74e64912f07b9c0dc upstream.

Use the full path in the include guards for the BLAKE2s headers to avoid
ambiguity and to match the convention for most files in include/crypto/.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:01 +02:00
Eric Biggers
b10d4c8501 crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
commit bbda6e0f1303953c855ee3669655a81b69fbe899 upstream.

Address the following checkpatch warning:

	WARNING: Use #include <linux/bug.h> instead of <asm/bug.h>

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:01 +02:00
Jason A. Donenfeld
c35093ff22 lib/crypto: blake2s: move hmac construction into wireguard
commit d8d83d8ab0a453e17e68b3a3bed1f940c34b8646 upstream.

Basically nobody should use blake2s in an HMAC construction; it already
has a keyed variant. But unfortunately for historical reasons, Noise,
used by WireGuard, uses HKDF quite strictly, which means we have to use
this. Because this really shouldn't be used by others, this commit moves
it into wireguard's noise.c locally, so that kernels that aren't using
WireGuard don't get this superfluous code baked in. On m68k systems,
this shaves off ~314 bytes.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
[Jason: for stable, skip the wireguard changes, since this kernel
 doesn't have wireguard.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:48:58 +02:00
Jason A. Donenfeld
5d51b96fe6 crypto: blake2s - generic C library implementation and selftest
commit 66d7fb94e4ffe5acc589e0b2b4710aecc1f07a28 upstream.

The C implementation was originally based on Samuel Neves' public
domain reference implementation but has since been heavily modified
for the kernel. We're able to do compile-time optimizations by moving
some scaffolding around the final function into the header file.

Information: https://blake2.net/

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
Co-developed-by: Samuel Neves <sneves@dei.uc.pt>
[ardb: - move from lib/zinc to lib/crypto
       - remove simd handling
       - rewrote selftest for better coverage
       - use fixed digest length for blake2s_hmac() and rename to
         blake2s256_hmac() ]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[Jason: for stable, skip kconfig and wire up directly, and skip the arch
 hooks; optimized implementations need not be backported.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:48:58 +02:00
Wilson Sung
5084fd58f3 Merge android-4.19-stable (4.19.215) into android-msm-pixel-4.19-lts
Merge 4.19.215 into android-4.19-stable
Linux 4.19.215
  * sctp: add vtag check in sctp_sf_ootb
      net/sctp/sm_statefuns.c
  * sctp: add vtag check in sctp_sf_do_8_5_1_E_sa
      net/sctp/sm_statefuns.c
  * sctp: add vtag check in sctp_sf_violation
      net/sctp/sm_statefuns.c
  * sctp: fix the processing for COOKIE_ECHO chunk
      net/sctp/sm_statefuns.c
  * sctp: use init_tag from inithdr for ABORT chunk
      net/sctp/sm_statefuns.c
    net: nxp: lpc_eth.c: avoid hang when bringing interface down
    net: ethernet: microchip: lan743x: Fix dma allocation failure by using dma_set_mask_and_coherent
    net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
    nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST
  * net: Prevent infinite while loop in skb_tx_hash()
      net/core/dev.c
    net: batman-adv: fix error handling
  * regmap: Fix possible double-free in regcache_rbtree_exit()
      drivers/base/regmap/regcache-rbtree.c
    arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node
    RDMA/mlx5: Set user priority for DCT
    net: lan78xx: fix division by zero in send path
    mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit
    mmc: sdhci: Map more voltage level to SDHCI_POWER_330
    mmc: dw_mmc: exynos: fix the finding clock sample value
    mmc: cqhci: clear HALT state after CQE enable
    mmc: vub300: fix control-message timeouts
  * ipv6: make exception cache less predictible
      net/ipv6/route.c
  * ipv6: use siphash in rt6_exception_hash()
      net/ipv6/route.c
  * ipv4: use siphash instead of Jenkins in fnhe_hashfun()
      net/ipv4/route.c
  * Revert "net: mdiobus: Fix memory leak in __mdiobus_register"
      drivers/net/phy/mdio_bus.c
    nfc: port100: fix using -ERRNO as command type mask
    ata: sata_mv: Fix the error handling of mv_chip_id()
  * usbnet: fix error return code in usbnet_probe()
      drivers/net/usb/usbnet.c
  * usbnet: sanity check for maxpacket
      drivers/net/usb/usbnet.c
    ARM: 8819/1: Remove '-p' from LDFLAGS
  * arm64: Avoid premature usercopy failure
      arch/arm64/lib/copy_from_user.S
      arch/arm64/lib/copy_in_user.S
      arch/arm64/lib/copy_to_user.S
    powerpc/bpf: Fix BPF_MOD when imm == 1
    ARM: 9141/1: only warn about XIP address when not compile testing
    ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype
    ARM: 9134/1: remove duplicate memcpy() definition
    ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned
    Merge 4.19.214 into android-4.19-stable
  * ANDROID: Incremental fs: Fix dentry get/put imbalance on vfs_mkdir() failure
      fs/incfs/vfs.c
Linux 4.19.214
    ARM: 9122/1: select HAVE_FUTEX_CMPXCHG
  * tracing: Have all levels of checks prevent recursion
      kernel/trace/trace.h
  * net: mdiobus: Fix memory leak in __mdiobus_register
      drivers/net/phy/mdio_bus.c
  * scsi: core: Fix shost->cmd_per_lun calculation in scsi_add_host_with_dma()
      drivers/scsi/hosts.c
    ALSA: hda: avoid write to STATESTS if controller is in reset
    platform/x86: intel_scu_ipc: Update timeout value in comment
    isdn: mISDN: Fix sleeping function called from invalid context
    ARM: dts: spear3xx: Fix gmac node
    net: stmmac: add support for dwmac 3.40a
    btrfs: deal with errors when checking if a dir entry exists during log replay
  * gcc-plugins/structleak: add makefile var for disabling structleak
      scripts/Makefile.gcc-plugins
  * netfilter: Kconfig: use 'default y' instead of 'm' for bool config option
      net/netfilter/Kconfig
    isdn: cpai: check ctr->cnr to avoid array index out of bound
    nfc: nci: fix the UAF of rf_conn_info object
  * mm, slub: fix mismatch between reconstructed freelist depth and cnt
      mm/slub.c
  * ASoC: DAPM: Fix missing kctl change notifications
      sound/soc/soc-dapm.c
    ALSA: hda/realtek: Add quirk for Clevo PC50HS
  * ALSA: usb-audio: Provide quirk for Sennheiser GSP670 Headset
      sound/usb/quirks-table.h
  * vfs: check fd has read access in kernel_read_file_from_fd()
      fs/exec.c
  * elfcore: correct reference to CONFIG_UML
      include/linux/elfcore.h
    ocfs2: mount fails with buffer overflow in strlen
    ocfs2: fix data corruption after conversion from inline format
    can: peak_pci: peak_pci_remove(): fix UAF
    can: peak_usb: pcan_usb_fd_decode_status(): fix back to ERROR_ACTIVE state notification
    can: rcar_can: fix suspend/resume
    net: hns3: disable sriov before unload hclge layer
    net: hns3: add limit ets dwrr bandwidth cannot be 0
    NIOS2: irqflags: rename a redefined register name
  * lan78xx: select CRC32
      drivers/net/usb/Kconfig
    netfilter: ipvs: make global sysctl readonly in non-init netns
    ASoC: wm8960: Fix clock configuration on slave mode
    dma-debug: fix sg checks in debug_dma_map_sg()
    NFSD: Keep existing listeners on portlist error
    xtensa: xtfpga: Try software restart before simulating CPU reset
    xtensa: xtfpga: use CONFIG_USE_OF instead of CONFIG_OF
    ARM: dts: at91: sama5d2_som1_ek: disable ISC node by default
    Merge 4.19.213 into android-4.19-stable
    UPSTREAM: crypto: arm/blake2s - fix for big endian
    ANDROID: gki_defconfig: enable BLAKE2b support
    BACKPORT: crypto: arm/blake2b - add NEON-accelerated BLAKE2b
    BACKPORT: crypto: blake2b - update file comment
  * BACKPORT: crypto: blake2b - sync with blake2s implementation
      include/crypto/blake2b.h
      include/crypto/internal/blake2b.h
  * UPSTREAM: wireguard: Kconfig: select CRYPTO_BLAKE2S_ARM
      drivers/net/Kconfig
    UPSTREAM: crypto: arm/blake2s - add ARM scalar optimized BLAKE2s
  * UPSTREAM: crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
      include/crypto/blake2s.h
  * UPSTREAM: crypto: blake2s - adjust include guard naming
      include/crypto/blake2s.h
      include/crypto/internal/blake2s.h
  * UPSTREAM: crypto: blake2s - add comment for blake2s_state fields
      include/crypto/blake2s.h
  * UPSTREAM: crypto: blake2s - optimize blake2s initialization
      include/crypto/blake2s.h
      include/crypto/internal/blake2s.h
  * BACKPORT: crypto: blake2s - share the "shash" API boilerplate code
      include/crypto/internal/blake2s.h
  * UPSTREAM: crypto: blake2s - move update and final logic to internal/blake2s.h
      include/crypto/internal/blake2s.h
    UPSTREAM: crypto: blake2s - remove unneeded includes
    UPSTREAM: crypto: x86/blake2s - define shash_alg structs using macros
    UPSTREAM: crypto: blake2s - define shash_alg structs using macros
  * UPSTREAM: crypto: lib/blake2s - Move selftest prototype into header file
      include/crypto/internal/blake2s.h
    UPSTREAM: crypto: blake2b - Fix clang optimization for ARMv7-M
    UPSTREAM: crypto: blake2b - rename tfm context and _setkey callback
    UPSTREAM: crypto: blake2b - merge _update to api callback
    UPSTREAM: crypto: blake2b - open code set last block helper
    UPSTREAM: crypto: blake2b - delete unused structs or members
    UPSTREAM: crypto: blake2b - simplify key init
    UPSTREAM: crypto: blake2b - merge blake2 init to api callback
    UPSTREAM: crypto: blake2b - merge _final implementation to callback
  * BACKPORT: crypto: testmgr - add test vectors for blake2b
      crypto/testmgr.c
  * BACKPORT: crypto: blake2b - add blake2b generic implementation
      crypto/Kconfig
      crypto/Makefile
Linux 4.19.213
  * r8152: select CRC32 and CRYPTO/CRYPTO_HASH/CRYPTO_SHA256
      drivers/net/usb/Kconfig
    qed: Fix missing error code in qed_slowpath_start()
    mqprio: Correct stats in mqprio_dump_class_stats().
    acpi/arm64: fix next_platform_timer() section mismatch error
    drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
    drm/msm/dsi: Fix an error code in msm_dsi_modeset_init()
    drm/msm: Fix null pointer dereference on pointer edp
    platform/mellanox: mlxreg-io: Fix argument base in kstrtou32() call
    pata_legacy: fix a couple uninitialized variable bugs
    NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
    NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
    nfc: fix error handling of nfc_proto_register()
    ethernet: s2io: fix setting mac address during resume
    net: encx24j600: check error in devm_regmap_init_encx24j600
  * net: korina: select CRC32
      drivers/net/ethernet/Kconfig
  * net: arc: select CRC32
      drivers/net/ethernet/arc/Kconfig
  * sctp: account stream padding length for reconf chunk
      net/sctp/sm_make_chunk.c
    iio: dac: ti-dac5571: fix an error code in probe()
    iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
    iio: ssp_sensors: add more range checking in ssp_parse_dataframe()
    iio: light: opt3001: Fixed timeout error when 0 lux
    iio: adc128s052: Fix the error handling path of 'adc128_probe()'
    iio: adc: aspeed: set driver data when adc probe.
    x86/Kconfig: Do not enable AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT automatically
  * nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells
      drivers/nvmem/core.c
    virtio: write back F_VERSION_1 before validate
    USB: serial: option: add prod. id for Quectel EG91
    USB: serial: option: add Telit LE910Cx composition 0x1204
    USB: serial: option: add Quectel EC200S-CN module support
    USB: serial: qcserial: add EM9191 QDL support
  * Input: xpad - add support for another USB ID of Nacon GC-100
      drivers/input/joystick/xpad.c
    usb: musb: dsps: Fix the probe error path
    efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock()
    efi/cper: use stack buffer for error record decoding
    cb710: avoid NULL pointer subtraction
  * xhci: Enable trust tx length quirk for Fresco FL11 USB controller
      drivers/usb/host/xhci-pci.c
  * xhci: Fix command ring pointer corruption while aborting a command
      drivers/usb/host/xhci-ring.c
  * xhci: guard accesses to ep_state in xhci_endpoint_reset()
      drivers/usb/host/xhci.c
    mei: me: add Ice Lake-N device id.
    x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
    btrfs: check for error when looking up inode during dir entry replay
    btrfs: deal with errors when adding inode reference during log replay
    btrfs: deal with errors when replaying dir entry during log replay
    s390: fix strrchr() implementation
    nds32/ftrace: Fix Error: invalid operands (*UND* and *UND* sections) for `^'
    ALSA: hda/realtek - ALC236 headset MIC recording issue
    ALSA: hda/realtek: Add quirk for Clevo X170KM-G
    ALSA: hda/realtek: Complete partial device name to avoid ambiguity
    ALSA: seq: Fix a potential UAF by wrong private_free call order
    Merge 4.19.212 into android-4.19-stable
Linux 4.19.212
  * sched: Always inline is_percpu_thread()
      include/linux/sched.h
    perf/x86: Reset destroy callback on event init failure
    scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported"
    scsi: ses: Fix unsigned comparison with less than zero
  * net: sun: SUNVNET_COMMON should depend on INET
      drivers/net/ethernet/sun/Kconfig
    mac80211: check return value of rhashtable_init
  * net: prevent user from passing illegal stab size
      include/net/pkt_sched.h
      net/sched/sch_api.c
    m68k: Handle arrivals of multiple signals correctly
    mac80211: Drop frames from invalid MAC address in ad-hoc mode
  * netfilter: ip6_tables: zero-initialize fragment offset
      net/ipv6/netfilter/ip6_tables.c
  * HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS
      drivers/hid/hid-apple.c
    net: phy: bcm7xxx: Fixed indirect MMD operations
    Merge 4.19.211 into android-4.19-stable
  * Revert "lib/timerqueue: Rely on rbtree semantics for next timer"
      include/linux/timerqueue.h
      lib/timerqueue.c
    Merge 4.19.210 into android-4.19-stable
Linux 4.19.211
    x86/Kconfig: Correct reference to MWINCHIP3D
    i2c: acpi: fix resource leak in reconfiguration device addition
    i40e: Fix freeing of uninitialized misc IRQ vector
    i40e: fix endless loop under rtnl
  * rtnetlink: fix if_nlmsg_stats_size() under estimation
      net/core/rtnetlink.c
    drm/nouveau/debugfs: fix file release memory leak
  * netlink: annotate data races around nlk->bound
      net/netlink/af_netlink.c
    net: sfp: Fix typo in state machine debug string
  * net: bridge: use nla_total_size_64bit() in br_get_linkxstats_size()
      net/bridge/br_netlink.c
    ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence
    ptp_pch: Load module automatically if ID matches
    powerpc/fsl/dts: Fix phy-connection-type for fm1mac3
  * net_sched: fix NULL deref in fifo_set_limit()
      net/sched/sch_fifo.c
  * phy: mdio: fix memory leak
      drivers/net/phy/mdio_bus.c
  * bpf: Fix integer overflow in prealloc_elems_and_freelist()
      kernel/bpf/stackmap.c
    bpf, arm: Fix register clobbering in div/mod implementation
    xtensa: call irqchip_init only when CONFIG_USE_OF is selected
    bpf, mips: Validate conditional branch offsets
    ARM: dts: qcom: apq8064: use compatible which contains chipid
    ARM: dts: omap3430-sdp: Fix NAND device node
    xen/balloon: fix cancelled balloon action
    nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero
  * ovl: fix missing negative dentry check in ovl_rename()
      fs/overlayfs/dir.c
    xen/privcmd: fix error handling in mmap-resource processing
    USB: cdc-acm: fix break reporting
    USB: cdc-acm: fix racy tty buffer accesses
  * Partially revert "usb: Kconfig: using select for USB_COMMON dependency"
      drivers/usb/Kconfig
  * ANDROID: Different fix for KABI breakage in 4.19.209 in struct sock
      include/net/sock.h
    ANDROID: GKI: update .xml file for struct sock change
Linux 4.19.210
  * lib/timerqueue: Rely on rbtree semantics for next timer
      include/linux/timerqueue.h
      lib/timerqueue.c
  * libata: Add ATA_HORKAGE_NO_NCQ_ON_ATI for Samsung 860 and 870 SSD.
      include/linux/libata.h
    tools/vm/page-types: remove dependency on opt_file for idle page tracking
    scsi: ses: Retry failed Send/Receive Diagnostic commands
    selftests: be sure to make khdr before other targets
    usb: dwc2: check return value after calling platform_get_resource()
    usb: testusb: Fix for showing the connection speed
  * scsi: sd: Free scsi_disk device via put_device()
      drivers/scsi/sd.c
    ext2: fix sleeping in atomic bugs on error
    sparc64: fix pci_iounmap() when CONFIG_PCI is not set
    xen-netback: correct success/error reporting for the SKB-with-fraglist case
  * net: mdio: introduce a shutdown method to mdio device drivers
      drivers/net/phy/mdio_device.c
      include/linux/mdio.h
  * ANDROID: Fix up KABI breakage in 4.19.209 in struct sock
      include/net/sock.h
    Merge 4.19.209 into android-4.19-stable
  * FROMLIST: dm-verity: skip verity_handle_error on I/O errors
      drivers/md/dm-verity-target.c
Linux 4.19.209
  * cred: allow get_cred() and put_cred() to be given NULL.
      include/linux/cred.h
  * HID: usbhid: free raw_report buffers in usbhid_stop
      drivers/hid/usbhid/hid-core.c
    netfilter: ipset: Fix oversized kvmalloc() calls
    HID: betop: fix slab-out-of-bounds Write in betop_probe
    crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
    usb: hso: remove the bailout parameter
    usb: hso: fix error handling code of hso_create_net_device
    hso: fix bailout in error case of probe
    ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE
    ARM: 9079/1: ftrace: Add MODULE_PLTS support
    ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link()
    ARM: 9077/1: PLT: Move struct plt_entries definition to header
    EDAC/synopsys: Fix wrong value type assignment for edac_mode
  * net: udp: annotate data race around udp_sk(sk)->corkflag
      net/ipv4/udp.c
      net/ipv6/udp.c
  * ext4: fix potential infinite loop in ext4_dx_readdir()
      fs/ext4/dir.c
    ipack: ipoctal: fix module reference leak
    ipack: ipoctal: fix missing allocation-failure check
    ipack: ipoctal: fix tty-registration error handling
    ipack: ipoctal: fix tty registration race
    ipack: ipoctal: fix stack information leak
  * elf: don't use MAP_FIXED_NOREPLACE for elf interpreter mappings
      fs/binfmt_elf.c
  * af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
      include/net/sock.h
      net/core/sock.c
      net/unix/af_unix.c
    scsi: csiostor: Add module softdep on cxgb4
    Revert "block, bfq: honor already-setup queue merges"
    e100: fix buffer overrun in e100_get_regs
    e100: fix length calculation in e100_get_regs_len
    hwmon: (tmp421) fix rounding for negative values
    hwmon: (tmp421) report /PVLD condition as fault
    hwmon: (tmp421) Replace S_<PERMS> with octal values
  * sctp: break out if skb_header_pointer returns NULL in sctp_rcv_ootb
      net/sctp/input.c
    mac80211: limit injected vht mcs/nss in ieee80211_parse_tx_radiotap
    mac80211: Fix ieee80211_amsdu_aggregate frag_tail bug
    hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs
    ipvs: check that ip_vs_conn_tab_bits is between 8 and 20
    drm/amd/display: Pass PCI deviceid into DC
    x86/kvmclock: Move this_cpu_pvti into kvmclock.h
    mac80211: fix use-after-free in CCMP/GCMP RX
  * cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory
      drivers/cpufreq/cpufreq_governor_attr_set.c
  * cpufreq: schedutil: Use kobject release() method to free sugov_tunables
      kernel/sched/cpufreq_schedutil.c
    tty: Fix out-of-bound vmalloc access in imageblit
    qnx4: work around gcc false positive warning bug
    xen/balloon: fix balloon kthread freezing
  * tcp: adjust rto_base in retransmits_timed_out()
      net/ipv4/tcp_timer.c
  * tcp: create a helper to model exponential backoff
      net/ipv4/tcp_timer.c
  * tcp: always set retrans_stamp on recovery
      net/ipv4/tcp_output.c
      net/ipv4/tcp_timer.c
  * tcp: address problems caused by EDT misshaps
      net/ipv4/tcp_input.c
      net/ipv4/tcp_timer.c
    PCI: aardvark: Fix checking for PIO status
    arm64: dts: marvell: armada-37xx: Extend PCIe MEM space
    erofs: fix up erofs_lookup tracepoint
    spi: Fix tegra20 build with CONFIG_PM=n
    net: 6pack: Fix tx timeout and slot time
    alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile
  * arm64: Mark __stack_chk_guard as __ro_after_init
      arch/arm64/kernel/process.c
    parisc: Use absolute_pointer() to define PAGE0
    qnx4: avoid stringop-overread errors
    sparc: avoid stringop-overread errors
    net: i825xx: Use absolute_pointer for memcpy from fixed memory location
  * compiler.h: Introduce absolute_pointer macro
      include/linux/compiler.h
    nvme-multipath: fix ANA state updates when a namespace is not present
    xen/balloon: use a kernel thread instead a workqueue
    m68k: Double cast io functions to unsigned long
    net: stmmac: allow CSR clock of 300MHz
    net: macb: fix use after free on rmmod
  * blktrace: Fix uaf in blk_trace access after removing by sysfs
      kernel/trace/blktrace.c
    md: fix a lock order reversal in md_alloc
  * irqchip/gic-v3-its: Fix potential VPE leak on error
      drivers/irqchip/irq-gic-v3-its.c
  * irqchip/goldfish-pic: Select GENERIC_IRQ_CHIP to fix build
      drivers/irqchip/Kconfig
  * thermal/core: Potential buffer overflow in thermal_build_list_of_policies()
      drivers/thermal/thermal_core.c
    fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
    fpga: machxo2-spi: Return an error on failure
    tty: synclink_gt: rename a conflicting function name
    tty: synclink_gt, drop unneeded forward declarations
    scsi: iscsi: Adjust iface sysfs attr detection
    net/mlx4_en: Don't allow aRFS for encapsulated packets
    gpio: uniphier: Fix void functions to remove return value
    net/smc: add missing error check in smc_clc_prfx_set()
    bnxt_en: Fix TX timeout when TX ring size is set to the smallest
    net: hso: fix muxed tty registration
    serial: mvebu-uart: fix driver's tx_empty callback
    mcb: fix error handling in mcb_alloc_bus()
    USB: serial: option: add device id for Foxconn T99W265
    USB: serial: option: remove duplicate USB device ID
    USB: serial: option: add Telit LN920 compositions
    USB: serial: mos7840: remove duplicated 0xac24 device ID
    Re-enable UAS for LaCie Rugged USB3-FW with fk quirk
    staging: greybus: uart: fix tty use after free
    USB: cdc-acm: fix minor-number release
    USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
  * usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
      drivers/usb/storage/unusual_devs.h
    xen/x86: fix PV trap handling on secondary processors
    cifs: fix incorrect check for null pointer in header_assemble
    usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
    usb: dwc2: gadget: Fix ISOC transfer complete handling for DDMA
    usb: gadget: r8a66597: fix a loop in set_feature()
    ocfs2: drop acl cache for directories too
    Merge 4.19.208 into android-4.19-stable
    ANDROID: GKI: update ABI xml
    ANDROID: GKI: Update aarch64 cuttlefish symbol list
  * ANDROID: GKI: rework the ANDROID_KABI_USE() macro to not use __UNIQUE()
      include/linux/android_kabi.h
  * BACKPORT: loop: Set correct device size when using LOOP_CONFIGURE
      drivers/block/loop.c
Linux 4.19.208
    drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV
    blk-throttle: fix UAF by deleteing timer in blk_throtl_exit()
    pwm: stm32-lp: Don't modify HW state in .remove() callback
    pwm: rockchip: Don't modify HW state in .remove() callback
    pwm: img: Don't modify HW state in .remove() callback
    nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
    nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group
    nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group
    nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group
    nilfs2: fix NULL pointer in nilfs_##name##_attr_release
    nilfs2: fix memory leak in nilfs_sysfs_create_device_group
    ceph: lockdep annotations for try_nonblocking_invalidate
    dmaengine: xilinx_dma: Set DMA mask for coherent APIs
  * dmaengine: ioat: depends on !UML
      drivers/dma/Kconfig
    dmaengine: sprd: Add missing MODULE_DEVICE_TABLE
    parisc: Move pci_dev_is_behind_card_dino to where it is used
  * drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION()
      arch/arm64/kernel/cacheinfo.c
      include/linux/cacheinfo.h
  * Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH
      lib/Kconfig.debug
    pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered
  * profiling: fix shift-out-of-bounds bugs
      kernel/profile.c
    nilfs2: use refcount_dec_and_lock() to fix potential UAF
  * prctl: allow to setup brk for et_dyn executables
      kernel/sys.c
    9p/trans_virtio: Remove sysfs file on probe failure
    thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
    dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
  * sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
      net/sctp/sm_make_chunk.c
  * sctp: validate chunk size in __rcv_asconf_lookup
      net/sctp/input.c
    tracing/kprobe: Fix kprobe_on_func_entry() modification
    crypto: talitos - fix max key size for sha384 and sha512
    apparmor: remove duplicate macro list_entry_is_head()
  * rcu: Fix missed wakeup of exp_wq waiters
      kernel/rcu/tree_exp.h
  * KVM: remember position in kvm->vcpus array
      include/linux/kvm_host.h
    s390/bpf: Fix optimizing out zero-extensions

Bug: 205088357
Change-Id: Ib9d80af897f5c3076e6793dc3db117d198e499c2
Signed-off-by: JohnnLee <johnnlee@google.com>
2021-11-24 03:28:15 +00:00
Wilson Sung
9e5fcdf3d0 Merge android-4.19-stable (4.19.207) into android-msm-pixel-4.19-lts
Merge 4.19.207 into android-4.19-stable
Linux 4.19.207
    s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant
    net: renesas: sh_eth: Fix freeing wrong tx descriptor
  * ip_gre: validate csum_start only on pull
      net/ipv4/ip_gre.c
    qlcnic: Remove redundant unlock in qlcnic_pinit_from_rom
  * fq_codel: reject silly quantum parameters
      include/uapi/linux/pkt_sched.h
      net/sched/sch_fq_codel.c
  * netfilter: socket: icmp6: fix use-after-scope
      net/ipv6/netfilter/nf_socket_ipv6.c
    net: dsa: b53: Fix calculating number of switch ports
    ARC: export clear_user_page() for modules
    mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
  * PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n
      include/linux/pci.h
  * KVM: arm64: Handle PSCI resets before userspace touches vCPU state
      virt/kvm/arm/arm.c
  * PCI: Fix pci_dev_str_match_path() alloc while atomic bug
      drivers/pci/pci.c
    mfd: axp20x: Update AXP288 volatile ranges
    NTB: perf: Fix an error code in perf_setup_inbuf()
    ethtool: Fix an error code in cxgb2.c
    block, bfq: honor already-setup queue merges
    net: usb: cdc_mbim: avoid altsetting toggling for Telit LN920
  * PCI: Add ACS quirks for Cavium multi-function devices
      drivers/pci/quirks.c
    mfd: Don't use irq_create_mapping() to resolve a mapping
    dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
    KVM: s390: index kvm->arch.idle_mask by vcpu_idx
  * mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range()
      include/linux/memory_hotplug.h
      mm/memory_hotplug.c
    net: hns3: pad the short tunnel frame before sending to hardware
    ibmvnic: check failover_pending in login response
    qed: Handle management FW error
  * tcp: fix tp->undo_retrans accounting in tcp_sacktag_one()
      net/ipv4/tcp_input.c
  * net: dsa: destroy the phylink instance on any error in dsa_slave_phy_setup
      net/dsa/slave.c
  * net/af_unix: fix a data-race in unix_dgram_poll
      include/linux/skbuff.h
      net/unix/af_unix.c
  * events: Reuse value read using READ_ONCE instead of re-reading it
      kernel/events/core.c
    net/mlx5: Fix potential sleeping in atomic context
  * perf machine: Initialize srcline string member in add_location struct
      tools/perf/util/machine.c
  * tipc: increase timeout in tipc_sk_enqueue()
      net/tipc/socket.c
    r6040: Restore MDIO clock frequency after MAC reset
  * net/l2tp: Fix reference count leak in l2tp_udp_recv_core
      net/l2tp/l2tp_core.c
  * dccp: don't duplicate ccid when cloning dccp sock
      net/dccp/minisocks.c
    ptp: dp83640: don't define PAGE0
  * net-caif: avoid user-triggerable WARN_ON(1)
      net/caif/chnl_net.c
  * tipc: fix an use-after-free issue in tipc_recvmsg
      net/tipc/socket.c
    x86/mm: Fix kern_addr_valid() to cope with existing but not present entries
  * PCI: Add AMD GPU multi-function power dependencies
      drivers/pci/quirks.c
    PM: base: power: don't try to use non-existing RTC for storing data
  * arm64/sve: Use correct size when reinitialising SVE state
      arch/arm64/kernel/fpsimd.c
    bnx2x: Fix enabling network interfaces without VFs
    xen: reset legacy rtc flag for PV domU
    dm thin metadata: Fix use-after-free in dm_bm_set_read_only
    drm/amdgpu: Fix BUG_ON assert
    platform/chrome: cros_ec_proto: Send command again when timeout occurs
  * memcg: enable accounting for pids in nested pid namespaces
      kernel/pid_namespace.c
  * mm/hugetlb: initialize hugetlb_usage in mm_init
      include/linux/hugetlb.h
      kernel/fork.c
    cpufreq: powernv: Fix init_chip_info initialization in numa=off
    scsi: qla2xxx: Sync queue idx with queue_pair_map idx
    scsi: BusLogic: Fix missing pr_cont() use
  * ovl: fix BUG_ON() in may_delete() when called from ovl_cleanup()
      fs/overlayfs/dir.c
    parisc: fix crash with signals and alloca
    net: w5100: check return value after calling platform_get_resource()
  * net: fix NULL pointer reference in cipso_v4_doi_free
      net/netlabel/netlabel_cipso_v4.c
    ath9k: fix sleeping in atomic context
    ath9k: fix OOB read ar9300_eeprom_restore_internal
    parport: remove non-zero check on count
  * ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B
      sound/soc/rockchip/rockchip_i2s.c
  * ASoC: rockchip: i2s: Fix regmap_ops hang
      sound/soc/rockchip/rockchip_i2s.c
    usbip:vhci_hcd USB port can get stuck in the disabled state
    usbip: give back URBs for unsent unlink requests during cleanup
    usb: musb: musb_dsps: request_irq() after initializing musb
  * Revert "USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set"
      drivers/usb/host/xhci.c
  * cifs: fix wrong release in sess_alloc_buffer() failed path
      fs/cifs/sess.c
    mmc: core: Return correct emmc response in case of ioctl error
  * selftests/bpf: Enlarge select() timeout for test_maps
      tools/testing/selftests/bpf/test_maps.c
    mmc: rtsx_pci: Fix long reads when clock is prescaled
    mmc: sdhci-of-arasan: Check return value of non-void funtions
  * of: Don't allow __of_attached_node_sysfs() without CONFIG_SYSFS
      drivers/of/kobj.c
  * gfs2: Don't call dlm after protocol is unmounted
      fs/gfs2/lock_dlm.c
    staging: rts5208: Fix get_ms_information() heap buffer size
  * rpc: fix gss_svc_init cleanup on failure
      net/sunrpc/auth_gss/svcauth_gss.c
  * tcp: enable data-less, empty-cookie SYN with TFO_SERVER_COOKIE_NOT_REQD
      net/ipv4/tcp_fastopen.c
    serial: sh-sci: fix break handling for sysrq
  * Bluetooth: Fix handling of LE Enhanced Connection Complete
      net/bluetooth/hci_event.c
    ARM: tegra: tamonten: Fix UART pad setting
    gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()
  * Bluetooth: avoid circular locks in sco_sock_connect
      net/bluetooth/sco.c
  * Bluetooth: schedule SCO timeouts with delayed_work
      net/bluetooth/sco.c
    net: ethernet: stmmac: Do not use unreachable() in ipq806x_gmac_probe()
    arm64: dts: qcom: sdm660: use reg value for memory node
    ARM: dts: imx53-ppd: Fix ACHC entry
    media: tegra-cec: Handle errors of clk_prepare_enable()
    media: TDA1997x: fix tda1997x_query_dv_timings() return value
  * media: v4l2-dv-timings.c: fix wrong condition in two for-loops
      drivers/media/v4l2-core/v4l2-dv-timings.c
    media: imx258: Limit the max analogue gain to 480
    media: imx258: Rectify mismatch of VTS value
  * ASoC: Intel: bytcr_rt5640: Move "Platform Clock" routes to the maps for the matching in-/output
      sound/soc/intel/boards/bytcr_rt5640.c
  * bonding: 3ad: fix the concurrency between __bond_release_one() and bond_3ad_state_machine_handler()
      drivers/net/bonding/bond_main.c
  * Bluetooth: skip invalid hci_sync_conn_complete_evt
      net/bluetooth/hci_event.c
    ata: sata_dwc_460ex: No need to call phy_exit() befre phy_init()
  * samples: bpf: Fix tracex7 error raised on the missing argument
      samples/bpf/test_override_return.sh
      samples/bpf/tracex7_user.c
    staging: ks7010: Fix the initialization of the 'sleep_status' structure
    serial: 8250_pci: make setup_port() parameters explicitly unsigned
    hvsi: don't panic on tty_register_driver failure
    xtensa: ISS: don't panic in rs_init
  * serial: 8250: Define RX trigger levels for OxSemi 950 devices
      include/uapi/linux/serial_reg.h
    s390/jump_label: print real address in a case of a jump label bug
  * flow_dissector: Fix out-of-bounds warnings
      net/core/flow_dissector.c
  * ipv4: ip_output.c: Fix out-of-bounds warning in ip_copy_addrs()
      net/ipv4/ip_output.c
    video: fbdev: riva: Error out if 'pixclock' equals zero
    video: fbdev: kyro: Error out if 'pixclock' equals zero
    video: fbdev: asiliantfb: Error out if 'pixclock' equals zero
  * bpf/tests: Do not PASS tests without actually testing the result
      lib/test_bpf.c
  * bpf/tests: Fix copy-and-paste error in double word test
      lib/test_bpf.c
    drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex
    tty: serial: jsm: hold port lock when reporting modem line changes
    staging: board: Fix uninitialized spinlock when attaching genpd
  * usb: gadget: composite: Allow bMaxPower=0 if self-powered
      drivers/usb/gadget/composite.c
  * usb: gadget: u_ether: fix a potential null pointer dereference
      drivers/usb/gadget/function/u_ether.c
    usb: host: fotg210: fix the actual_length of an iso packet
    usb: host: fotg210: fix the endpoint's transactional opportunities calculation
  * Smack: Fix wrong semantics in smk_access_entry()
      security/smack/smack_access.c
  * netlink: Deal with ESRCH error in nlmsg_notify()
      net/netlink/af_netlink.c
    video: fbdev: kyro: fix a DoS bug by restricting user input
    ARM: dts: qcom: apq8064: correct clock names
    iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
  * tipc: keep the skb in rcv queue until the whole data is read
      net/tipc/socket.c
  * PCI: Use pci_update_current_state() in pci_enable_device_flags()
      drivers/pci/pci.c
    crypto: mxs-dcp - Use sg_mapping_iter to copy data
    media: dib8000: rewrite the init prbs logic
  * userfaultfd: prevent concurrent API initialization
      fs/userfaultfd.c
    MIPS: Malta: fix alignment of the devicetree buffer
  * f2fs: fix to unmap pages from userspace process in punch_hole()
      fs/f2fs/file.c
  * f2fs: fix to account missing .skipped_gc_rwsem
      fs/f2fs/gc.c
  * fscache: Fix cookie key hashing
      fs/fscache/cookie.c
      fs/fscache/internal.h
      fs/fscache/main.c
    platform/x86: dell-smbios-wmi: Add missing kfree in error-exit from run_smbios_call
    scsi: qedi: Fix error codes in qedi_alloc_global_queues()
    pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_entry()
    openrisc: don't printk() unconditionally
    powerpc/stacktrace: Include linux/delay.h
  * vfio: Use config not menuconfig for VFIO_NOIOMMU
      drivers/vfio/Kconfig
    pinctrl: samsung: Fix pinctrl bank pin count
    docs: Fix infiniband uverbs minor number
    RDMA/iwcm: Release resources if iw_cm module initialization fails
  * HID: input: do not report stylus battery state as "full"
      drivers/hid/hid-input.c
    PCI: aardvark: Fix masking and unmasking legacy INTx interrupts
    PCI: aardvark: Increase polling delay to 1.5s while waiting for PIO response
    PCI: xilinx-nwl: Enable the clock through CCF
  * PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure
      drivers/pci/syscall.c
  * PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported
      drivers/pci/quirks.c
    ARM: 9105/1: atags_to_fdt: don't warn about stack size
    libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs
    media: rc-loopback: return number of emitters rather than error
    media: uvc: don't do DMA on stack
    VMCI: fix NULL pointer dereference when unmapping queue pair
    dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc()
    power: supply: max17042: handle fails of reading status register
    block: bfq: fix bfq_set_next_ioprio_data()
  * crypto: public_key: fix overflow during implicit conversion
      include/crypto/public_key.h
  * arm64: head: avoid over-mapping in map_memory
      arch/arm64/include/asm/kernel-pgtable.h
      arch/arm64/kernel/head.S
    soc: aspeed: lpc-ctrl: Fix boundary check for mmap
  * tools/thermal/tmon: Add cross compiling support
      tools/thermal/tmon/Makefile
  * bpf: Fix pointer arithmetic mask tightening under state pruning
      include/linux/bpf_verifier.h
      kernel/bpf/verifier.c
  * bpf: verifier: Allocate idmap scratch in verifier env
      include/linux/bpf_verifier.h
      kernel/bpf/verifier.c
  * bpf: Fix leakage due to insufficient speculative store bypass mitigation
      include/linux/bpf_verifier.h
      kernel/bpf/verifier.c
  * bpf: Introduce BPF nospec instruction for mitigating Spectre v4
      arch/arm64/net/bpf_jit_comp.c
      include/linux/filter.h
      kernel/bpf/core.c
      kernel/bpf/disasm.c
  * selftests/bpf: fix tests due to const spill/fill
      tools/testing/selftests/bpf/test_verifier.c
  * bpf: track spill/fill of constants
      kernel/bpf/verifier.c
  * selftests/bpf: Test variable offset stack access
      tools/testing/selftests/bpf/test_verifier.c
  * bpf: Sanity check max value for var_off stack access
      kernel/bpf/verifier.c
  * bpf: Reject indirect var_off stack access in unpriv mode
      kernel/bpf/verifier.c
  * bpf: Reject indirect var_off stack access in raw mode
      kernel/bpf/verifier.c
  * bpf: Support variable offset stack access from helpers
      kernel/bpf/verifier.c
  * bpf: correct slot_type marking logic to allow more stack slot sharing
      kernel/bpf/verifier.c
      tools/testing/selftests/bpf/test_verifier.c
  * bpf/verifier: per-register parent pointers
      include/linux/bpf_verifier.h
      kernel/bpf/verifier.c
  * 9p/xen: Fix end of loop tests for list_for_each_entry
      net/9p/trans_xen.c
  * include/linux/list.h: add a macro to test if entry is pointing to the head
      include/linux/list.h
    xen: fix setting of max_pfn in shared_info
    powerpc/perf/hv-gpci: Fix counter value parsing
  * PCI/MSI: Skip masking MSI-X on Xen PV
      drivers/pci/msi.c
    blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN
    blk-zoned: allow zone management send operations without CAP_SYS_ADMIN
    btrfs: reset replace target device to allocation state on close
    rtc: tps65910: Correct driver module alias
    clk: kirkwood: Fix a clocking boot regression
    backlight: pwm_bl: Improve bootloader/kernel device handover
    fbmem: don't allow too huge resolutions
  * IMA: remove the dependency on CRYPTO_MD5
      security/integrity/ima/Kconfig
  * IMA: remove -Wmissing-prototypes warning
      security/integrity/ima/ima_mok.c
    KVM: x86: Update vCPU's hv_clock before back to guest when tsc_offset is adjusted
    x86/resctrl: Fix a maybe-uninitialized build warning treated as error
  * tty: Fix data race between tiocsti() and flush_to_ldisc()
      drivers/tty/tty_io.c
  * ubifs: report correct st_size for encrypted symlinks
      fs/ubifs/file.c
  * f2fs: report correct st_size for encrypted symlinks
      fs/f2fs/namei.c
  * ext4: report correct st_size for encrypted symlinks
      fs/ext4/symlink.c
  * fscrypt: add fscrypt_symlink_getattr() for computing st_size
      fs/crypto/hooks.c
  * netns: protect netns ID lookups with RCU
      net/core/net_namespace.c
  * ipv4: fix endianness issue in inet_rtm_getroute_build_skb()
      net/ipv4/route.c
    net: qualcomm: fix QCA7000 checksum handling
  * net: sched: Fix qdisc_rate_table refcount leak when get tcf_block failed
      net/sched/sch_cbq.c
  * ipv4: make exception cache less predictible
      net/ipv4/route.c
    bcma: Fix memory leak for internally-handled cores
    ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()
    tty: serial: fsl_lpuart: fix the wrong mapbase value
    usb: bdc: Fix an error handling path in 'bdc_probe()' when no suitable DMA config is available
    usb: ehci-orion: Handle errors of clk_prepare_enable() in probe
    i2c: mt65xx: fix IRQ check
  * CIFS: Fix a potencially linear read overflow
      fs/cifs/cifs_unicode.c
    mmc: moxart: Fix issue with uninitialized dma_slave_config
    mmc: dw_mmc: Fix issue with uninitialized dma_slave_config
    i2c: s3c2410: fix IRQ check
    i2c: iop3xx: fix deferred probing
  * Bluetooth: add timeout sanity check to hci_inquiry
      net/bluetooth/hci_core.c
    usb: gadget: mv_u3d: request_irq() after initializing UDC
  * mac80211: Fix insufficient headroom issue for AMSDU
      net/mac80211/tx.c
    usb: phy: tahvo: add IRQ check
    usb: host: ohci-tmio: add IRQ check
  * Bluetooth: Move shutdown callback before flushing tx and rx queue
      net/bluetooth/hci_core.c
    usb: phy: twl6030: add IRQ checks
    usb: phy: fsl-usb: add IRQ check
    usb: gadget: udc: at91: add IRQ check
    drm/msm/dsi: Fix some reference counted resource leaks
  * Bluetooth: fix repeated calls to sco_sock_kill
      net/bluetooth/sco.c
    arm64: dts: exynos: correct GIC CPU interfaces address range on Exynos7
    drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs
  * Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow
      net/bluetooth/cmtp/cmtp.h
    soc: qcom: smsm: Fix missed interrupts if state changes while masked
  * PCI: PM: Enable PME if it can be signaled from D3cold
      drivers/pci/pci.c
  * PCI: PM: Avoid forcing PCI_D0 for wakeup reasons inconsistently
      drivers/pci/pci.c
    media: venus: venc: Fix potential null pointer dereference on pointer fmt
    media: em28xx-input: fix refcount bug in em28xx_usb_disconnect
    i2c: highlander: add IRQ check
  * net: cipso: fix warnings in netlbl_cipsov4_add_std
      net/netlabel/netlabel_cipso_v4.c
  * tcp: seq_file: Avoid skipping sk during tcp_seek_last_pos
      net/ipv4/tcp_ipv4.c
  * Bluetooth: sco: prevent information leak in sco_conn_defer_accept()
      net/bluetooth/sco.c
    media: go7007: remove redundant initialization
    media: dvb-usb: fix uninit-value in vp702x_read_mac_addr
    media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init
  * soc: rockchip: ROCKCHIP_GRF should not default to y, unconditionally
      drivers/soc/rockchip/Kconfig
    media: TDA1997x: enable EDID support
    spi: sprd: Fix the wrong WDG_LOAD_VAL
  * certs: Trigger creation of RSA module signing key if it's not an RSA key
      certs/Makefile
    crypto: qat - use proper type for vf_mask
    clocksource/drivers/sh_cmt: Fix wrong setting if don't request IRQ for clock source channel
  * lib/mpi: use kcalloc in mpi_resize
      lib/mpi/mpiutil.c
    spi: spi-pic32: Fix issue with uninitialized dma_slave_config
    spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config
    m68k: emu: Fix invalid free in nfeth_cleanup()
  * udf_get_extendedattr() had no boundary checks.
      fs/udf/misc.c
  * fcntl: fix potential deadlock for &fasync_struct.fa_lock
      fs/fcntl.c
    crypto: qat - do not export adf_iov_putmsg()
    crypto: qat - fix naming for init/shutdown VF to PF notifications
    crypto: qat - fix reuse of completion variable
    crypto: qat - handle both source of interrupt in VF ISR
    crypto: qat - do not ignore errors from enable_vf2pf_comms()
    libata: fix ata_host_start()
    s390/cio: add dev_busid sysfs entry for each subchannel
  * power: supply: max17042_battery: fix typo in MAx17042_TOFF
      include/linux/power/max17042_battery.h
    nvme-rdma: don't update queue count when failing to set io queues
    bcache: add proper error unwinding in bcache_device_init
  * isofs: joliet: Fix iocharset=utf8 mount option
      fs/isofs/inode.c
      fs/isofs/isofs.h
      fs/isofs/joliet.c
  * udf: Check LVID earlier
      fs/udf/super.c
  * hrtimer: Avoid double reprogramming in __hrtimer_start_range_ns()
      kernel/time/hrtimer.c
  * sched/deadline: Fix missing clock update in migrate_task_rq_dl()
      kernel/sched/deadline.c
    crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop()
    power: supply: axp288_fuel_gauge: Report register-address on readb / writeb errors
  * sched/deadline: Fix reset_on_fork reporting of DL tasks
      kernel/sched/deadline.c
      kernel/sched/sched.h
    crypto: mxs-dcp - Check for DMA mapping errors
  * regmap: fix the offset of register error log
      drivers/base/regmap/regmap.c
  * locking/mutex: Fix HANDOFF condition
      kernel/locking/mutex.c
  * PCI: Call Max Payload Size-related fixup quirks early
      drivers/pci/quirks.c
    x86/reboot: Limit Dell Optiplex 990 quirk to early BIOS versions
    usb: mtu3: fix the wrong HS mult value
    usb: mtu3: use @mult for HS isoc or intr
    usb: host: xhci-rcar: Don't reload firmware after the completion
  * ALSA: usb-audio: Add registration quirk for JBL Quantum 800
      sound/usb/quirks.c
    Revert "btrfs: compression: don't try to compress if we don't have enough pages"
  * mm/page_alloc: speed up the iteration of max_order
      mm/page_alloc.c
    net: ll_temac: Remove left-over debug message
    powerpc/boot: Delete unneeded .globl _zimage_start
    powerpc/module64: Fix comment in R_PPC64_ENTRY handling
    crypto: talitos - reduce max key size for SEC1
  * SUNRPC/nfs: Fix return value for nfs4_callback_compound()
      fs/nfs/callback_xdr.c
      include/linux/sunrpc/svc.h
      net/sunrpc/svc.c
  * ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table (v2)
      net/ipv4/icmp.c
    USB: serial: mos7720: improve OOM-handling in read_mos_reg()
  * igmp: Add ip_mc_list lock in ip_check_mc_rcu
      net/ipv4/igmp.c
    ARM: imx: fix missing 3rd argument in macro imx_mmdc_perf_init
    ARM: imx: add missing clk_disable_unprepare()
    media: stkwebcam: fix memory leak in stk_camera_probe
  * clk: fix build warning for orphan_list
      drivers/clk/clk.c
  * ALSA: pcm: fix divide error in snd_pcm_lib_ioctl
      sound/core/pcm_lib.c
    ARM: 8918/2: only build return_address() if needed
  * cryptoloop: add a deprecation warning
      drivers/block/Kconfig
    perf/x86/amd/ibs: Work around erratum #1197
    perf/x86/intel/pt: Fix mask of num_address_ranges
    qede: Fix memset corruption
    net: macb: Add a NULL check on desc_ptp
    qed: Fix the VF msix vectors flow
    gpu: ipu-v3: Fix i.MX IPU-v3 offset calculations for (semi)planar U/V formats
    xtensa: fix kconfig unmet dependency warning for HAVE_FUTEX_CMPXCHG
  * ext4: fix race writing to an inline_data file while its xattrs are changing
      fs/ext4/inline.c
    Merge 4.19.206 into android-4.19-stable
Linux 4.19.206
  * net: don't unconditionally copy_from_user a struct ifreq for socket ioctls
      include/linux/netdevice.h
      net/socket.c
    Revert "floppy: reintroduce O_NDELAY fix"
    KVM: x86/mmu: Treat NX as used (not reserved) for all !TDP shadow MMUs
    fbmem: add margin check to fb_check_caps()
    vt_kdsetmode: extend console locking
  * net/rds: dma_map_sg is entitled to merge entries
      net/rds/ib_frmr.c
    drm/nouveau/disp: power down unused DP links during init
  * drm: Copy drm_wait_vblank to user before returning
      drivers/gpu/drm/drm_ioc32.c
    qed: Fix null-pointer dereference in qed_rdma_create_qp()
    qed: qed ll2 race condition fixes
    vringh: Use wiov->used to check for read/write desc order
    virtio_pci: Support surprise removal of virtio pci device
    virtio: Improve vq->broken access to avoid any compiler optimization
  * opp: remove WARN when no valid OPPs remain
      drivers/opp/of.c
    usb: gadget: u_audio: fix race condition on endpoint stop
    net: hns3: fix get wrong pfc_en when query PFC configuration
    net: marvell: fix MVNETA_TX_IN_PRGRS bit number
    xgene-v2: Fix a resource leak in the error handling path of 'xge_probe()'
  * ip_gre: add validation for csum_start
      net/ipv4/ip_gre.c
    e1000e: Fix the max snoop/no-snoop latency for 10M
    IB/hfi1: Fix possible null-pointer dereference in _extend_sdma_tx_descs()
  * usb: dwc3: gadget: Stop EP0 transfers during pullup disable
      drivers/usb/dwc3/gadget.c
  * usb: dwc3: gadget: Fix dwc3_calc_trbs_left()
      drivers/usb/dwc3/gadget.c
    USB: serial: option: add new VID/PID to support Fibocom FG150
    Revert "USB: serial: ch341: fix character loss at high transfer rates"
    can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters
  * once: Fix panic when module unload
      include/linux/once.h
      lib/once.c
  * netfilter: conntrack: collect all entries in one cycle
      net/netfilter/nf_conntrack_core.c
    ARC: Fix CONFIG_STACKDEPOT
  * bpf: Fix truncation handling for mod32 dst reg wrt zero
      kernel/bpf/verifier.c
  * bpf: Fix 32 bit src register truncation on div/mod
      include/linux/filter.h
      kernel/bpf/verifier.c
  * bpf: Do not use ax register in interpreter on div/mod
      kernel/bpf/core.c
  * net: qrtr: fix another OOB Read in qrtr_endpoint_post
      net/qrtr/qrtr.c

Bug: 201722185
Change-Id: Ib431fe52b39577bd49f14f4b28c49b54fa247c54
Signed-off-by: Wilson Sung <wilsonsung@google.com>
2021-10-27 08:44:16 +00:00
Eric Biggers
e9f2289a4b BACKPORT: crypto: blake2b - sync with blake2s implementation
Sync the BLAKE2b code with the BLAKE2s code as much as possible:

- Move a lot of code into new headers <crypto/blake2b.h> and
  <crypto/internal/blake2b.h>, and adjust it to be like the
  corresponding BLAKE2s code, i.e. like <crypto/blake2s.h> and
  <crypto/internal/blake2s.h>.

- Rename constants, e.g. BLAKE2B_*_DIGEST_SIZE => BLAKE2B_*_HASH_SIZE.

- Use a macro BLAKE2B_ALG() to define the shash_alg structs.

- Export blake2b_compress_generic() for use as a fallback.

This makes it much easier to add optimized implementations of BLAKE2b,
as optimized implementations can use the helper functions
crypto_blake2b_{setkey,init,update,final}() and
blake2b_compress_generic().  The ARM implementation will use these.

But this change is also helpful because it eliminates unnecessary
differences between the BLAKE2b and BLAKE2s code, so that the same
improvements can easily be made to both.  (The two algorithms are
basically identical, except for the word size and constants.)  It also
makes it straightforward to add a library API for BLAKE2b in the future
if/when it's needed.

This change does make the BLAKE2b code slightly more complicated than it
needs to be, as it doesn't actually provide a library API yet.  For
example, __blake2b_update() doesn't really need to exist yet; it could
just be inlined into crypto_blake2b_update().  But I believe this is
outweighed by the benefits of keeping the code in sync.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 28dcca4cc0c01e2467549a36b1b0eacfdb01236c)

Conflicts:
	crypto/blake2b_generic.c

(conflict due to this branch not having commit 674f368a952c,
"crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN")

Bug: 178411248
Change-Id: I755c64fefe1209b54d1417d91e8a4c207382a620
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:11:13 -07:00
Eric Biggers
291c9c6a56 UPSTREAM: crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
Address the following checkpatch warning:

	WARNING: Use #include <linux/bug.h> instead of <asm/bug.h>

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit bbda6e0f1303953c855ee3669655a81b69fbe899)
Bug: 152722841
Bug: 178411248
Change-Id: Ib12103873c97387ba59ff897c44a18e4f1e6da3d
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:11:00 -07:00
Eric Biggers
b6ae0150cc UPSTREAM: crypto: blake2s - adjust include guard naming
Use the full path in the include guards for the BLAKE2s headers to avoid
ambiguity and to match the convention for most files in include/crypto/.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 8786841bc2020f7f2513a6c74e64912f07b9c0dc)
Bug: 152722841
Bug: 178411248
Change-Id: Iea57edbe14c9083ce3d7a77b2c3bd63cd6650e56
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:11:00 -07:00
Eric Biggers
2761b1d01f UPSTREAM: crypto: blake2s - add comment for blake2s_state fields
The first three fields of 'struct blake2s_state' are used in assembly
code, which isn't immediately obvious, so add a comment to this effect.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 7d87131fadd53a0401b5c078dd64e58c3ea6994c)
Bug: 152722841
Bug: 178411248
Change-Id: Iab85ddd350a2db917b247ba8f6e224eba905b747
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:10:58 -07:00
Eric Biggers
e13d2476a6 UPSTREAM: crypto: blake2s - optimize blake2s initialization
If no key was provided, then don't waste time initializing the block
buffer, as its initial contents won't be used.

Also, make crypto_blake2s_init() and blake2s() call a single internal
function __blake2s_init() which treats the key as optional, rather than
conditionally calling blake2s_init() or blake2s_init_key().  This
reduces the compiled code size, as previously both blake2s_init() and
blake2s_init_key() were being inlined into these two callers, except
when the key size passed to blake2s() was a compile-time constant.

These optimizations aren't that significant for BLAKE2s.  However, the
equivalent optimizations will be more significant for BLAKE2b, as
everything is twice as big in BLAKE2b.  And it's good to keep things
consistent rather than making optimizations for BLAKE2b but not BLAKE2s.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 42ad8cf821f0d8564c393e9ad7d00a1a271d18ae)
Bug: 152722841
Bug: 178411248
Change-Id: Id057e0c8a5f0e432f227dc3deaa8997a7cbc0577
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:10:57 -07:00
Eric Biggers
4af17e1312 BACKPORT: crypto: blake2s - share the "shash" API boilerplate code
Add helper functions for shash implementations of BLAKE2s to
include/crypto/internal/blake2s.h, taking advantage of
__blake2s_update() and __blake2s_final() that were added by the previous
patch to share more code between the library and shash implementations.

crypto_blake2s_setkey() and crypto_blake2s_init() are usable as
shash_alg::setkey and shash_alg::init directly, while
crypto_blake2s_update() and crypto_blake2s_final() take an extra
'blake2s_compress_t' function pointer parameter.  This allows the
implementation of the compression function to be overridden, which is
the only part that optimized implementations really care about.

The new functions are inline functions (similar to those in sha1_base.h,
sha256_base.h, and sm3_base.h) because this avoids needing to add a new
module blake2s_helpers.ko, they aren't *too* long, and this avoids
indirect calls which are expensive these days.  Note that they can't go
in blake2s_generic.ko, as that would require selecting CRYPTO_BLAKE2S
from CRYPTO_BLAKE2S_X86, which would cause a recursive dependency.

Finally, use these new helper functions in the x86 implementation of
BLAKE2s.  (This part should be a separate patch, but unfortunately the
x86 implementation used the exact same function names like
"crypto_blake2s_update()", so it had to be updated at the same time.)

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 8c4a93a1270ddffc7660ae43fa8030ecfe9c06d9)

Conflicts:
	arch/x86/crypto/blake2s-glue.c
	crypto/blake2s_generic.c

(conflict due to this branch not having commit 674f368a952c,
"crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN")

Bug: 152722841
Bug: 178411248
Change-Id: I9d23b1897cee81fb1704b6eea14d3dc9b1c80fe0
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:10:54 -07:00
Eric Biggers
f7f9188aac UPSTREAM: crypto: blake2s - move update and final logic to internal/blake2s.h
Move most of blake2s_update() and blake2s_final() into new inline
functions __blake2s_update() and __blake2s_final() in
include/crypto/internal/blake2s.h so that this logic can be shared by
the shash helper functions.  This will avoid duplicating this logic
between the library and shash implementations.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 057edc9c8bb2d5ff5b058b521792c392428a0714)
Bug: 152722841
Bug: 178411248
Change-Id: Idedf8147914839d5280e5d8eec9013264fbb45f9
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:10:52 -07:00
Herbert Xu
7bec5e693a UPSTREAM: crypto: lib/blake2s - Move selftest prototype into header file
This patch fixes a missing prototype warning on blake2s_selftest.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit ce0d5d63e897cc7c3a8fd043c7942fc6a78ec6f4)
Bug: 152722841
Change-Id: Ieb19048d60f6c9dc36cefda8b09b3d5c95e9118e
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:10:36 -07:00
Greg Kroah-Hartman
11156bde8d Merge 4.19.207 into android-4.19-stable
Changes in 4.19.207
	ext4: fix race writing to an inline_data file while its xattrs are changing
	xtensa: fix kconfig unmet dependency warning for HAVE_FUTEX_CMPXCHG
	gpu: ipu-v3: Fix i.MX IPU-v3 offset calculations for (semi)planar U/V formats
	qed: Fix the VF msix vectors flow
	net: macb: Add a NULL check on desc_ptp
	qede: Fix memset corruption
	perf/x86/intel/pt: Fix mask of num_address_ranges
	perf/x86/amd/ibs: Work around erratum #1197
	cryptoloop: add a deprecation warning
	ARM: 8918/2: only build return_address() if needed
	ALSA: pcm: fix divide error in snd_pcm_lib_ioctl
	clk: fix build warning for orphan_list
	media: stkwebcam: fix memory leak in stk_camera_probe
	ARM: imx: add missing clk_disable_unprepare()
	ARM: imx: fix missing 3rd argument in macro imx_mmdc_perf_init
	igmp: Add ip_mc_list lock in ip_check_mc_rcu
	USB: serial: mos7720: improve OOM-handling in read_mos_reg()
	ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table (v2)
	SUNRPC/nfs: Fix return value for nfs4_callback_compound()
	crypto: talitos - reduce max key size for SEC1
	powerpc/module64: Fix comment in R_PPC64_ENTRY handling
	powerpc/boot: Delete unneeded .globl _zimage_start
	net: ll_temac: Remove left-over debug message
	mm/page_alloc: speed up the iteration of max_order
	Revert "btrfs: compression: don't try to compress if we don't have enough pages"
	ALSA: usb-audio: Add registration quirk for JBL Quantum 800
	usb: host: xhci-rcar: Don't reload firmware after the completion
	usb: mtu3: use @mult for HS isoc or intr
	usb: mtu3: fix the wrong HS mult value
	x86/reboot: Limit Dell Optiplex 990 quirk to early BIOS versions
	PCI: Call Max Payload Size-related fixup quirks early
	locking/mutex: Fix HANDOFF condition
	regmap: fix the offset of register error log
	crypto: mxs-dcp - Check for DMA mapping errors
	sched/deadline: Fix reset_on_fork reporting of DL tasks
	power: supply: axp288_fuel_gauge: Report register-address on readb / writeb errors
	crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop()
	sched/deadline: Fix missing clock update in migrate_task_rq_dl()
	hrtimer: Avoid double reprogramming in __hrtimer_start_range_ns()
	udf: Check LVID earlier
	isofs: joliet: Fix iocharset=utf8 mount option
	bcache: add proper error unwinding in bcache_device_init
	nvme-rdma: don't update queue count when failing to set io queues
	power: supply: max17042_battery: fix typo in MAx17042_TOFF
	s390/cio: add dev_busid sysfs entry for each subchannel
	libata: fix ata_host_start()
	crypto: qat - do not ignore errors from enable_vf2pf_comms()
	crypto: qat - handle both source of interrupt in VF ISR
	crypto: qat - fix reuse of completion variable
	crypto: qat - fix naming for init/shutdown VF to PF notifications
	crypto: qat - do not export adf_iov_putmsg()
	fcntl: fix potential deadlock for &fasync_struct.fa_lock
	udf_get_extendedattr() had no boundary checks.
	m68k: emu: Fix invalid free in nfeth_cleanup()
	spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config
	spi: spi-pic32: Fix issue with uninitialized dma_slave_config
	lib/mpi: use kcalloc in mpi_resize
	clocksource/drivers/sh_cmt: Fix wrong setting if don't request IRQ for clock source channel
	crypto: qat - use proper type for vf_mask
	certs: Trigger creation of RSA module signing key if it's not an RSA key
	spi: sprd: Fix the wrong WDG_LOAD_VAL
	media: TDA1997x: enable EDID support
	soc: rockchip: ROCKCHIP_GRF should not default to y, unconditionally
	media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init
	media: dvb-usb: fix uninit-value in vp702x_read_mac_addr
	media: go7007: remove redundant initialization
	Bluetooth: sco: prevent information leak in sco_conn_defer_accept()
	tcp: seq_file: Avoid skipping sk during tcp_seek_last_pos
	net: cipso: fix warnings in netlbl_cipsov4_add_std
	i2c: highlander: add IRQ check
	media: em28xx-input: fix refcount bug in em28xx_usb_disconnect
	media: venus: venc: Fix potential null pointer dereference on pointer fmt
	PCI: PM: Avoid forcing PCI_D0 for wakeup reasons inconsistently
	PCI: PM: Enable PME if it can be signaled from D3cold
	soc: qcom: smsm: Fix missed interrupts if state changes while masked
	Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow
	drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs
	arm64: dts: exynos: correct GIC CPU interfaces address range on Exynos7
	Bluetooth: fix repeated calls to sco_sock_kill
	drm/msm/dsi: Fix some reference counted resource leaks
	usb: gadget: udc: at91: add IRQ check
	usb: phy: fsl-usb: add IRQ check
	usb: phy: twl6030: add IRQ checks
	Bluetooth: Move shutdown callback before flushing tx and rx queue
	usb: host: ohci-tmio: add IRQ check
	usb: phy: tahvo: add IRQ check
	mac80211: Fix insufficient headroom issue for AMSDU
	usb: gadget: mv_u3d: request_irq() after initializing UDC
	Bluetooth: add timeout sanity check to hci_inquiry
	i2c: iop3xx: fix deferred probing
	i2c: s3c2410: fix IRQ check
	mmc: dw_mmc: Fix issue with uninitialized dma_slave_config
	mmc: moxart: Fix issue with uninitialized dma_slave_config
	CIFS: Fix a potencially linear read overflow
	i2c: mt65xx: fix IRQ check
	usb: ehci-orion: Handle errors of clk_prepare_enable() in probe
	usb: bdc: Fix an error handling path in 'bdc_probe()' when no suitable DMA config is available
	tty: serial: fsl_lpuart: fix the wrong mapbase value
	ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()
	bcma: Fix memory leak for internally-handled cores
	ipv4: make exception cache less predictible
	net: sched: Fix qdisc_rate_table refcount leak when get tcf_block failed
	net: qualcomm: fix QCA7000 checksum handling
	ipv4: fix endianness issue in inet_rtm_getroute_build_skb()
	netns: protect netns ID lookups with RCU
	fscrypt: add fscrypt_symlink_getattr() for computing st_size
	ext4: report correct st_size for encrypted symlinks
	f2fs: report correct st_size for encrypted symlinks
	ubifs: report correct st_size for encrypted symlinks
	tty: Fix data race between tiocsti() and flush_to_ldisc()
	x86/resctrl: Fix a maybe-uninitialized build warning treated as error
	KVM: x86: Update vCPU's hv_clock before back to guest when tsc_offset is adjusted
	IMA: remove -Wmissing-prototypes warning
	IMA: remove the dependency on CRYPTO_MD5
	fbmem: don't allow too huge resolutions
	backlight: pwm_bl: Improve bootloader/kernel device handover
	clk: kirkwood: Fix a clocking boot regression
	rtc: tps65910: Correct driver module alias
	btrfs: reset replace target device to allocation state on close
	blk-zoned: allow zone management send operations without CAP_SYS_ADMIN
	blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN
	PCI/MSI: Skip masking MSI-X on Xen PV
	powerpc/perf/hv-gpci: Fix counter value parsing
	xen: fix setting of max_pfn in shared_info
	include/linux/list.h: add a macro to test if entry is pointing to the head
	9p/xen: Fix end of loop tests for list_for_each_entry
	bpf/verifier: per-register parent pointers
	bpf: correct slot_type marking logic to allow more stack slot sharing
	bpf: Support variable offset stack access from helpers
	bpf: Reject indirect var_off stack access in raw mode
	bpf: Reject indirect var_off stack access in unpriv mode
	bpf: Sanity check max value for var_off stack access
	selftests/bpf: Test variable offset stack access
	bpf: track spill/fill of constants
	selftests/bpf: fix tests due to const spill/fill
	bpf: Introduce BPF nospec instruction for mitigating Spectre v4
	bpf: Fix leakage due to insufficient speculative store bypass mitigation
	bpf: verifier: Allocate idmap scratch in verifier env
	bpf: Fix pointer arithmetic mask tightening under state pruning
	tools/thermal/tmon: Add cross compiling support
	soc: aspeed: lpc-ctrl: Fix boundary check for mmap
	arm64: head: avoid over-mapping in map_memory
	crypto: public_key: fix overflow during implicit conversion
	block: bfq: fix bfq_set_next_ioprio_data()
	power: supply: max17042: handle fails of reading status register
	dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc()
	VMCI: fix NULL pointer dereference when unmapping queue pair
	media: uvc: don't do DMA on stack
	media: rc-loopback: return number of emitters rather than error
	libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs
	ARM: 9105/1: atags_to_fdt: don't warn about stack size
	PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported
	PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure
	PCI: xilinx-nwl: Enable the clock through CCF
	PCI: aardvark: Increase polling delay to 1.5s while waiting for PIO response
	PCI: aardvark: Fix masking and unmasking legacy INTx interrupts
	HID: input: do not report stylus battery state as "full"
	RDMA/iwcm: Release resources if iw_cm module initialization fails
	docs: Fix infiniband uverbs minor number
	pinctrl: samsung: Fix pinctrl bank pin count
	vfio: Use config not menuconfig for VFIO_NOIOMMU
	powerpc/stacktrace: Include linux/delay.h
	openrisc: don't printk() unconditionally
	pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_entry()
	scsi: qedi: Fix error codes in qedi_alloc_global_queues()
	platform/x86: dell-smbios-wmi: Add missing kfree in error-exit from run_smbios_call
	fscache: Fix cookie key hashing
	f2fs: fix to account missing .skipped_gc_rwsem
	f2fs: fix to unmap pages from userspace process in punch_hole()
	MIPS: Malta: fix alignment of the devicetree buffer
	userfaultfd: prevent concurrent API initialization
	media: dib8000: rewrite the init prbs logic
	crypto: mxs-dcp - Use sg_mapping_iter to copy data
	PCI: Use pci_update_current_state() in pci_enable_device_flags()
	tipc: keep the skb in rcv queue until the whole data is read
	iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
	ARM: dts: qcom: apq8064: correct clock names
	video: fbdev: kyro: fix a DoS bug by restricting user input
	netlink: Deal with ESRCH error in nlmsg_notify()
	Smack: Fix wrong semantics in smk_access_entry()
	usb: host: fotg210: fix the endpoint's transactional opportunities calculation
	usb: host: fotg210: fix the actual_length of an iso packet
	usb: gadget: u_ether: fix a potential null pointer dereference
	usb: gadget: composite: Allow bMaxPower=0 if self-powered
	staging: board: Fix uninitialized spinlock when attaching genpd
	tty: serial: jsm: hold port lock when reporting modem line changes
	drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex
	bpf/tests: Fix copy-and-paste error in double word test
	bpf/tests: Do not PASS tests without actually testing the result
	video: fbdev: asiliantfb: Error out if 'pixclock' equals zero
	video: fbdev: kyro: Error out if 'pixclock' equals zero
	video: fbdev: riva: Error out if 'pixclock' equals zero
	ipv4: ip_output.c: Fix out-of-bounds warning in ip_copy_addrs()
	flow_dissector: Fix out-of-bounds warnings
	s390/jump_label: print real address in a case of a jump label bug
	serial: 8250: Define RX trigger levels for OxSemi 950 devices
	xtensa: ISS: don't panic in rs_init
	hvsi: don't panic on tty_register_driver failure
	serial: 8250_pci: make setup_port() parameters explicitly unsigned
	staging: ks7010: Fix the initialization of the 'sleep_status' structure
	samples: bpf: Fix tracex7 error raised on the missing argument
	ata: sata_dwc_460ex: No need to call phy_exit() befre phy_init()
	Bluetooth: skip invalid hci_sync_conn_complete_evt
	bonding: 3ad: fix the concurrency between __bond_release_one() and bond_3ad_state_machine_handler()
	ASoC: Intel: bytcr_rt5640: Move "Platform Clock" routes to the maps for the matching in-/output
	media: imx258: Rectify mismatch of VTS value
	media: imx258: Limit the max analogue gain to 480
	media: v4l2-dv-timings.c: fix wrong condition in two for-loops
	media: TDA1997x: fix tda1997x_query_dv_timings() return value
	media: tegra-cec: Handle errors of clk_prepare_enable()
	ARM: dts: imx53-ppd: Fix ACHC entry
	arm64: dts: qcom: sdm660: use reg value for memory node
	net: ethernet: stmmac: Do not use unreachable() in ipq806x_gmac_probe()
	Bluetooth: schedule SCO timeouts with delayed_work
	Bluetooth: avoid circular locks in sco_sock_connect
	gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()
	ARM: tegra: tamonten: Fix UART pad setting
	Bluetooth: Fix handling of LE Enhanced Connection Complete
	serial: sh-sci: fix break handling for sysrq
	tcp: enable data-less, empty-cookie SYN with TFO_SERVER_COOKIE_NOT_REQD
	rpc: fix gss_svc_init cleanup on failure
	staging: rts5208: Fix get_ms_information() heap buffer size
	gfs2: Don't call dlm after protocol is unmounted
	of: Don't allow __of_attached_node_sysfs() without CONFIG_SYSFS
	mmc: sdhci-of-arasan: Check return value of non-void funtions
	mmc: rtsx_pci: Fix long reads when clock is prescaled
	selftests/bpf: Enlarge select() timeout for test_maps
	mmc: core: Return correct emmc response in case of ioctl error
	cifs: fix wrong release in sess_alloc_buffer() failed path
	Revert "USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set"
	usb: musb: musb_dsps: request_irq() after initializing musb
	usbip: give back URBs for unsent unlink requests during cleanup
	usbip:vhci_hcd USB port can get stuck in the disabled state
	ASoC: rockchip: i2s: Fix regmap_ops hang
	ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B
	parport: remove non-zero check on count
	ath9k: fix OOB read ar9300_eeprom_restore_internal
	ath9k: fix sleeping in atomic context
	net: fix NULL pointer reference in cipso_v4_doi_free
	net: w5100: check return value after calling platform_get_resource()
	parisc: fix crash with signals and alloca
	ovl: fix BUG_ON() in may_delete() when called from ovl_cleanup()
	scsi: BusLogic: Fix missing pr_cont() use
	scsi: qla2xxx: Sync queue idx with queue_pair_map idx
	cpufreq: powernv: Fix init_chip_info initialization in numa=off
	mm/hugetlb: initialize hugetlb_usage in mm_init
	memcg: enable accounting for pids in nested pid namespaces
	platform/chrome: cros_ec_proto: Send command again when timeout occurs
	drm/amdgpu: Fix BUG_ON assert
	dm thin metadata: Fix use-after-free in dm_bm_set_read_only
	xen: reset legacy rtc flag for PV domU
	bnx2x: Fix enabling network interfaces without VFs
	arm64/sve: Use correct size when reinitialising SVE state
	PM: base: power: don't try to use non-existing RTC for storing data
	PCI: Add AMD GPU multi-function power dependencies
	x86/mm: Fix kern_addr_valid() to cope with existing but not present entries
	tipc: fix an use-after-free issue in tipc_recvmsg
	net-caif: avoid user-triggerable WARN_ON(1)
	ptp: dp83640: don't define PAGE0
	dccp: don't duplicate ccid when cloning dccp sock
	net/l2tp: Fix reference count leak in l2tp_udp_recv_core
	r6040: Restore MDIO clock frequency after MAC reset
	tipc: increase timeout in tipc_sk_enqueue()
	perf machine: Initialize srcline string member in add_location struct
	net/mlx5: Fix potential sleeping in atomic context
	events: Reuse value read using READ_ONCE instead of re-reading it
	net/af_unix: fix a data-race in unix_dgram_poll
	net: dsa: destroy the phylink instance on any error in dsa_slave_phy_setup
	tcp: fix tp->undo_retrans accounting in tcp_sacktag_one()
	qed: Handle management FW error
	ibmvnic: check failover_pending in login response
	net: hns3: pad the short tunnel frame before sending to hardware
	mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range()
	KVM: s390: index kvm->arch.idle_mask by vcpu_idx
	dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
	mfd: Don't use irq_create_mapping() to resolve a mapping
	PCI: Add ACS quirks for Cavium multi-function devices
	net: usb: cdc_mbim: avoid altsetting toggling for Telit LN920
	block, bfq: honor already-setup queue merges
	ethtool: Fix an error code in cxgb2.c
	NTB: perf: Fix an error code in perf_setup_inbuf()
	mfd: axp20x: Update AXP288 volatile ranges
	PCI: Fix pci_dev_str_match_path() alloc while atomic bug
	KVM: arm64: Handle PSCI resets before userspace touches vCPU state
	PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n
	mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
	ARC: export clear_user_page() for modules
	net: dsa: b53: Fix calculating number of switch ports
	netfilter: socket: icmp6: fix use-after-scope
	fq_codel: reject silly quantum parameters
	qlcnic: Remove redundant unlock in qlcnic_pinit_from_rom
	ip_gre: validate csum_start only on pull
	net: renesas: sh_eth: Fix freeing wrong tx descriptor
	s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant
	Linux 4.19.207

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I18108cb47ba9e95838ebe55aaabe34de345ee846
2021-09-25 14:26:55 +02:00
zhenwei pi
aab312696d crypto: public_key: fix overflow during implicit conversion
commit f985911b7bc75d5c98ed24d8aaa8b94c590f7c6a upstream.

Hit kernel warning like this, it can be reproduced by verifying 256
bytes datafile by keyctl command, run script:
RAWDATA=rawdata
SIGDATA=sigdata

modprobe pkcs8_key_parser

rm -rf *.der *.pem *.pfx
rm -rf $RAWDATA
dd if=/dev/random of=$RAWDATA bs=256 count=1

openssl req -nodes -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem \
  -subj "/C=CN/ST=GD/L=SZ/O=vihoo/OU=dev/CN=xx.com/emailAddress=yy@xx.com"

KEY_ID=`openssl pkcs8 -in key.pem -topk8 -nocrypt -outform DER | keyctl \
  padd asymmetric 123 @s`

keyctl pkey_sign $KEY_ID 0 $RAWDATA enc=pkcs1 hash=sha1 > $SIGDATA
keyctl pkey_verify $KEY_ID 0 $RAWDATA $SIGDATA enc=pkcs1 hash=sha1

Then the kernel reports:
 WARNING: CPU: 5 PID: 344556 at crypto/rsa-pkcs1pad.c:540
   pkcs1pad_verify+0x160/0x190
 ...
 Call Trace:
  public_key_verify_signature+0x282/0x380
  ? software_key_query+0x12d/0x180
  ? keyctl_pkey_params_get+0xd6/0x130
  asymmetric_key_verify_signature+0x66/0x80
  keyctl_pkey_verify+0xa5/0x100
  do_syscall_64+0x35/0xb0
  entry_SYSCALL_64_after_hwframe+0x44/0xae

The reason of this issue, in function 'asymmetric_key_verify_signature':
'.digest_size(u8) = params->in_len(u32)' leads overflow of an u8 value,
so use u32 instead of u8 for digest_size field. And reorder struct
public_key_signature, it saves 8 bytes on a 64-bit machine.

Cc: stable@vger.kernel.org
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-22 11:47:59 +02:00
Lucas Wei
b2bed6615a Merge android-4.19-stable (4.19.202) into android-msm-pixel-4.19-lts
Merge 4.19.202 into android-4.19-stable
Linux 4.19.202
    spi: mediatek: Fix fifo transfer
  * padata: add separate cpuhp node for CPUHP_PADATA_DEAD
      include/linux/padata.h
  * padata: validate cpumask without removed CPU during offline
      include/linux/cpuhotplug.h
    Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout"
    firmware: arm_scmi: Ensure drivers provide a probe function
    drm/i915: Ensure intel_engine_init_execlist() builds with Clang
  * Revert "Bluetooth: Shutdown controller after workqueues are flushed or cancelled"
      net/bluetooth/hci_core.c
  * bdi: add a ->dev_name field to struct backing_dev_info
      include/linux/backing-dev-defs.h
      mm/backing-dev.c
  * bdi: use bdi_dev_name() to get device name
      block/blk-cgroup.c
      include/trace/events/wbt.h
  * bdi: move bdi_dev_name out of line
      include/linux/backing-dev.h
      mm/backing-dev.c
  * net: Fix zero-copy head len calculation.
      net/core/skbuff.c
    qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
  * r8152: Fix potential PM refcount imbalance
      drivers/net/usb/r8152.c
    ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits
  * regulator: rt5033: Fix n_voltages settings for BUCK and LDO
      include/linux/mfd/rt5033-private.h
    btrfs: mark compressed range uptodate only if all bio succeed
    Merge 4.19.201 into android-4.19-stable
Linux 4.19.201
    i40e: Add additional info to PHY type error
    Revert "perf map: Fix dso->nsinfo refcounting"
    powerpc/pseries: Fix regression while building external modules
    can: hi311x: fix a signedness bug in hi3110_cmd()
    sis900: Fix missing pci_disable_device() in probe and remove
    tulip: windbond-840: Fix missing pci_disable_device() in probe and remove
  * sctp: fix return value check in __sctp_rcv_asconf_lookup
      net/sctp/input.c
    net/mlx5: Fix flow table chaining
  * net: llc: fix skb_over_panic
      include/net/llc_pdu.h
    mlx4: Fix missing error code in mlx4_load_one()
  * tipc: fix sleeping in tipc accept routine
      net/tipc/socket.c
    i40e: Fix log TC creation failure when max num of queues is exceeded
    i40e: Fix logic of disabling queues
    netfilter: nft_nat: allow to specify layer 4 protocol NAT only
  * netfilter: conntrack: adjust stop timestamp to real expiry value
      net/netfilter/nf_conntrack_core.c
  * cfg80211: Fix possible memory leak in function cfg80211_bss_update
      net/wireless/scan.c
    nfc: nfcsim: fix use after free during module unload
    NIU: fix incorrect error return, missed in previous revert
    can: esd_usb2: fix memory leak
    can: ems_usb: fix memory leak
    can: usb_8dev: fix memory leak
    can: mcba_usb_start(): add missing urb->transfer_dma initialization
    can: raw: raw_setsockopt(): fix raw_rcv panic for sock UAF
    ocfs2: issue zeroout to EOF blocks
    ocfs2: fix zero out valid data
    x86/kvm: fix vcpu-id indexed array sizes
    btrfs: fix rw device counting in __btrfs_free_extra_devids
    x86/asm: Ensure asm/proto.h can be included stand-alone
  * gro: ensure frag0 meets IP header alignment
      include/linux/skbuff.h
      net/core/dev.c
  * virtio_net: Do not pull payload in skb->head
      include/linux/virtio_net.h
    Merge 4.19.200 into android-4.19-stable
Linux 4.19.200
    ARM: dts: versatile: Fix up interrupt controller node names
    cifs: fix the out of range assignment to bit fields in parse_server_interfaces
    firmware: arm_scmi: Fix range check for the maximum number of pending messages
    firmware: arm_scmi: Fix possible scmi_linux_errmap buffer overflow
    hfs: add lock nesting notation to hfs_find_init
    hfs: fix high memory mapping in hfs_bnode_read
    hfs: add missing clean-up in hfs_fill_super
  * sctp: move 198 addresses from unusable to private scope
      include/net/sctp/constants.h
      net/sctp/protocol.c
  * net: annotate data race around sk_ll_usec
      include/net/busy_poll.h
      net/core/sock.c
    net/802/garp: fix memleak in garp_request_join()
    net/802/mrp: fix memleak in mrp_request_join()
  * workqueue: fix UAF in pwq_unbound_release_workfn()
      kernel/workqueue.c
  * af_unix: fix garbage collect vs MSG_PEEK
      net/unix/af_unix.c
  * net: split out functions related to registering inflight socket files
      include/net/af_unix.h
      net/Makefile
      net/unix/Kconfig
      net/unix/Makefile
      net/unix/af_unix.c
      net/unix/garbage.c
      net/unix/scm.c
      net/unix/scm.h
    KVM: x86: determine if an exception has an error code only when injecting it.
    iio: dac: ds4422/ds4424 drop of_node check
    selftest: fix build error in tools/testing/selftests/vm/userfaultfd.c
  * ANDROID: staging: ion: move buffer kmap from begin/end_cpu_access()
      drivers/staging/android/ion/ion.c
    Merge 4.19.199 into android-4.19-stable
Linux 4.19.199
  * xhci: add xhci_get_virt_ep() helper
      drivers/usb/host/xhci-ring.c
      drivers/usb/host/xhci.h
    spi: spi-fsl-dspi: Fix a resource leak in an error handling path
  * PCI: Mark AMD Navi14 GPU ATS as broken
      drivers/pci/quirks.c
    btrfs: compression: don't try to compress if we don't have enough pages
    iio: accel: bma180: Fix BMA25x bandwidth register values
    iio: accel: bma180: Use explicit member assignment
    net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear
    net: dsa: mv88e6xxx: use correct .stats_set_histogram() on Topaz
    KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped()
    KVM: do not allow mapping valid but non-reference-counted pages
    KVM: do not assume PTE is writable after follow_pfn
  * drm: Return -ENOTTY for non-drm ioctls
      drivers/gpu/drm/drm_ioctl.c
      include/drm/drm_ioctl.h
    nds32: fix up stack guard gap
    selftest: use mmap instead of posix_memalign to allocate memory
    ixgbe: Fix packet corruption due to missing DMA sync
    media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf()
  * tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop.
      kernel/trace/ring_buffer.c
    usb: dwc2: gadget: Fix sending zero length packet in DDMA mode.
    USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
    USB: serial: cp210x: fix comments for GE CS1000
    USB: serial: option: add support for u-blox LARA-R6 family
    usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop()
    usb: max-3421: Prevent corruption of freed memory
    USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS
  * usb: hub: Fix link power management max exit latency (MEL) calculations
      drivers/usb/core/hub.c
  * usb: hub: Disable USB 3 device initiated lpm if exit latency is too high
      drivers/usb/core/hub.c
    KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow
  * xhci: Fix lost USB 2 remote wake
      drivers/usb/host/xhci-hub.c
    ALSA: sb: Fix potential ABBA deadlock in CSP driver
  * ALSA: usb-audio: Add registration quirk for JBL Quantum headsets
      sound/usb/quirks.c
    s390/ftrace: fix ftrace_update_ftrace_func implementation
    Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one"
  * proc: Avoid mixing integer types in mem_rw()
      fs/proc/base.c
    drm/panel: raspberrypi-touchscreen: Prevent double-free
  * net: sched: cls_api: Fix the the wrong parameter
      net/sched/cls_api.c
  * sctp: update active_key for asoc when old key is being replaced
      net/sctp/auth.c
  * Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem"
      drivers/usb/core/quirks.c
    nvme-pci: don't WARN_ON in nvme_reset_work if ctrl.state is not RESETTING
    net/sched: act_skbmod: Skip non-Ethernet packets
  * net/tcp_fastopen: fix data races around tfo_active_disable_stamp
      net/ipv4/tcp_fastopen.c
    spi: cadence: Correct initialisation of runtime PM again
    scsi: target: Fix protect handling in WRITE SAME(32)
    scsi: iscsi: Fix iface sysfs attr detection
    netrom: Decrease sock refcount when sock timers expire
    KVM: PPC: Fix kvm_arch_vcpu_ioctl vcpu_load leak
    net: decnet: Fix sleeping inside in af_decnet
    net: fix uninit-value in caif_seqpkt_sendmsg
    bpftool: Check malloc return value in mount_bpffs_for_pin
    s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1]
    liquidio: Fix unintentional sign extension issue on left shift of u16
    spi: mediatek: fix fifo rx mode
    perf probe-file: Delete namelist in del_events() on the error path
    perf test bpf: Free obj_buf
    perf lzma: Close lzma stream on exit
    perf dso: Fix memory leak in dso__new_map()
    perf probe: Fix dso->nsinfo refcounting
    perf map: Fix dso->nsinfo refcounting
    nvme-pci: do not call nvme_dev_remove_admin from nvme_remove
  * ipv6: fix 'disable_policy' for fwd packets
      net/ipv6/ip6_output.c
    igb: Fix position of assignment to *ring
    igb: Check if num of q_vectors is smaller than max before array access
    iavf: Fix an error handling path in 'iavf_probe()'
    e1000e: Fix an error handling path in 'e1000_probe()'
    fm10k: Fix an error handling path in 'fm10k_probe()'
    igb: Fix an error handling path in 'igb_probe()'
    ixgbe: Fix an error handling path in 'ixgbe_probe()'
    igb: Fix use-after-free error during reset
  * net: ip_tunnel: fix mtu calculation for ETHER tunnel devices
      net/ipv4/ip_tunnel.c
  * udp: annotate data races around unix_sk(sk)->gso_size
      net/ipv4/udp.c
      net/ipv6/udp.c
    bpftool: Properly close va_list 'ap' by va_end() on error
  * ipv6: tcp: drop silly ICMPv6 packet too big messages
      net/ipv4/tcp_output.c
      net/ipv6/tcp_ipv6.c
  * tcp: annotate data races around tp->mtu_info
      net/ipv4/tcp_ipv4.c
      net/ipv6/tcp_ipv6.c
  * dma-buf/sync_file: Don't leak fences on merge failure
      drivers/dma-buf/sync_file.c
  * net: validate lwtstate->data before returning from skb_tunnel_info()
      include/net/dst_metadata.h
  * net: send SYNACK packet with accepted fwmark
      net/ipv6/tcp_ipv6.c
    net: ti: fix UAF in tlan_remove_one
    net: qcom/emac: fix UAF in emac_remove
    net: moxa: fix UAF in moxart_mac_probe
    net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
  * net: bridge: sync fdb to new unicast-filtering ports
      net/bridge/br_if.c
  * netfilter: ctnetlink: suspicious RCU usage in ctnetlink_dump_helpinfo
      net/netfilter/nf_conntrack_netlink.c
  * net: ipv6: fix return value of ip6_skb_dst_mtu
      include/net/ip6_route.h
      net/ipv6/xfrm6_output.c
    net: dsa: mv88e6xxx: enable .rmu_disable() on Topaz
    dm writecache: fix writing beyond end of underlying device when shrinking
    dm writecache: return the exact table values that were set
  * mm: slab: fix kmem_cache_create failed when sysfs node not destroyed
      mm/slab_common.c
  * sched/fair: Fix CFS bandwidth hrtimer expiry type
      kernel/sched/fair.c
    scsi: libfc: Fix array index out of bound exception
    scsi: libsas: Add LUN number check in .slave_alloc callback
    scsi: aic7xxx: Fix unintentional sign extension issue on left shift of u8
    rtc: max77686: Do not enforce (incorrect) interrupt trigger type
  * kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set
      scripts/mkcompile_h
  * thermal/core: Correct function name thermal_zone_device_unregister()
      drivers/thermal/thermal_core.c
    arm64: dts: ls208xa: remove bus-num from dspi node
    soc/tegra: fuse: Fix Tegra234-only builds
    ARM: dts: stm32: move stmmac axi config in ethernet node on stm32mp15
    ARM: dts: stm32: fix i2c node name on stm32f746 to prevent warnings
    ARM: dts: rockchip: fix supply properties in io-domains nodes
    arm64: dts: juno: Update SCPI nodes as per the YAML schema
    ARM: dts: stm32: fix timer nodes on STM32 MCU to prevent warnings
    ARM: dts: stm32: fix RCC node name on stm32f429 MCU
    ARM: dts: stm32: fix gpio-keys node on STM32 MCU boards
    rtc: mxc_v2: add missing MODULE_DEVICE_TABLE
    ARM: imx: pm-imx5: Fix references to imx5_cpu_suspend_info
    ARM: dts: imx6: phyFLEX: Fix UART hardware flow control
    ARM: dts: Hurricane 2: Fix NAND nodes names
    ARM: dts: BCM63xx: Fix NAND nodes names
    ARM: NSP: dts: fix NAND nodes names
    ARM: Cygnus: dts: fix NAND nodes names
    ARM: brcmstb: dts: fix NAND nodes names
    reset: ti-syscon: fix to_ti_syscon_reset_data macro
    arm64: dts: rockchip: Fix power-controller node names for rk3328
    ARM: dts: rockchip: Fix power-controller node names for rk3288
    ARM: dts: rockchip: Fix IOMMU nodes properties on rk322x
    ARM: dts: rockchip: Fix the timer clocks order
    arm64: dts: rockchip: fix pinctrl sleep nodename for rk3399.dtsi
    ARM: dts: rockchip: fix pinctrl sleep nodename for rk3036-kylin and rk3288
    ARM: dts: gemini: add device_type on pci
    ARM: dts: gemini: rename mdio to the right name
  * ANDROID: generate_initcall_order.pl: Use two dash long options for llvm-nm
      scripts/generate_initcall_order.pl
  * Revert "media: subdev: disallow ioctl for saa6588/davinci"
      include/media/v4l2-subdev.h
  * ANDROID: GKI: fix up crc change in ip.h
      include/net/ip.h
    Merge 4.19.198 into android-4.19-stable
Linux 4.19.198
  * seq_file: disallow extremely large seq buffer allocations
      fs/seq_file.c
    scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()
  * net: bridge: multicast: fix PIM hello router port marking race
      net/bridge/br_multicast.c
    MIPS: vdso: Invalid GIC access through VDSO
    mips: disable branch profiling in boot/decompress.o
    mips: always link byteswap helpers into decompressor
    scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe()
    ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery
    ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems
    ARM: dts: imx6q-dhcom: Fix ethernet reset time properties
    ARM: dts: am437x: align ti,pindir-d0-out-d1-in property with dt-shema
    ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema
    memory: fsl_ifc: fix leak of private memory on probe failure
    memory: fsl_ifc: fix leak of IO mapping on probe failure
  * reset: bail if try_module_get() fails
      drivers/reset/core.c
    ARM: dts: BCM5301X: Fixup SPI binding
    ARM: dts: r8a7779, marzen: Fix DU clock names
    arm64: dts: renesas: v3msk: Fix memory size
  * rtc: fix snprintf() checking in is_rtc_hctosys()
      drivers/rtc/rtc-proc.c
    memory: atmel-ebi: add missing of_node_put for loop iteration
    ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4
    ARM: dts: exynos: fix PWM LED max brightness on Odroid HC1
    ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3
    reset: a10sr: add missing of_match_table reference
    hexagon: use common DISCARDS macro
    NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times
    ALSA: isa: Fix error return code in snd_cmi8330_probe()
    virtio_net: move tx vq operation under tx queue lock
    x86/fpu: Limit xstate copy size in xstateregs_set()
    PCI: iproc: Support multi-MSI only on uniprocessor kernel
    PCI: iproc: Fix multi-MSI base vector number allocation
    ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode
    nfs: fix acl memory leak of posix_acl_create()
    watchdog: aspeed: fix hardware timeout calculation
    um: fix error return code in winch_tramp()
    um: fix error return code in slip_open()
    NFSv4: Initialise connection to the server in nfs4_alloc_client()
  * power: supply: rt5033_battery: Fix device tree enumeration
      drivers/power/supply/Kconfig
    PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun
  * f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs
      fs/f2fs/super.c
    virtio_console: Assure used length from device is limited
    virtio_net: Fix error handling in virtnet_restore()
    virtio-blk: Fix memory leak among suspend/resume procedure
    ACPI: video: Add quirk for the Dell Vostro 3350
    ACPI: AMBA: Fix resource name in /proc/iomem
    pwm: tegra: Don't modify HW state in .remove callback
    power: supply: ab8500: add missing MODULE_DEVICE_TABLE
    power: supply: charger-manager: add missing MODULE_DEVICE_TABLE
  * NFS: nfs_find_open_context() may only select open files
      include/linux/nfs_fs.h
    ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty
    orangefs: fix orangefs df output.
    PCI: tegra: Add missing MODULE_DEVICE_TABLE
    x86/fpu: Return proper error codes from user access functions
    watchdog: iTCO_wdt: Account for rebooting on second timeout
    watchdog: Fix possible use-after-free by calling del_timer_sync()
    watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff()
    watchdog: Fix possible use-after-free in wdt_startup()
    ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1
    power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE
    power: supply: max17042: Do not enforce (incorrect) interrupt trigger type
    power: supply: ab8500: Avoid NULL pointers
    pwm: spear: Don't modify HW state in .remove callback
  * lib/decompress_unlz4.c: correctly handle zero-padding around initrds.
      lib/decompress_unlz4.c
  * i2c: core: Disable client irq on reboot/shutdown
      drivers/i2c/i2c-core-base.c
    intel_th: Wait until port is in reset before programming it
    staging: rtl8723bs: fix macro value for 2.4Ghz only device
    ALSA: hda: Add IRQ check for platform_get_irq()
    backlight: lm3630a: Fix return code of .update_status() callback
    powerpc/boot: Fixup device-tree on little endian
    usb: gadget: hid: fix error return code in hid_bind()
  * usb: gadget: f_hid: fix endianness issue with descriptors
      drivers/usb/gadget/function/f_hid.c
  * ALSA: bebob: add support for ToneWeal FW66
      sound/firewire/Kconfig
    Input: hideep - fix the uninitialized use in hideep_nvm_unlock()
  * ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()
      sound/soc/soc-core.c
    gpio: pca953x: Add support for the On Semi pca9655
    selftests/powerpc: Fix "no_handler" EBB selftest
    ALSA: ppc: fix error return code in snd_pmac_probe()
    gpio: zynq: Check return value of pm_runtime_get_sync
    powerpc/ps3: Add dma_mask to ps3_dma_region
    ALSA: sb: Fix potential double-free of CSP mixer elements
    selftests: timers: rtcpie: skip test if default RTC device does not exist
    s390/sclp_vt220: fix console name to match device
    mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE
    scsi: qedi: Fix null ref during abort handling
    scsi: iscsi: Fix shost->max_id use
  * scsi: iscsi: Fix conn use after free during resets
      include/scsi/libiscsi.h
  * scsi: iscsi: Add iscsi_cls_conn refcount helpers
      include/scsi/scsi_transport_iscsi.h
    fs/jfs: Fix missing error code in lmLogInit()
    scsi: scsi_dh_alua: Check for negative result value
    tty: serial: 8250: serial_cs: Fix a memory leak in error handling path
    ALSA: ac97: fix PM reference leak in ac97_bus_remove()
  * scsi: core: Cap scsi_host cmd_per_lun at can_queue
      drivers/scsi/hosts.c
    scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs
    scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology
    w1: ds2438: fixing bug that would always get page0
  * Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro"
      sound/firewire/Kconfig
    misc/libmasm/module: Fix two use after free in ibmasm_init_one
    tty: serial: fsl_lpuart: fix the potential risk of division or modulo by zero
    PCI: aardvark: Fix kernel panic during PIO transfer
    PCI: aardvark: Don't rely on jiffies while holding spinlock
    tracing: Do not reference char * as a string in histograms
  * scsi: core: Fix bad pointer dereference when ehandler kthread is invalid
      drivers/scsi/hosts.c
    KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run()
    KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled
  * smackfs: restrict bytes count in smk_set_cipso()
      security/smack/smackfs.c
    jfs: fix GPF in diFree
    pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq()
    media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K
    media: gspca/sunplus: fix zero-length control requests
    media: gspca/sq905: fix control-request direction
    media: zr364xx: fix memory leak in zr364xx_start_readpipe
    media: dtv5100: fix control-request directions
  * media: subdev: disallow ioctl for saa6588/davinci
      include/media/v4l2-subdev.h
    PCI: aardvark: Fix checking for PIO Non-posted Request
  * PCI: Leave Apple Thunderbolt controllers on for s2idle or standby
      drivers/pci/quirks.c
    dm btree remove: assign new_root only when removal succeeds
  * coresight: tmc-etf: Fix global-out-of-bounds in tmc_update_etf_buffer()
      drivers/hwtracing/coresight/coresight-tmc-etf.c
    ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe
  * tracing: Resize tgid_map to pid_max, not PID_MAX_DEFAULT
      kernel/trace/trace.c
  * tracing: Simplify & fix saved_tgids logic
      kernel/trace/trace.c
  * seq_buf: Fix overflow in seq_buf_putmem_hex()
      lib/seq_buf.c
  * power: supply: ab8500: Fix an old bug
      include/linux/mfd/abx500/ux500_chargalg.h
    ipmi/watchdog: Stop watchdog timer when the current action is 'none'
    qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute
    ASoC: tegra: Set driver_name=tegra for all machine drivers
  * clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround
      drivers/clocksource/arm_arch_timer.c
  * cpu/hotplug: Cure the cpusets trainwreck
      kernel/cpu.c
    ata: ahci_sunxi: Disable DIPM
    mmc: core: Allow UHS-I voltage switch for SDSC cards if supported
    mmc: core: clear flags before allowing to retune
    mmc: sdhci: Fix warning message when accessing RPMB in HS400 mode
    drm/msm/mdp4: Fix modifier support enabling
    pinctrl/amd: Add device HID for new AMD GPIO controller
    drm/amd/display: fix incorrrect valid irq check
    drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()
  * usb: gadget: f_fs: Fix setting of device and driver data cross-references
      drivers/usb/gadget/function/f_fs.c
    powerpc/barrier: Avoid collision with clang's __lwsync macro
  * fuse: reject internal errno
      fs/fuse/dev.c
    serial: mvebu-uart: fix calculation of clock divisor
    serial: mvebu-uart: clarify the baud rate derivation
  * bdi: Do not use freezable workqueue
      mm/backing-dev.c
  * fscrypt: don't ignore minor_hash when hash is 0
      fs/crypto/fname.c
    MIPS: set mips32r5 for virt extensions
  * sctp: add size validation when walking chunks
      net/sctp/input.c
  * sctp: validate from_addr_param return
      include/net/sctp/structs.h
      net/sctp/bind_addr.c
      net/sctp/input.c
      net/sctp/ipv6.c
      net/sctp/protocol.c
      net/sctp/sm_make_chunk.c
    Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc.
  * Bluetooth: Shutdown controller after workqueues are flushed or cancelled
      net/bluetooth/hci_core.c
  * Bluetooth: Fix the HCI to MGMT status conversion table
      net/bluetooth/mgmt.c
    RDMA/cma: Fix rdma_resolve_route() memory leak
  * net: ip: avoid OOM kills with large UDP sends over loopback
      net/ipv4/ip_output.c
      net/ipv6/ip6_output.c
    media, bpf: Do not copy more entries than user space requested
  * wireless: wext-spy: Fix out-of-bounds warning
      net/wireless/wext-spy.c
    sfc: error code if SRIOV cannot be disabled
    sfc: avoid double pci_remove of VFs
    iwlwifi: pcie: free IML DMA memory allocation
    iwlwifi: mvm: don't change band on bound PHY contexts
    RDMA/rxe: Don't overwrite errno from ib_umem_get()
    vsock: notify server to shutdown when client has pending signal
    atm: nicstar: register the interrupt handler in the right place
    atm: nicstar: use 'dma_free_coherent' instead of 'kfree'
    MIPS: add PMD table accounting into MIPS'pmd_alloc_one
    rtl8xxxu: Fix device info for RTL8192EU devices
  * net: fix mistake path for netdev_features_strings
      include/linux/netdev_features.h
      include/uapi/linux/ethtool.h
    cw1200: add missing MODULE_DEVICE_TABLE
    wl1251: Fix possible buffer overflow in wl1251_cmd_scan
    wlcore/wl12xx: Fix wl12xx get_mac error if device is in ELP
  * xfrm: Fix error reporting in xfrm_state_construct.
      net/xfrm/xfrm_user.c
  * selinux: use __GFP_NOWARN with GFP_NOWAIT in the AVC
      security/selinux/avc.c
    fjes: check return value after calling platform_get_resource()
    net: micrel: check return value after calling platform_get_resource()
    net: mvpp2: check return value after calling platform_get_resource()
    net: bcmgenet: check return value after calling platform_get_resource()
    virtio_net: Remove BUG() to avoid machine dead
    ice: set the value of global config lock timeout longer
    pinctrl: mcp23s08: fix race condition in irq handler
    dm space maps: don't reset space map allocation cursor when committing
    RDMA/cxgb4: Fix missing error code in create_qp()
  * ipv6: use prandom_u32() for ID generation
      net/ipv6/output_core.c
    clk: tegra: Ensure that PLLU configuration is applied properly
    clk: renesas: r8a77995: Add ZA2 clock
    e100: handle eeprom as little endian
    udf: Fix NULL pointer dereference in udf_symlink function
    drm/virtio: Fix double free on probe failure
    reiserfs: add check for invalid 1st journal block
  * net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT
      net/core/dev.c
    atm: nicstar: Fix possible use-after-free in nicstar_cleanup()
    mISDN: fix possible use-after-free in HFC_cleanup()
    atm: iphase: fix possible use-after-free in ia_module_exit()
    hugetlb: clear huge pte during flush function on mips platform
    drm/amd/display: fix use_max_lb flag for 420 pixel formats
    net: pch_gbe: Use proper accessors to BE data in pch_ptp_match()
    drm/amd/amdgpu/sriov disable all ip hw status by default
  * drm/zte: Don't select DRM_KMS_FB_HELPER
      drivers/gpu/drm/zte/Kconfig
  * drm/mxsfb: Don't select DRM_KMS_FB_HELPER
      drivers/gpu/drm/mxsfb/Kconfig
    mmc: vub3000: fix control-request direction
    mmc: block: Disable CMDQ on the ioctl path
    perf llvm: Return -ENOMEM when asprintf() fails
    selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random
    mm/huge_memory.c: don't discard hugepage if other processes are mapping it
    vfio/pci: Handle concurrent vma faults
    arm64: dts: marvell: armada-37xx: Fix reg for standard variant of UART
    serial: mvebu-uart: correctly calculate minimal possible baudrate
    powerpc: Offline CPU in stop_this_cpu()
    leds: ktd2692: Fix an error handling path
    leds: as3645a: Fix error return code in as3645a_parse_node()
  * configfs: fix memleak in configfs_release_bin_file
      fs/configfs/file.c
    ASoC: atmel-i2s: Fix usage of capture and playback at the same time
    extcon: max8997: Add missing modalias string
    extcon: sm5502: Drop invalid register write in sm5502_reg_data
    phy: ti: dm816x: Fix the error handling path in 'dm816x_usb_phy_probe()
    scsi: mpt3sas: Fix error return value in _scsih_expander_add()
    mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_resume()
  * of: Fix truncation of memory sizes on 32-bit platforms
      drivers/of/fdt.c
      drivers/of/of_reserved_mem.c
    ASoC: cs42l42: Correct definition of CS42L42_ADC_PDN_MASK
    iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    serial: 8250: Actually allow UPF_MAGIC_MULTIPLIER baud rates
    staging: mt7621-dts: fix pci address for PCI memory range
    staging: gdm724x: check for overflow in gdm_lte_netif_rx()
    staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt()
    iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
    iio: adc: mxs-lradc: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: adc: hx711: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    eeprom: idt_89hpesx: Restore printing the unsupported fwnode name
    eeprom: idt_89hpesx: Put fwnode in matching case during ->probe()
    s390: appldata depends on PROC_SYSCTL
    visorbus: fix error return code in visorchipset_init()
    fsi/sbefifo: Fix reset timeout
    fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE
    fsi: scom: Reset the FSI2PIB engine for any error
    fsi: core: Fix return of error values on failures
    scsi: FlashPoint: Rename si_flags field
    tty: nozomi: Fix the error handling path of 'nozomi_card_init()'
    char: pcmcia: error out if 'num_bytes_read' is greater than 4 in set_protocol()
    Input: hil_kbd - fix error return code in hil_dev_connect()
    ASoC: rsnd: tidyup loop on rsnd_adg_clk_query()
    ASoC: hisilicon: fix missing clk_disable_unprepare() on error in hi6210_i2s_startup()
    iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
    iio: light: tcs3472: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: light: tcs3414: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: light: isl29125: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: prox: as3935: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: prox: pulsed-light: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: prox: srf08: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: gyro: bmg160: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: adc: vf610: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: adc: ti-ads1015: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: accel: kxcjk-1013: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: accel: hid: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: accel: bma180: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
    iio: adis_buffer: do not return ints in irq handlers
    mwifiex: re-fix for unaligned accesses
    tty: nozomi: Fix a resource leak in an error handling function
    RDMA/mlx5: Don't access NULL-cleared mpi pointer
    net: sched: fix warning in tcindex_alloc_perfect_hash
  * net: lwtunnel: handle MTU calculation in forwading
      include/net/ip.h
      include/net/ip6_route.h
      net/ipv4/route.c
  * writeback: fix obtain a reference to a freeing memcg css
      fs/fs-writeback.c
  * Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event
      net/bluetooth/hci_event.c
  * Bluetooth: mgmt: Fix slab-out-of-bounds in tlv_data_is_valid
      net/bluetooth/mgmt.c
  * ipv6: fix out-of-bound access in ip6_parse_tlv()
      net/ipv6/exthdrs.c
    ibmvnic: free tx_pool if tso_pool alloc fails
    Revert "ibmvnic: remove duplicate napi_schedule call in open function"
    i40e: Fix autoneg disabling for non-10GBaseT links
    i40e: Fix error handling in i40e_vsi_open
  * bpf: Do not change gso_size during bpf_skb_change_proto()
      net/core/filter.c
  * ipv6: exthdrs: do not blindly use init_net
      net/ipv6/exthdrs.c
    net: bcmgenet: Fix attaching to PYH failed on RPi 4B
    mac80211: remove iwlwifi specific workaround NDPs of null_response
    ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl()
    ieee802154: hwsim: Fix memory leak in hwsim_add_one
  * net/ipv4: swap flow ports when validating source
      net/ipv4/fib_frontend.c
    vxlan: add missing rcu_read_lock() in neigh_reduce()
    pkt_sched: sch_qfq: fix qfq_change_class() error path
    net: ethernet: ezchip: fix error handling
    net: ethernet: ezchip: fix UAF in nps_enet_remove
    net: ethernet: aeroflex: fix UAF in greth_of_remove
    samples/bpf: Fix the error return code of xdp_redirect's main()
    RDMA/rxe: Fix qp reference counting for atomic ops
    netfilter: nft_tproxy: restrict support to TCP and UDP transport protocols
    netfilter: nft_osf: check for TCP packet before further processing
    netfilter: nft_exthdr: check for IPv6 packet before further processing
    RDMA/mlx5: Don't add slave port to unaffiliated list
  * netlabel: Fix memory leak in netlbl_mgmt_add_common
      net/netlabel/netlabel_mgmt.c
    ath10k: Fix an error code in ath10k_add_interface()
    brcmsmac: mac80211_if: Fix a resource leak in an error handling path
    brcmfmac: correctly report average RSSI in station info
    brcmfmac: fix setting of station info chains bitmask
    ssb: Fix error return code in ssb_bus_scan()
    wcn36xx: Move hal_buf allocation to devm_kmalloc in probe
    ieee802154: hwsim: Fix possible memory leak in hwsim_subscribe_all_others
  * wireless: carl9170: fix LEDS build errors & warnings
      drivers/net/wireless/ath/carl9170/Kconfig
    tools/bpftool: Fix error return code in do_batch()
    drm: qxl: ensure surf.data is ininitialized
    RDMA/rxe: Fix failure during driver load
    ehea: fix error return code in ehea_restart_qps()
    drm/rockchip: cdn-dp-core: add missing clk_disable_unprepare() on error in cdn_dp_grf_write()
    net: pch_gbe: Propagate error from devm_gpio_request_one()
    net: mvpp2: Put fwnode in error case during ->probe()
    ocfs2: fix snprintf() checking
    blk-wbt: make sure throttle is enabled properly
  * blk-wbt: introduce a new disable state to prevent false positive by rwb_enabled()
      block/blk-wbt.h
    ACPI: sysfs: Fix a buffer overrun problem with description_show()
    crypto: nx - Fix RCU warning in nx842_OF_upd_status
    spi: spi-sun6i: Fix chipselect/clock bug
    btrfs: clear log tree recovering status if starting transaction fails
    hwmon: (max31790) Fix fan speed reporting for fan7..12
    hwmon: (max31722) Remove non-standard ACPI device IDs
    media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx
    mmc: usdhi6rol0: fix error return code in usdhi6_probe()
    media: siano: Fix out-of-bounds warnings in smscore_load_firmware_family2()
    media: gspca/gl860: fix zero-length control requests
    media: tc358743: Fix error return code in tc358743_probe_of()
    media: exynos4-is: Fix a use after free in isp_video_release
    pata_ep93xx: fix deferred probing
    media: rc: i2c: Fix an error message
    crypto: ccp - Fix a resource leak in an error handling path
    evm: fix writing <securityfs>/evm overflow
    pata_octeon_cf: avoid WARN_ON() in ata_host_activate()
    media: I2C: change 'RST' to "RSET" to fix multiple build errors
    pata_rb532_cf: fix deferred probing
    sata_highbank: fix deferred probing
    crypto: ux500 - Fix error return code in hash_hw_final()
    crypto: ixp4xx - dma_unmap the correct address
    media: s5p_cec: decrement usage count if disabled
    ia64: mca_drv: fix incorrect array size calculation
    HID: wacom: Correct base usage for capacitive ExpressKey status bits
    ACPI: tables: Add custom DSDT file as makefile prerequisite
  * clocksource: Retry clock read if long delays detected
      kernel/time/clocksource.c
    platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard()
    ACPI: bus: Call kobject_put() in acpi_init() error path
    ACPICA: Fix memory leak caused by _CID repair function
    fs: dlm: fix memory leak when fenced
  * random32: Fix implicit truncation warning in prandom_seed_state()
      include/linux/prandom.h
    fs: dlm: cancel work sync othercon
  * block_dump: remove block_dump feature in mark_inode_dirty()
      fs/fs-writeback.c
    ACPI: EC: Make more Asus laptops use ECDT _GPE
  * lib: vsprintf: Fix handling of number field widths in vsscanf
      lib/kstrtox.c
      lib/kstrtox.h
      lib/vsprintf.c
    hv_utils: Fix passing zero to 'PTR_ERR' warning
    ACPI: processor idle: Fix up C-state latency if not ordered
    EDAC/ti: Add missing MODULE_DEVICE_TABLE
  * HID: do not use down_interruptible() when unbinding devices
      drivers/hid/hid-core.c
    regulator: da9052: Ensure enough delay time for .set_voltage_time_sel
  * btrfs: disable build on platforms having page size 256K
      fs/btrfs/Kconfig
    btrfs: abort transaction if we fail to update the delayed inode
    btrfs: fix error handling in __btrfs_update_delayed_inode
    media: imx-csi: Skip first few frames from a BT.656 source
    media: siano: fix device register error path
    media: dvb_net: avoid speculation from net slot
  * crypto: shash - avoid comparing pointers to exported functions under CFI
      crypto/shash.c
      include/crypto/internal/hash.h
    mmc: via-sdmmc: add a check against NULL pointer dereference
    media: dvd_usb: memory leak in cinergyt2_fe_attach
    media: st-hva: Fix potential NULL pointer dereferences
    media: bt8xx: Fix a missing check bug in bt878_probe
  * media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release
      drivers/media/v4l2-core/v4l2-fh.c
    media: em28xx: Fix possible memory leak of em28xx struct
  * sched/fair: Fix ascii art by relpacing tabs
      kernel/sched/fair.c
    crypto: qat - remove unused macro in FW loader
    crypto: qat - check return code of qat_hal_rd_rel_reg()
    media: pvrusb2: fix warning in pvr2_i2c_core_done
    media: cobalt: fix race condition in setting HPD
    media: cpia2: fix memory leak in cpia2_usb_probe
    crypto: nx - add missing MODULE_DEVICE_TABLE
    regulator: uniphier: Add missing MODULE_DEVICE_TABLE
    spi: omap-100k: Fix the length judgment problem
    spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages()
    spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf'
  * spi: Make of_register_spi_device also set the fwnode
      drivers/spi/spi.c
  * fuse: check connected before queueing on fpq->io
      fs/fuse/dev.c
    evm: Refuse EVM_ALLOW_METADATA_WRITES only if an HMAC key is loaded
    evm: Execute evm_inode_init_security() only when an HMAC key is loaded
    powerpc/stacktrace: Fix spurious "stale" traces in raise_backtrace_ipi()
  * seq_buf: Make trace_seq_putmem_hex() support data longer than 8
      lib/seq_buf.c
  * tracepoint: Add tracepoint_probe_register_may_exist() for BPF tracing
      include/linux/tracepoint.h
      kernel/trace/bpf_trace.c
      kernel/tracepoint.c
    tracing/histograms: Fix parsing of "sym-offset" modifier
    rsi: fix AP mode with WPA failure due to encrypted EAPOL
    rsi: Assign beacon rate settings to the correct rate_info descriptor field
    ssb: sdio: Don't overwrite const buffer if block_write fails
    ath9k: Fix kernel NULL pointer dereference during ath_reset_internal()
    serial_cs: remove wrong GLOBETROTTER.cis entry
    serial_cs: Add Option International GSM-Ready 56K/ISDN modem
    serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
    iio: ltr501: ltr501_read_ps(): add missing endianness conversion
    iio: ltr501: ltr559: fix initialization of LTR501_ALS_CONTR
    iio: ltr501: mark register holding upper 8 bits of ALS_DATA{0,1} and PS_DATA as volatile, too
    iio: light: tcs3472: do not free unallocated IRQ
    rtc: stm32: Fix unbalanced clk_disable_unprepare() on probe error path
    s390/cio: dont call css_wait_for_slow_path() inside a lock
    SUNRPC: Should wake up the privileged task firstly.
    SUNRPC: Fix the batch tasks count wraparound.
    can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path
    can: gw: synchronize rcu operations before removing gw job entry
    can: bcm: delay release of struct bcm_op after synchronize_rcu()
  * ext4: use ext4_grp_locked_error in mb_find_extent
      fs/ext4/mballoc.c
  * ext4: fix avefreec in find_group_orlov
      fs/ext4/ialloc.c
  * ext4: remove check for zero nr_to_scan in ext4_es_scan()
      fs/ext4/extents_status.c
  * ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit
      fs/ext4/extents_status.c
  * ext4: return error code when ext4_fill_flex_info() fails
      fs/ext4/super.c
  * ext4: fix kernel infoleak via ext4_extent_header
      fs/ext4/extents.c
  * ext4: cleanup in-core orphan list if ext4_truncate() failed to get a transaction handle
      fs/ext4/super.c
    btrfs: clear defrag status of a root if starting transaction fails
    btrfs: send: fix invalid path for unlink operations after parent orphanization
    ARM: dts: at91: sama5d4: fix pinctrl muxing
    arm_pmu: Fix write counter incorrect in ARMv7 big-endian mode
    Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl
  * iov_iter_fault_in_readable() should do nothing in xarray case
      lib/iov_iter.c
    ntfs: fix validity check for file name attribute
  * xhci: solve a double free problem while doing s4
      drivers/usb/host/xhci-mem.c
  * usb: typec: Add the missed altmode_id_remove() in typec_register_altmode()
      drivers/usb/typec/class.c
  * usb: dwc3: Fix debugfs creation flow
      drivers/usb/dwc3/core.c
    USB: cdc-acm: blacklist Heimann USB Appset device
    usb: gadget: eem: fix echo command packet response issue
    net: can: ems_usb: fix use-after-free in ems_usb_disconnect()
    Input: usbtouchscreen - fix control-request directions
    media: dvb-usb: fix wrong definition
  * ALSA: usb-audio: Fix OOB access at proc output
      sound/usb/mixer.c
  * ALSA: usb-audio: fix rate on Ozone Z90 USB headset
      sound/usb/format.c
  * scsi: core: Retry I/O for Notify (Enable Spinup) Required error
      drivers/scsi/scsi_lib.c
  * Revert "clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940"
      include/linux/cpuhotplug.h
    Merge 4.19.197 into android-4.19-stable
Linux 4.19.197
  * clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940
      include/linux/cpuhotplug.h
    clocksource/drivers/timer-ti-dm: Prepare to handle dra7 timer wrap issue
    clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support
    ARM: OMAP: replace setup_irq() by request_irq()
    KVM: SVM: Call SEV Guest Decommission if ASID binding fails
    xen/events: reset active flag for lateeoi events later
  * kthread: prevent deadlock when kthread_mod_delayed_work() races with kthread_cancel_delayed_work_sync()
      kernel/kthread.c
  * kthread_worker: split code for canceling the delayed work timer
      kernel/kthread.c
    ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment
    KVM: SVM: Periodically schedule when unregistering regions on destroy
  * ext4: eliminate bogus error in ext4_data_block_valid_rcu()
      fs/ext4/block_validity.c
    drm/nouveau: fix dma_address check for CPU/GPU sync
    scsi: sr: Return appropriate error code when disk is ejected
  * mm, futex: fix shared futex pgoff on shmem huge page
      include/linux/hugetlb.h
      include/linux/pagemap.h
      kernel/futex.c
  * mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk()
      mm/page_vma_mapped.c
  * mm/thp: fix page_vma_mapped_walk() if THP mapped by ptes
      mm/page_vma_mapped.c
  * mm: page_vma_mapped_walk(): get vma_address_end() earlier
      mm/page_vma_mapped.c
  * mm: page_vma_mapped_walk(): use goto instead of while (1)
      mm/page_vma_mapped.c
  * mm: page_vma_mapped_walk(): add a level of indentation
      mm/page_vma_mapped.c
  * mm: page_vma_mapped_walk(): crossing page table boundary
      mm/page_vma_mapped.c
  * mm: page_vma_mapped_walk(): prettify PVMW_MIGRATION block
      mm/page_vma_mapped.c
  * mm: page_vma_mapped_walk(): use pmde for *pvmw->pmd
      mm/page_vma_mapped.c
  * mm: page_vma_mapped_walk(): settle PageHuge on entry
      mm/page_vma_mapped.c
  * mm: page_vma_mapped_walk(): use page for pvmw->page
      mm/page_vma_mapped.c
    mm: thp: replace DEBUG_VM BUG with VM_WARN when unmap fails for split
  * mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page()
      include/linux/mm.h
      mm/memory.c
      mm/truncate.c
  * mm/thp: fix page_address_in_vma() on file THP tails
      mm/rmap.c
  * mm/thp: fix vma_address() if virtual address below file offset
      mm/internal.h
      mm/page_vma_mapped.c
      mm/rmap.c
  * mm/thp: try_to_unmap() use TTU_SYNC for safe splitting
      include/linux/rmap.h
      mm/page_vma_mapped.c
      mm/rmap.c
  * mm/thp: make is_huge_zero_pmd() safe and quicker
      include/linux/huge_mm.h
  * mm/thp: fix __split_huge_pmd_locked() on shmem migration entry
      mm/pgtable-generic.c
  * mm/rmap: use page_not_mapped in try_to_unmap()
      mm/rmap.c
  * mm/rmap: remove unneeded semicolon in page_not_mapped()
      mm/rmap.c
  * mm: add VM_WARN_ON_ONCE_PAGE() macro
      include/linux/mmdebug.h

Bug: 196282886
Change-Id: I0af3abfa9aaa6da3e884f1a692da381e8e140bee
Signed-off-by: Lucas Wei <lucaswei@google.com>
2021-08-18 20:48:52 +08:00
Greg Kroah-Hartman
97fd50773c Merge 4.19.198 into android-4.19-stable
Changes in 4.19.198
	scsi: core: Retry I/O for Notify (Enable Spinup) Required error
	ALSA: usb-audio: fix rate on Ozone Z90 USB headset
	ALSA: usb-audio: Fix OOB access at proc output
	media: dvb-usb: fix wrong definition
	Input: usbtouchscreen - fix control-request directions
	net: can: ems_usb: fix use-after-free in ems_usb_disconnect()
	usb: gadget: eem: fix echo command packet response issue
	USB: cdc-acm: blacklist Heimann USB Appset device
	usb: dwc3: Fix debugfs creation flow
	usb: typec: Add the missed altmode_id_remove() in typec_register_altmode()
	xhci: solve a double free problem while doing s4
	ntfs: fix validity check for file name attribute
	iov_iter_fault_in_readable() should do nothing in xarray case
	Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl
	arm_pmu: Fix write counter incorrect in ARMv7 big-endian mode
	ARM: dts: at91: sama5d4: fix pinctrl muxing
	btrfs: send: fix invalid path for unlink operations after parent orphanization
	btrfs: clear defrag status of a root if starting transaction fails
	ext4: cleanup in-core orphan list if ext4_truncate() failed to get a transaction handle
	ext4: fix kernel infoleak via ext4_extent_header
	ext4: return error code when ext4_fill_flex_info() fails
	ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit
	ext4: remove check for zero nr_to_scan in ext4_es_scan()
	ext4: fix avefreec in find_group_orlov
	ext4: use ext4_grp_locked_error in mb_find_extent
	can: bcm: delay release of struct bcm_op after synchronize_rcu()
	can: gw: synchronize rcu operations before removing gw job entry
	can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path
	SUNRPC: Fix the batch tasks count wraparound.
	SUNRPC: Should wake up the privileged task firstly.
	s390/cio: dont call css_wait_for_slow_path() inside a lock
	rtc: stm32: Fix unbalanced clk_disable_unprepare() on probe error path
	iio: light: tcs3472: do not free unallocated IRQ
	iio: ltr501: mark register holding upper 8 bits of ALS_DATA{0,1} and PS_DATA as volatile, too
	iio: ltr501: ltr559: fix initialization of LTR501_ALS_CONTR
	iio: ltr501: ltr501_read_ps(): add missing endianness conversion
	serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
	serial_cs: Add Option International GSM-Ready 56K/ISDN modem
	serial_cs: remove wrong GLOBETROTTER.cis entry
	ath9k: Fix kernel NULL pointer dereference during ath_reset_internal()
	ssb: sdio: Don't overwrite const buffer if block_write fails
	rsi: Assign beacon rate settings to the correct rate_info descriptor field
	rsi: fix AP mode with WPA failure due to encrypted EAPOL
	tracing/histograms: Fix parsing of "sym-offset" modifier
	tracepoint: Add tracepoint_probe_register_may_exist() for BPF tracing
	seq_buf: Make trace_seq_putmem_hex() support data longer than 8
	powerpc/stacktrace: Fix spurious "stale" traces in raise_backtrace_ipi()
	evm: Execute evm_inode_init_security() only when an HMAC key is loaded
	evm: Refuse EVM_ALLOW_METADATA_WRITES only if an HMAC key is loaded
	fuse: check connected before queueing on fpq->io
	spi: Make of_register_spi_device also set the fwnode
	spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf'
	spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages()
	spi: omap-100k: Fix the length judgment problem
	regulator: uniphier: Add missing MODULE_DEVICE_TABLE
	crypto: nx - add missing MODULE_DEVICE_TABLE
	media: cpia2: fix memory leak in cpia2_usb_probe
	media: cobalt: fix race condition in setting HPD
	media: pvrusb2: fix warning in pvr2_i2c_core_done
	crypto: qat - check return code of qat_hal_rd_rel_reg()
	crypto: qat - remove unused macro in FW loader
	sched/fair: Fix ascii art by relpacing tabs
	media: em28xx: Fix possible memory leak of em28xx struct
	media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release
	media: bt8xx: Fix a missing check bug in bt878_probe
	media: st-hva: Fix potential NULL pointer dereferences
	media: dvd_usb: memory leak in cinergyt2_fe_attach
	mmc: via-sdmmc: add a check against NULL pointer dereference
	crypto: shash - avoid comparing pointers to exported functions under CFI
	media: dvb_net: avoid speculation from net slot
	media: siano: fix device register error path
	media: imx-csi: Skip first few frames from a BT.656 source
	btrfs: fix error handling in __btrfs_update_delayed_inode
	btrfs: abort transaction if we fail to update the delayed inode
	btrfs: disable build on platforms having page size 256K
	regulator: da9052: Ensure enough delay time for .set_voltage_time_sel
	HID: do not use down_interruptible() when unbinding devices
	EDAC/ti: Add missing MODULE_DEVICE_TABLE
	ACPI: processor idle: Fix up C-state latency if not ordered
	hv_utils: Fix passing zero to 'PTR_ERR' warning
	lib: vsprintf: Fix handling of number field widths in vsscanf
	ACPI: EC: Make more Asus laptops use ECDT _GPE
	block_dump: remove block_dump feature in mark_inode_dirty()
	fs: dlm: cancel work sync othercon
	random32: Fix implicit truncation warning in prandom_seed_state()
	fs: dlm: fix memory leak when fenced
	ACPICA: Fix memory leak caused by _CID repair function
	ACPI: bus: Call kobject_put() in acpi_init() error path
	platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard()
	clocksource: Retry clock read if long delays detected
	ACPI: tables: Add custom DSDT file as makefile prerequisite
	HID: wacom: Correct base usage for capacitive ExpressKey status bits
	ia64: mca_drv: fix incorrect array size calculation
	media: s5p_cec: decrement usage count if disabled
	crypto: ixp4xx - dma_unmap the correct address
	crypto: ux500 - Fix error return code in hash_hw_final()
	sata_highbank: fix deferred probing
	pata_rb532_cf: fix deferred probing
	media: I2C: change 'RST' to "RSET" to fix multiple build errors
	pata_octeon_cf: avoid WARN_ON() in ata_host_activate()
	evm: fix writing <securityfs>/evm overflow
	crypto: ccp - Fix a resource leak in an error handling path
	media: rc: i2c: Fix an error message
	pata_ep93xx: fix deferred probing
	media: exynos4-is: Fix a use after free in isp_video_release
	media: tc358743: Fix error return code in tc358743_probe_of()
	media: gspca/gl860: fix zero-length control requests
	media: siano: Fix out-of-bounds warnings in smscore_load_firmware_family2()
	mmc: usdhi6rol0: fix error return code in usdhi6_probe()
	media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx
	hwmon: (max31722) Remove non-standard ACPI device IDs
	hwmon: (max31790) Fix fan speed reporting for fan7..12
	btrfs: clear log tree recovering status if starting transaction fails
	spi: spi-sun6i: Fix chipselect/clock bug
	crypto: nx - Fix RCU warning in nx842_OF_upd_status
	ACPI: sysfs: Fix a buffer overrun problem with description_show()
	blk-wbt: introduce a new disable state to prevent false positive by rwb_enabled()
	blk-wbt: make sure throttle is enabled properly
	ocfs2: fix snprintf() checking
	net: mvpp2: Put fwnode in error case during ->probe()
	net: pch_gbe: Propagate error from devm_gpio_request_one()
	drm/rockchip: cdn-dp-core: add missing clk_disable_unprepare() on error in cdn_dp_grf_write()
	ehea: fix error return code in ehea_restart_qps()
	RDMA/rxe: Fix failure during driver load
	drm: qxl: ensure surf.data is ininitialized
	tools/bpftool: Fix error return code in do_batch()
	wireless: carl9170: fix LEDS build errors & warnings
	ieee802154: hwsim: Fix possible memory leak in hwsim_subscribe_all_others
	wcn36xx: Move hal_buf allocation to devm_kmalloc in probe
	ssb: Fix error return code in ssb_bus_scan()
	brcmfmac: fix setting of station info chains bitmask
	brcmfmac: correctly report average RSSI in station info
	brcmsmac: mac80211_if: Fix a resource leak in an error handling path
	ath10k: Fix an error code in ath10k_add_interface()
	netlabel: Fix memory leak in netlbl_mgmt_add_common
	RDMA/mlx5: Don't add slave port to unaffiliated list
	netfilter: nft_exthdr: check for IPv6 packet before further processing
	netfilter: nft_osf: check for TCP packet before further processing
	netfilter: nft_tproxy: restrict support to TCP and UDP transport protocols
	RDMA/rxe: Fix qp reference counting for atomic ops
	samples/bpf: Fix the error return code of xdp_redirect's main()
	net: ethernet: aeroflex: fix UAF in greth_of_remove
	net: ethernet: ezchip: fix UAF in nps_enet_remove
	net: ethernet: ezchip: fix error handling
	pkt_sched: sch_qfq: fix qfq_change_class() error path
	vxlan: add missing rcu_read_lock() in neigh_reduce()
	net/ipv4: swap flow ports when validating source
	ieee802154: hwsim: Fix memory leak in hwsim_add_one
	ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl()
	mac80211: remove iwlwifi specific workaround NDPs of null_response
	net: bcmgenet: Fix attaching to PYH failed on RPi 4B
	ipv6: exthdrs: do not blindly use init_net
	bpf: Do not change gso_size during bpf_skb_change_proto()
	i40e: Fix error handling in i40e_vsi_open
	i40e: Fix autoneg disabling for non-10GBaseT links
	Revert "ibmvnic: remove duplicate napi_schedule call in open function"
	ibmvnic: free tx_pool if tso_pool alloc fails
	ipv6: fix out-of-bound access in ip6_parse_tlv()
	Bluetooth: mgmt: Fix slab-out-of-bounds in tlv_data_is_valid
	Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event
	writeback: fix obtain a reference to a freeing memcg css
	net: lwtunnel: handle MTU calculation in forwading
	net: sched: fix warning in tcindex_alloc_perfect_hash
	RDMA/mlx5: Don't access NULL-cleared mpi pointer
	tty: nozomi: Fix a resource leak in an error handling function
	mwifiex: re-fix for unaligned accesses
	iio: adis_buffer: do not return ints in irq handlers
	iio: accel: bma180: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: accel: hid: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: accel: kxcjk-1013: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: adc: ti-ads1015: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: adc: vf610: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: gyro: bmg160: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: prox: srf08: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: prox: pulsed-light: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: prox: as3935: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: light: isl29125: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: light: tcs3414: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: light: tcs3472: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
	ASoC: hisilicon: fix missing clk_disable_unprepare() on error in hi6210_i2s_startup()
	ASoC: rsnd: tidyup loop on rsnd_adg_clk_query()
	Input: hil_kbd - fix error return code in hil_dev_connect()
	char: pcmcia: error out if 'num_bytes_read' is greater than 4 in set_protocol()
	tty: nozomi: Fix the error handling path of 'nozomi_card_init()'
	scsi: FlashPoint: Rename si_flags field
	fsi: core: Fix return of error values on failures
	fsi: scom: Reset the FSI2PIB engine for any error
	fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE
	fsi/sbefifo: Fix reset timeout
	visorbus: fix error return code in visorchipset_init()
	s390: appldata depends on PROC_SYSCTL
	eeprom: idt_89hpesx: Put fwnode in matching case during ->probe()
	eeprom: idt_89hpesx: Restore printing the unsupported fwnode name
	iio: adc: hx711: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: adc: mxs-lradc: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
	staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt()
	staging: gdm724x: check for overflow in gdm_lte_netif_rx()
	staging: mt7621-dts: fix pci address for PCI memory range
	serial: 8250: Actually allow UPF_MAGIC_MULTIPLIER baud rates
	iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
	ASoC: cs42l42: Correct definition of CS42L42_ADC_PDN_MASK
	of: Fix truncation of memory sizes on 32-bit platforms
	mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_resume()
	scsi: mpt3sas: Fix error return value in _scsih_expander_add()
	phy: ti: dm816x: Fix the error handling path in 'dm816x_usb_phy_probe()
	extcon: sm5502: Drop invalid register write in sm5502_reg_data
	extcon: max8997: Add missing modalias string
	ASoC: atmel-i2s: Fix usage of capture and playback at the same time
	configfs: fix memleak in configfs_release_bin_file
	leds: as3645a: Fix error return code in as3645a_parse_node()
	leds: ktd2692: Fix an error handling path
	powerpc: Offline CPU in stop_this_cpu()
	serial: mvebu-uart: correctly calculate minimal possible baudrate
	arm64: dts: marvell: armada-37xx: Fix reg for standard variant of UART
	vfio/pci: Handle concurrent vma faults
	mm/huge_memory.c: don't discard hugepage if other processes are mapping it
	selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random
	perf llvm: Return -ENOMEM when asprintf() fails
	mmc: block: Disable CMDQ on the ioctl path
	mmc: vub3000: fix control-request direction
	drm/mxsfb: Don't select DRM_KMS_FB_HELPER
	drm/zte: Don't select DRM_KMS_FB_HELPER
	drm/amd/amdgpu/sriov disable all ip hw status by default
	net: pch_gbe: Use proper accessors to BE data in pch_ptp_match()
	drm/amd/display: fix use_max_lb flag for 420 pixel formats
	hugetlb: clear huge pte during flush function on mips platform
	atm: iphase: fix possible use-after-free in ia_module_exit()
	mISDN: fix possible use-after-free in HFC_cleanup()
	atm: nicstar: Fix possible use-after-free in nicstar_cleanup()
	net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT
	reiserfs: add check for invalid 1st journal block
	drm/virtio: Fix double free on probe failure
	udf: Fix NULL pointer dereference in udf_symlink function
	e100: handle eeprom as little endian
	clk: renesas: r8a77995: Add ZA2 clock
	clk: tegra: Ensure that PLLU configuration is applied properly
	ipv6: use prandom_u32() for ID generation
	RDMA/cxgb4: Fix missing error code in create_qp()
	dm space maps: don't reset space map allocation cursor when committing
	pinctrl: mcp23s08: fix race condition in irq handler
	ice: set the value of global config lock timeout longer
	virtio_net: Remove BUG() to avoid machine dead
	net: bcmgenet: check return value after calling platform_get_resource()
	net: mvpp2: check return value after calling platform_get_resource()
	net: micrel: check return value after calling platform_get_resource()
	fjes: check return value after calling platform_get_resource()
	selinux: use __GFP_NOWARN with GFP_NOWAIT in the AVC
	xfrm: Fix error reporting in xfrm_state_construct.
	wlcore/wl12xx: Fix wl12xx get_mac error if device is in ELP
	wl1251: Fix possible buffer overflow in wl1251_cmd_scan
	cw1200: add missing MODULE_DEVICE_TABLE
	net: fix mistake path for netdev_features_strings
	rtl8xxxu: Fix device info for RTL8192EU devices
	MIPS: add PMD table accounting into MIPS'pmd_alloc_one
	atm: nicstar: use 'dma_free_coherent' instead of 'kfree'
	atm: nicstar: register the interrupt handler in the right place
	vsock: notify server to shutdown when client has pending signal
	RDMA/rxe: Don't overwrite errno from ib_umem_get()
	iwlwifi: mvm: don't change band on bound PHY contexts
	iwlwifi: pcie: free IML DMA memory allocation
	sfc: avoid double pci_remove of VFs
	sfc: error code if SRIOV cannot be disabled
	wireless: wext-spy: Fix out-of-bounds warning
	media, bpf: Do not copy more entries than user space requested
	net: ip: avoid OOM kills with large UDP sends over loopback
	RDMA/cma: Fix rdma_resolve_route() memory leak
	Bluetooth: Fix the HCI to MGMT status conversion table
	Bluetooth: Shutdown controller after workqueues are flushed or cancelled
	Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc.
	sctp: validate from_addr_param return
	sctp: add size validation when walking chunks
	MIPS: set mips32r5 for virt extensions
	fscrypt: don't ignore minor_hash when hash is 0
	bdi: Do not use freezable workqueue
	serial: mvebu-uart: clarify the baud rate derivation
	serial: mvebu-uart: fix calculation of clock divisor
	fuse: reject internal errno
	powerpc/barrier: Avoid collision with clang's __lwsync macro
	usb: gadget: f_fs: Fix setting of device and driver data cross-references
	drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()
	drm/amd/display: fix incorrrect valid irq check
	pinctrl/amd: Add device HID for new AMD GPIO controller
	drm/msm/mdp4: Fix modifier support enabling
	mmc: sdhci: Fix warning message when accessing RPMB in HS400 mode
	mmc: core: clear flags before allowing to retune
	mmc: core: Allow UHS-I voltage switch for SDSC cards if supported
	ata: ahci_sunxi: Disable DIPM
	cpu/hotplug: Cure the cpusets trainwreck
	clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround
	ASoC: tegra: Set driver_name=tegra for all machine drivers
	qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute
	ipmi/watchdog: Stop watchdog timer when the current action is 'none'
	power: supply: ab8500: Fix an old bug
	seq_buf: Fix overflow in seq_buf_putmem_hex()
	tracing: Simplify & fix saved_tgids logic
	tracing: Resize tgid_map to pid_max, not PID_MAX_DEFAULT
	ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe
	coresight: tmc-etf: Fix global-out-of-bounds in tmc_update_etf_buffer()
	dm btree remove: assign new_root only when removal succeeds
	PCI: Leave Apple Thunderbolt controllers on for s2idle or standby
	PCI: aardvark: Fix checking for PIO Non-posted Request
	media: subdev: disallow ioctl for saa6588/davinci
	media: dtv5100: fix control-request directions
	media: zr364xx: fix memory leak in zr364xx_start_readpipe
	media: gspca/sq905: fix control-request direction
	media: gspca/sunplus: fix zero-length control requests
	media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K
	pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq()
	jfs: fix GPF in diFree
	smackfs: restrict bytes count in smk_set_cipso()
	KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled
	KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run()
	scsi: core: Fix bad pointer dereference when ehandler kthread is invalid
	tracing: Do not reference char * as a string in histograms
	PCI: aardvark: Don't rely on jiffies while holding spinlock
	PCI: aardvark: Fix kernel panic during PIO transfer
	tty: serial: fsl_lpuart: fix the potential risk of division or modulo by zero
	misc/libmasm/module: Fix two use after free in ibmasm_init_one
	Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro"
	w1: ds2438: fixing bug that would always get page0
	scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology
	scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs
	scsi: core: Cap scsi_host cmd_per_lun at can_queue
	ALSA: ac97: fix PM reference leak in ac97_bus_remove()
	tty: serial: 8250: serial_cs: Fix a memory leak in error handling path
	scsi: scsi_dh_alua: Check for negative result value
	fs/jfs: Fix missing error code in lmLogInit()
	scsi: iscsi: Add iscsi_cls_conn refcount helpers
	scsi: iscsi: Fix conn use after free during resets
	scsi: iscsi: Fix shost->max_id use
	scsi: qedi: Fix null ref during abort handling
	mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE
	s390/sclp_vt220: fix console name to match device
	selftests: timers: rtcpie: skip test if default RTC device does not exist
	ALSA: sb: Fix potential double-free of CSP mixer elements
	powerpc/ps3: Add dma_mask to ps3_dma_region
	gpio: zynq: Check return value of pm_runtime_get_sync
	ALSA: ppc: fix error return code in snd_pmac_probe()
	selftests/powerpc: Fix "no_handler" EBB selftest
	gpio: pca953x: Add support for the On Semi pca9655
	ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()
	Input: hideep - fix the uninitialized use in hideep_nvm_unlock()
	ALSA: bebob: add support for ToneWeal FW66
	usb: gadget: f_hid: fix endianness issue with descriptors
	usb: gadget: hid: fix error return code in hid_bind()
	powerpc/boot: Fixup device-tree on little endian
	backlight: lm3630a: Fix return code of .update_status() callback
	ALSA: hda: Add IRQ check for platform_get_irq()
	staging: rtl8723bs: fix macro value for 2.4Ghz only device
	intel_th: Wait until port is in reset before programming it
	i2c: core: Disable client irq on reboot/shutdown
	lib/decompress_unlz4.c: correctly handle zero-padding around initrds.
	pwm: spear: Don't modify HW state in .remove callback
	power: supply: ab8500: Avoid NULL pointers
	power: supply: max17042: Do not enforce (incorrect) interrupt trigger type
	power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE
	ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1
	watchdog: Fix possible use-after-free in wdt_startup()
	watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff()
	watchdog: Fix possible use-after-free by calling del_timer_sync()
	watchdog: iTCO_wdt: Account for rebooting on second timeout
	x86/fpu: Return proper error codes from user access functions
	PCI: tegra: Add missing MODULE_DEVICE_TABLE
	orangefs: fix orangefs df output.
	ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty
	NFS: nfs_find_open_context() may only select open files
	power: supply: charger-manager: add missing MODULE_DEVICE_TABLE
	power: supply: ab8500: add missing MODULE_DEVICE_TABLE
	pwm: tegra: Don't modify HW state in .remove callback
	ACPI: AMBA: Fix resource name in /proc/iomem
	ACPI: video: Add quirk for the Dell Vostro 3350
	virtio-blk: Fix memory leak among suspend/resume procedure
	virtio_net: Fix error handling in virtnet_restore()
	virtio_console: Assure used length from device is limited
	f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs
	PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun
	power: supply: rt5033_battery: Fix device tree enumeration
	NFSv4: Initialise connection to the server in nfs4_alloc_client()
	um: fix error return code in slip_open()
	um: fix error return code in winch_tramp()
	watchdog: aspeed: fix hardware timeout calculation
	nfs: fix acl memory leak of posix_acl_create()
	ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode
	PCI: iproc: Fix multi-MSI base vector number allocation
	PCI: iproc: Support multi-MSI only on uniprocessor kernel
	x86/fpu: Limit xstate copy size in xstateregs_set()
	virtio_net: move tx vq operation under tx queue lock
	ALSA: isa: Fix error return code in snd_cmi8330_probe()
	NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times
	hexagon: use common DISCARDS macro
	reset: a10sr: add missing of_match_table reference
	ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3
	ARM: dts: exynos: fix PWM LED max brightness on Odroid HC1
	ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4
	memory: atmel-ebi: add missing of_node_put for loop iteration
	rtc: fix snprintf() checking in is_rtc_hctosys()
	arm64: dts: renesas: v3msk: Fix memory size
	ARM: dts: r8a7779, marzen: Fix DU clock names
	ARM: dts: BCM5301X: Fixup SPI binding
	reset: bail if try_module_get() fails
	memory: fsl_ifc: fix leak of IO mapping on probe failure
	memory: fsl_ifc: fix leak of private memory on probe failure
	ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema
	ARM: dts: am437x: align ti,pindir-d0-out-d1-in property with dt-shema
	ARM: dts: imx6q-dhcom: Fix ethernet reset time properties
	ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems
	ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery
	scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe()
	mips: always link byteswap helpers into decompressor
	mips: disable branch profiling in boot/decompress.o
	MIPS: vdso: Invalid GIC access through VDSO
	net: bridge: multicast: fix PIM hello router port marking race
	scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()
	seq_file: disallow extremely large seq buffer allocations
	Linux 4.19.198

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iaa8a95c4d30ca85021bae6c60b4818038797e04e
2021-07-20 16:38:59 +02:00
Ard Biesheuvel
0c4c098c04 crypto: shash - avoid comparing pointers to exported functions under CFI
[ Upstream commit 22ca9f4aaf431a9413dcc115dd590123307f274f ]

crypto_shash_alg_has_setkey() is implemented by testing whether the
.setkey() member of a struct shash_alg points to the default version,
called shash_no_setkey(). As crypto_shash_alg_has_setkey() is a static
inline, this requires shash_no_setkey() to be exported to modules.

Unfortunately, when building with CFI, function pointers are routed
via CFI stubs which are private to each module (or to the kernel proper)
and so this function pointer comparison may fail spuriously.

Let's fix this by turning crypto_shash_alg_has_setkey() into an out of
line function.

Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:15:44 +02:00
Lucas Wei
cdbe9ad4ef Merge LA.UM.9.12.C10.11.00.00.840.010 via branch 'qcom-msm-4.19-7250' into android-msm-pixel-4.19
Conflicts:
	arch/arm64/configs/vendor/kona_defconfig
	drivers/iio/adc/qcom-spmi-vadc.c
	drivers/md/dm-verity-target.c
	drivers/power/supply/qcom/smb5-lib.c
	drivers/soc/qcom/Kconfig
	drivers/tty/serial/msm_geni_serial.c
	include/soc/qcom/socinfo.h
	mm/cma.c
	net/netfilter/xt_qtaguid.c
	net/wireless/util.c

Bug: 189068905
Bug: 187909050
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: Ibad8d7f0db2c1003588b6497b98b75744e3e9aab
2021-06-22 18:08:34 +08:00
Lucas Wei
7ec4bc1d47 Merge android-4.19-stable (4.19.191) into android-msm-pixel-4.19-lts
Merge 4.19.191 into android-4.19-stable
Linux 4.19.191
    scripts: switch explicitly to Python 3
    tweewide: Fix most Shebang lines
  * KVM: arm64: Initialize VCPU mdcr_el2 before loading it
      arch/arm64/include/asm/kvm_host.h
  * iomap: fix sub-page uptodate handling
      fs/iomap.c
      include/linux/iomap.h
  * ipv6: remove extra dev_hold() for fallback tunnels
      net/ipv6/ip6_tunnel.c
      net/ipv6/ip6_vti.c
      net/ipv6/sit.c
  * ip6_tunnel: sit: proper dev_{hold|put} in ndo_[un]init methods
      net/ipv6/ip6_tunnel.c
  * sit: proper dev_{hold|put} in ndo_[un]init methods
      net/ipv6/sit.c
    ip6_gre: proper dev_{hold|put} in ndo_[un]init methods
    net: stmmac: Do not enable RX FIFO overflow interrupts
    lib: stackdepot: turn depot_lock spinlock to raw_spinlock
  * block: reexpand iov_iter after read/write
      fs/block_dev.c
    ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP
    gpiolib: acpi: Add quirk to ignore EC wakeups on Dell Venue 10 Pro 5055
    scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
    ceph: fix fscache invalidation
    riscv: Workaround mcount name prior to clang-13
    scripts/recordmcount.pl: Fix RISC-V regex for clang
    ARM: 9075/1: kernel: Fix interrupted SMC calls
    um: Mark all kernel symbols as local
    Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state
    Input: elants_i2c - do not bind to i2c-hid compatible ACPI instantiated devices
    ACPI / hotplug / PCI: Fix reference count leak in enable_slot()
    ARM: 9066/1: ftrace: pause/unpause function graph tracer in cpu_suspend()
  * PCI: thunder: Fix compile testing
      drivers/pci/controller/pci-thunder-ecam.c
      drivers/pci/controller/pci-thunder-pem.c
      drivers/pci/pci.h
    xsk: Simplify detection of empty and full rings
    pinctrl: ingenic: Improve unreachable code generation
    isdn: capi: fix mismatched prototypes
    cxgb4: Fix the -Wmisleading-indentation warning
    usb: sl811-hcd: improve misleading indentation
    kgdb: fix gcc-11 warning on indentation
    x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes
    nvme: do not try to reconfigure APST when the controller is not live
    clk: exynos7: Mark aclk_fsys1_200 as critical
  * netfilter: conntrack: Make global sysctls readonly in non-init netns
      net/netfilter/nf_conntrack_standalone.c
  * kobject_uevent: remove warning in init_uevent_argv()
      lib/kobject_uevent.c
    thermal/core/fair share: Lock the thermal zone while looping over instances
    MIPS: Avoid handcoded DIVU in `__div64_32' altogether
    MIPS: Avoid DIVU in `__div64_32' is result would be zero
    MIPS: Reinstate platform `__div64_32' handler
  * FDDI: defxx: Make MMIO the configuration default except for EISA
      drivers/net/fddi/Kconfig
    KVM: x86: Cancel pvclock_gtod_work on module removal
    cdc-wdm: untangle a circular dependency between callback and softint
    iio: tsl2583: Fix division by a zero lux_val
    iio: gyro: mpu3050: Fix reported temperature value
  * xhci: Add reset resume quirk for AMD xhci controller.
      drivers/usb/host/xhci-pci.c
  * xhci: Do not use GFP_KERNEL in (potentially) atomic context
      drivers/usb/host/xhci.c
  * usb: dwc3: gadget: Return success always for kick transfer in ep queue
      drivers/usb/dwc3/gadget.c
  * usb: core: hub: fix race condition about TRSMRCY of resume
      drivers/usb/core/hub.c
    usb: dwc2: Fix gadget DMA unmap direction
  * usb: xhci: Increase timeout for HC halt
      drivers/usb/host/xhci-ext-caps.h
    usb: dwc3: pci: Enable usb2-gadget-lpm-disable for Intel Merrifield
    usb: dwc3: omap: improve extcon initialization
  * blk-mq: Swap two calls in blk_mq_exit_queue()
      block/blk-mq.c
    ACPI: scan: Fix a memory leak in an error handling path
    usb: fotg210-hcd: Fix an error message
    iio: proximity: pulsedlight: Fix rumtime PM imbalance on error
    drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected
  * userfaultfd: release page in error path to avoid BUG_ON
      mm/shmem.c
    squashfs: fix divide error in calculate_skip()
    hfsplus: prevent corruption in shrinking truncate
    powerpc/64s: Fix crashes when toggling entry flush barrier
    powerpc/64s: Fix crashes when toggling stf barrier
    ARC: entry: fix off-by-one error in syscall number validation
    i40e: Fix use-after-free in i40e_client_subtask()
    netfilter: nftables: avoid overflows in nft_hash_buckets()
    kernel: kexec_file: fix error return code of kexec_calculate_store_digests()
  * sched/fair: Fix unfairness caused by missing load decay
      kernel/sched/fair.c
    netfilter: nfnetlink_osf: Fix a missing skb_header_pointer() NULL check
    smc: disallow TCP_ULP in smc_setsockopt()
  * net: fix nla_strcmp to handle more then one trailing null character
      lib/nlattr.c
    ksm: fix potential missing rmap_item for stable_node
    mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts()
    khugepaged: fix wrong result value for trace_mm_collapse_huge_page_isolate()
    drm/radeon: Avoid power table parsing memory leaks
    drm/radeon: Fix off-by-one power_state index heap overwrite
  * netfilter: xt_SECMARK: add new revision to fix structure layout
      include/uapi/linux/netfilter/xt_SECMARK.h
      net/netfilter/xt_SECMARK.c
  * sctp: fix a SCTP_MIB_CURRESTAB leak in sctp_sf_do_dupcook_b
      net/sctp/sm_statefuns.c
    ethernet:enic: Fix a use after free bug in enic_hard_start_xmit
  * sctp: do asoc update earlier in sctp_sf_do_dupcook_a
      net/sctp/sm_statefuns.c
    net: hns3: disable phy loopback setting in hclge_mac_start_phy
    rtc: ds1307: Fix wday settings for rx8130
    NFSv4.2 fix handling of sr_eof in SEEK's reply
    pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
    PCI: endpoint: Fix missing destroy_workqueue()
    NFS: Deal correctly with attribute generation counter overflow
    NFSv4.2: Always flush out writes in nfs42_proc_fallocate()
  * rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data()
      drivers/rpmsg/qcom_glink_native.c
    ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook
  * PCI: Release OF node in pci_scan_device()'s error path
      drivers/pci/probe.c
    PCI: iproc: Fix return value of iproc_msi_irq_domain_alloc()
  * f2fs: fix a redundant call to f2fs_balance_fs if an error occurs
      fs/f2fs/inline.c
    ASoC: rt286: Make RT286_SET_GPIO_* readable and writable
    ia64: module: fix symbolizer crash on fdescr
    net: ethernet: mtk_eth_soc: fix RX VLAN offload
    powerpc/iommu: Annotate nested lock for lockdep
    wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join
    wl3501_cs: Fix out-of-bounds warnings in wl3501_send_pkt
    powerpc/pseries: Stop calling printk in rtas_stop_self()
    samples/bpf: Fix broken tracex1 due to kprobe argument change
  * ethtool: ioctl: Fix out-of-bounds warning in store_link_ksettings_for_user()
      net/core/ethtool.c
    ASoC: rt286: Generalize support for ALC3263 codec
    powerpc/smp: Set numa node before updating mask
  * sctp: Fix out-of-bounds warning in sctp_process_asconf_param()
      net/sctp/sm_make_chunk.c
    kconfig: nconf: stop endless search loops
    selftests: Set CC to clang in lib.mk if LLVM is set
    cuse: prevent clone
    pinctrl: samsung: use 'int' for register masks in Exynos
    mac80211: clear the beacon's CRC after channel switch
  * i2c: Add I2C_AQ_NO_REP_START adapter quirk
      include/linux/i2c.h
    ASoC: Intel: bytcr_rt5640: Add quirk for the Chuwi Hi8 tablet
  * ip6_vti: proper dev_{hold|put} in ndo_[un]init methods
      net/ipv6/ip6_vti.c
  * Bluetooth: check for zapped sk before connecting
      net/bluetooth/l2cap_sock.c
  * net: bridge: when suppression is enabled exclude RARP packets
      net/bridge/br_arp_nd_proxy.c
  * Bluetooth: initialize skb_queue_head at l2cap_chan_create()
      net/bluetooth/l2cap_core.c
  * Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default
      net/bluetooth/l2cap_core.c
    ALSA: rme9652: don't disable if not enabled
    ALSA: hdspm: don't disable if not enabled
    ALSA: hdsp: don't disable if not enabled
  * i2c: bail out early when RDWR parameters are wrong
      drivers/i2c/i2c-dev.c
    net: stmmac: Set FIFO sizes for ipq806x
    ASoC: Intel: bytcr_rt5640: Enable jack-detect support on Asus T100TAF
  * tipc: convert dest node's address to network order
      net/tipc/netlink_compat.c
    fs: dlm: fix debugfs dump
    tpm: fix error return code in tpm2_get_cc_attrs_tbl()
  * Revert "fdt: Properly handle "no-map" field in the memory region"
      drivers/of/fdt.c
  * Revert "of/fdt: Make sure no-map does not remove already reserved regions"
      drivers/of/fdt.c
  * sctp: delay auto_asconf init until binding the first addr
      net/sctp/socket.c
  * Revert "net/sctp: fix race condition in sctp_destroy_sock"
      net/sctp/socket.c
  * smp: Fix smp_call_function_single_async prototype
      include/linux/smp.h
      kernel/smp.c
  * net: Only allow init netns to set default tcp cong to a restricted algo
      net/ipv4/tcp_cong.c
    mm/memory-failure: unnecessary amount of unmapping
  * mm/sparse: add the missing sparse_buffer_fini() in error branch
      mm/sparse.c
    kfifo: fix ternary sign extension bugs
    net:nfc:digital: Fix a double free in digital_tg_recv_dep_req
    RDMA/bnxt_re: Fix a double free in bnxt_qplib_alloc_res
    net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send
    net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb
    arm64: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E
    ARM: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E
    bnxt_en: fix ternary sign extension bug in bnxt_show_temp()
    powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add')
    ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock
    ath9k: Fix error check in ath9k_hw_read_revisions() for PCI devices
    net: davinci_emac: Fix incorrect masking of tx and rx error channel
  * ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails
      sound/usb/midi.c
    RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails
    vsock/vmci: log once the failed queue pair allocation
    mwl8k: Fix a double Free in mwl8k_probe_hw
    i2c: sh7760: fix IRQ error path
    rtlwifi: 8821ae: upgrade PHY and RF parameters
    powerpc/pseries: extract host bridge from pci_bus prior to bus removal
    MIPS: pci-legacy: stop using of_pci_range_to_resource
    drm/i915/gvt: Fix error code in intel_gvt_init_device()
    ASoC: ak5558: correct reset polarity
    i2c: sh7760: add IRQ check
    i2c: jz4780: add IRQ check
    i2c: emev2: add IRQ check
    i2c: cadence: add IRQ check
    RDMA/srpt: Fix error return code in srpt_cm_req_recv()
    net: thunderx: Fix unintentional sign extension issue
    IB/hfi1: Fix error return code in parse_platform_config()
    mt7601u: fix always true expression
    mac80211: bail out if cipher schemes are invalid
    powerpc: iommu: fix build when neither PCI or IBMVIO is set
    powerpc/perf: Fix PMU constraint check for EBB events
    powerpc/64s: Fix pte update for kernel memory on radix
    liquidio: Fix unintented sign extension of a left shift of a u16
  * ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls
      sound/usb/card.c
      sound/usb/quirks.c
      sound/usb/usbaudio.h
    net: hns3: Limiting the scope of vector_ring_chain variable
    nfc: pn533: prevent potential memory corruption
  * bug: Remove redundant condition check in report_bug
      lib/bug.c
  * ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
      sound/core/init.c
    powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration
    powerpc/prom: Mark identical_pvr_fixup as __init
    net: lapbether: Prevent racing when checking whether the netif is running
    perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars
  * HID: plantronics: Workaround for double volume key presses
      drivers/hid/hid-ids.h
      drivers/hid/hid-plantronics.c
      include/linux/hid.h
    drivers/block/null_blk/main: Fix a double free in null_init.
  * sched/debug: Fix cgroup_path[] serialization
      kernel/sched/debug.c
    x86/events/amd/iommu: Fix sysfs type mismatch
    HSI: core: fix resource leaks in hsi_add_client_from_dt()
    mfd: stm32-timers: Avoid clearing auto reload register
    scsi: ibmvfc: Fix invalid state machine BUG_ON()
    scsi: sni_53c710: Add IRQ check
    scsi: sun3x_esp: Add IRQ check
    scsi: jazz_esp: Add IRQ check
    clk: uniphier: Fix potential infinite loop
    clk: qcom: a53-pll: Add missing MODULE_DEVICE_TABLE
    vfio/mdev: Do not allow a mdev_type to have a NULL parent pointer
    nvme: retrigger ANA log update if group descriptor isn't found
    ata: libahci_platform: fix IRQ check
    sata_mv: add IRQ checks
    pata_ipx4xx_cf: fix IRQ check
    pata_arasan_cf: fix IRQ check
    x86/kprobes: Fix to check non boostable prefixes correctly
    drm/amdkfd: fix build error with AMD_IOMMU_V2=m
    media: m88rs6000t: avoid potential out-of-bounds reads on arrays
    media: omap4iss: return error code when omap4iss_get() failed
    media: vivid: fix assignment of dev->fbuf_out_flags
    soc: aspeed: fix a ternary sign expansion bug
  * ttyprintk: Add TTY hangup callback.
      drivers/char/ttyprintk.c
    usb: dwc2: Fix hibernation between host and device modes.
    usb: dwc2: Fix host mode hibernation exit with remote wakeup flow.
    Drivers: hv: vmbus: Increase wait time for VMbus unload
    x86/platform/uv: Fix !KEXEC build failure
    platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table
    usbip: vudc: fix missing unlock on error in usbip_sockfd_store()
  * firmware: qcom-scm: Fix QCOM_SCM configuration
      drivers/firmware/Kconfig
  * tty: fix return value for unsupported ioctls
      drivers/tty/tty_io.c
      include/linux/tty_driver.h
  * tty: actually undefine superseded ASYNC flags
      include/uapi/linux/tty_flags.h
    USB: cdc-acm: fix unprivileged TIOCCSERIAL
    usb: gadget: r8a66597: Add missing null check on return from platform_get_resource
    cpufreq: armada-37xx: Fix determining base CPU frequency
    cpufreq: armada-37xx: Fix driver cleanup when registration failed
    clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0
    clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz
    cpufreq: armada-37xx: Fix the AVS value for load L1
    clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock
    cpufreq: armada-37xx: Fix setting TBG parent for load levels
    crypto: qat - Fix a double free in adf_create_ring
    ACPI: CPPC: Replace cppc_attr with kobj_attribute
  * soc: qcom: mdt_loader: Detect truncated read of segments
      drivers/soc/qcom/mdt_loader.c
  * soc: qcom: mdt_loader: Validate that p_filesz < p_memsz
      drivers/soc/qcom/mdt_loader.c
  * spi: Fix use-after-free with devm_spi_alloc_*
      drivers/spi/spi.c
      include/linux/spi/spi.h
    staging: greybus: uart: fix unprivileged TIOCCSERIAL
    staging: rtl8192u: Fix potential infinite loop
  * irqchip/gic-v3: Fix OF_BAD_ADDR error handling
      drivers/irqchip/irq-gic-v3-mbi.c
    mtd: rawnand: gpmi: Fix a double free in gpmi_nand_init
    soundwire: stream: fix memory leak in stream config error path
    USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR()
    usb: gadget: aspeed: fix dma map failure
    crypto: qat - fix error path in adf_isr_resource_alloc()
  * phy: marvell: ARMADA375_USBCLUSTER_PHY should not default to y, unconditionally
      drivers/phy/marvell/Kconfig
    soundwire: bus: Fix device found flag correctly
  * bus: qcom: Put child node before return
      drivers/bus/qcom-ebi2.c
    mtd: require write permissions for locking and badblock ioctls
    fotg210-udc: Complete OUT requests on short packets
    fotg210-udc: Don't DMA more than the buffer can take
    fotg210-udc: Mask GRP2 interrupts we don't handle
    fotg210-udc: Remove a dubious condition leading to fotg210_done
    fotg210-udc: Fix EP0 IN requests bigger than two packets
    fotg210-udc: Fix DMA on EP0 for length > max packet size
    crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init
    crypto: qat - don't release uninitialized resources
    usb: gadget: pch_udc: Check for DMA mapping error
    usb: gadget: pch_udc: Check if driver is present before calling ->setup()
    usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits()
    x86/microcode: Check for offline CPUs before requesting new microcode
    mtd: rawnand: qcom: Return actual error code instead of -ENODEV
    mtd: Handle possible -EPROBE_DEFER from parse_mtd_partitions()
    mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC
    mtd: rawnand: fsmc: Fix error code in fsmc_nand_probe()
  * regmap: set debugfs_name to NULL after it is freed
      drivers/base/regmap/regmap-debugfs.c
    usb: typec: tcpci: Check ROLE_CONTROL while interpreting CC_STATUS
    serial: stm32: fix tx_empty condition
    serial: stm32: fix incorrect characters on console
    ARM: dts: exynos: correct PMIC interrupt trigger level on Snow
    ARM: dts: exynos: correct PMIC interrupt trigger level on SMDK5250
    ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid X/U3 family
    ARM: dts: exynos: correct PMIC interrupt trigger level on Midas family
    ARM: dts: exynos: correct MUIC interrupt trigger level on Midas family
    ARM: dts: exynos: correct fuel gauge interrupt trigger level on Midas family
    memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]
    usb: gadget: pch_udc: Revert d3cb25a121 completely
  * ovl: fix missing revert_creds() on error path
      fs/overlayfs/copy_up.c
    KVM: s390: split kvm_s390_real_to_abs
    KVM: s390: fix guarded storage control register handling
    KVM: s390: split kvm_s390_logical_to_effective
    x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported
    ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices
    ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries
    ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries
    ALSA: hda/realtek: Re-order ALC269 Dell quirk table entries
    ALSA: hda/realtek: Re-order ALC269 HP quirk table entries
    ALSA: hda/realtek: Re-order ALC882 Clevo quirk table entries
    ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries
    ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries
    drm/radeon: fix copy of uninitialized variable back to userspace
  * cfg80211: scan: drop entry from hidden_list on overflow
      net/wireless/scan.c
    ipw2x00: potential buffer overflow in libipw_wx_set_encodeext()
    md: Fix missing unused status line of /proc/mdstat
    md: md_open returns -EBUSY when entering racing area
    md: factor out a mddev_find_locked helper from mddev_find
    md: split mddev_find
    md-cluster: fix use-after-free issue when removing rdev
    md/bitmap: wait for external bitmap writes to complete during tear down
    misc: vmw_vmci: explicitly initialize vmci_datagram payload
    misc: vmw_vmci: explicitly initialize vmci_notify_bm_set_msg struct
    misc: lis3lv02d: Fix false-positive WARN on various HP models
    iio:accel:adis16201: Fix wrong axis assignment that prevents loading
    FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR
    MIPS: pci-rt2880: fix slot 0 configuration
    MIPS: pci-mt7620: fix PLL lock check
    ASoC: samsung: tm2_wm5110: check of of_parse return value
    net/nfc: fix use-after-free llcp_sock_bind/connect
  * bluetooth: eliminate the potential race condition when removing the HCI controller
      net/bluetooth/hci_request.c
    hsr: use netdev_err() instead of WARN_ONCE()
  * Bluetooth: verify AMP hci_chan before amp_destroy
      include/net/bluetooth/hci_core.h
      net/bluetooth/hci_event.c
  * modules: inherit TAINT_PROPRIETARY_MODULE
      include/linux/module.h
      kernel/module.c
  * modules: return licensing information from find_symbol
      include/linux/module.h
      kernel/module.c
  * modules: rename the licence field in struct symsearch to license
      include/linux/module.h
      kernel/module.c
  * modules: unexport __module_address
      kernel/module.c
  * modules: unexport __module_text_address
      kernel/module.c
  * modules: mark each_symbol_section static
      include/linux/module.h
      kernel/module.c
  * modules: mark find_symbol static
      include/linux/module.h
      kernel/module.c
  * modules: mark ref_module static
      include/linux/module.h
      kernel/module.c
  * dm rq: fix double free of blk_mq_tag_set in dev remove after table load fails
      drivers/md/dm-rq.c
    dm space map common: fix division bug in sm_ll_find_free_block()
    dm persistent data: packed struct should have an aligned() attribute too
  * tracing: Restructure trace_clock_global() to never block
      kernel/trace/trace_clock.c
  * tracing: Map all PIDs to command lines
      kernel/trace/trace.c
    rsi: Use resume_noirq for SDIO
    tty: fix memory leak in vc_deallocate
    usb: dwc2: Fix session request interrupt handler
  * usb: dwc3: gadget: Fix START_TRANSFER link state check
      drivers/usb/dwc3/gadget.c
  * usb: gadget/function/f_fs string table fix for multiple languages
      drivers/usb/gadget/function/f_fs.c
  * usb: gadget: Fix double free of device descriptor pointers
      drivers/usb/gadget/config.c
    usb: gadget: dummy_hcd: fix gpf in gadget_setup
    media: dvbdev: Fix memory leak in dvb_media_device_free()
  * ext4: fix error code in ext4_commit_super
      fs/ext4/super.c
  * ext4: do not set SB_ACTIVE in ext4_orphan_cleanup()
      fs/ext4/super.c
  * ext4: fix check to prevent false positive report of incorrect used inodes
      fs/ext4/ialloc.c
    arm64: vdso: remove commas between macro name and arguments
  * posix-timers: Preserve return value in clock_adjtime32()
      kernel/time/posix-timers.c
  * Revert 337f13046f ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op")
      kernel/futex.c
    jffs2: check the validity of dstlen in jffs2_zlib_compress()
  * Fix misc new gcc warnings
      include/scsi/libfcoe.h
      net/bluetooth/ecdh_helper.h
  * security: commoncap: fix -Wstringop-overread warning
      security/commoncap.c
    dm raid: fix inconclusive reshape layout on fast raid4/5/6 table reload sequences
    md/raid1: properly indicate failure when ending a failed write request
    tpm: vtpm_proxy: Avoid reading host log when using a virtual device
    intel_th: pci: Add Alder Lake-M support
    powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h
    powerpc/eeh: Fix EEH handling for hugepages in ioremap space.
    jffs2: Fix kasan slab-out-of-bounds problem
    NFSv4: Don't discard segments marked for return in _pnfs_return_layout()
    NFS: Don't discard pNFS layout segments that are marked for return
    ACPI: GTDT: Don't corrupt interrupt mappings on watchdow probe failure
    openvswitch: fix stack OOB read while fragmenting IPv4 packets
    mlxsw: spectrum_mr: Update egress RIF list before route's action
  * f2fs: fix to avoid out-of-bounds memory access
      fs/f2fs/node.c
    ubifs: Only check replay with inode type to judge if inode linked
  * arm64/vdso: Discard .note.gnu.property sections in vDSO
      arch/arm64/kernel/vdso/vdso.lds.S
    btrfs: fix race when picking most recent mod log operation for an old root
    ALSA: hda/realtek: Add quirk for Intel Clevo PCx0Dx
  * ALSA: usb-audio: Add dB range mapping for Sennheiser Communications Headset PC 8
      sound/usb/mixer_maps.c
  * ALSA: usb-audio: More constifications
      sound/usb/mixer.c
      sound/usb/mixer_maps.c
      sound/usb/mixer_quirks.c
      sound/usb/mixer_scarlett.c
      sound/usb/proc.c
      sound/usb/stream.c
      sound/usb/validate.c
  * ALSA: usb-audio: Explicitly set up the clock selector
      sound/usb/clock.c
    ALSA: sb: Fix two use after free in snd_sb_qsound_build
    ALSA: hda/conexant: Re-order CX5066 quirk table entries
    ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer
    s390/archrandom: add parameter check for s390_arch_random_generate
    scsi: libfc: Fix a format specifier
    scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic
    scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response
    drm/amdgpu: fix NULL pointer dereference
    amdgpu: avoid incorrect %hu format string
    drm/msm/mdp5: Configure PP_SYNC_HEIGHT to double the vtotal
    media: gscpa/stv06xx: fix memory leak
    media: dvb-usb: fix memory leak in dvb_usb_adapter_init
    media: i2c: adv7842: fix possible use-after-free in adv7842_remove()
    media: i2c: adv7511-v4l2: fix possible use-after-free in adv7511_remove()
    media: adv7604: fix possible use-after-free in adv76xx_remove()
    media: tc358743: fix possible use-after-free in tc358743_remove()
    power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()
    power: supply: generic-adc-battery: fix possible use-after-free in gab_remove()
    clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return
    media: vivid: update EDID
    media: em28xx: fix memory leak
    scsi: scsi_dh_alua: Remove check for ASC 24h in alua_rtpg()
    scsi: qla2xxx: Fix use after free in bsg
    scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats()
    drm/amdgpu : Fix asic reset regression issue introduce by 8f211fe8ac7c4f
    power: supply: Use IRQF_ONESHOT
    media: gspca/sq905.c: fix uninitialized variable
    media: media/saa7164: fix saa7164_encoder_register() memory leak bugs
    extcon: arizona: Fix some issues when HPDET IRQ fires after the jack has been unplugged
  * power: supply: bq27xxx: fix power_avg for newer ICs
      include/linux/power/bq27xxx_battery.h
  * media: drivers: media: pci: sta2x11: fix Kconfig dependency on GPIOLIB
      drivers/media/pci/sta2x11/Kconfig
    media: ite-cir: check for receive overflow
    scsi: target: pscsi: Fix warning in pscsi_complete_cmd()
    scsi: lpfc: Fix pt2pt connection does not recover after LOGO
    scsi: lpfc: Fix incorrect dbde assignment when building target abts wqe
    btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s
    phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove()
    intel_th: Consistency and off-by-one fix
    spi: omap-100k: Fix reference leak to master
    spi: dln2: Fix reference leak to master
  * xhci: fix potential array out of bounds with several interrupters
      drivers/usb/host/xhci.c
  * xhci: check control context is valid before dereferencing it.
      drivers/usb/host/xhci.c
  * usb: xhci-mtk: support quirk to disable usb2 lpm
      drivers/usb/host/xhci-mtk.h
  * perf/arm_pmu_platform: Fix error handling
      drivers/perf/arm_pmu_platform.c
    tee: optee: do not check memref size on return from Secure World
    x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS)
  * PCI: PM: Do not read power state in pci_enable_device_flags()
      drivers/pci/pci.c
  * usb: xhci: Fix port minor revision
      drivers/usb/host/xhci-mem.c
  * usb: dwc3: gadget: Ignore EP queue requests during bus reset
      drivers/usb/dwc3/gadget.c
    usb: gadget: f_uac1: validate input parameters
    genirq/matrix: Prevent allocation counter corruption
    usb: gadget: uvc: add bInterval checking for HS mode
  * crypto: api - check for ERR pointers in crypto_destroy_tfm()
      crypto/api.c
      include/crypto/acompress.h
      include/crypto/aead.h
      include/crypto/akcipher.h
      include/crypto/hash.h
      include/crypto/kpp.h
      include/crypto/rng.h
      include/crypto/skcipher.h
    staging: wimax/i2400m: fix byte-order issue
    fbdev: zero-fill colormap in fbcmap.c
    intel_th: pci: Add Rocket Lake CPU support
    btrfs: fix metadata extent leak after failure to create subvolume
    cifs: Return correct error code from smb2_get_enc_key
    erofs: add unsupported inode i_format check
    mmc: core: Set read only for SD cards with permanent write protect bit
    mmc: core: Do a power cycle when the CMD11 fails
    mmc: block: Issue a cache flush only when it's enabled
    mmc: block: Update ext_csd.cache_ctrl if it was written
    mmc: sdhci-pci: Fix initialization of some SD cards for Intel BYT-based controllers
    scsi: qla2xxx: Fix crash in qla2xxx_mqueuecommand()
    spi: spi-ti-qspi: Free DMA resources
    mtd: rawnand: atmel: Update ecc_stats.corrected counter
    mtd: spinand: core: add missing MODULE_DEVICE_TABLE()
  * ecryptfs: fix kernel panic with null dev_name
      fs/ecryptfs/main.c
    arm64: dts: mt8173: fix property typo of 'phys' in dsi node
    arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node
    ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld
    ftrace: Handle commands when closing set_ftrace_filter file
    ACPI: custom_method: fix a possible memory leak
    ACPI: custom_method: fix potential use-after-free issue
    s390/disassembler: increase ebpf disasm buffer size
  * BACKPORT: arm64: vdso32: drop -no-integrated-as flag
      arch/arm64/kernel/vdso32/Makefile
    ANDROID: GKI: update allowed list for incrementalfs.ko
  * ANDROID: dm-user: Drop additional reference
      drivers/md/dm-user.c
    ANDROID: FUSE OWNERS pointing to android-mainline OWNERS
  * UPSTREAM: sched: Fix out-of-bound access in uclamp
      kernel/sched/core.c
    Merge 4.19.190 into android-4.19-stable
Linux 4.19.190
  * ovl: allow upperdir inside lowerdir
      fs/overlayfs/super.c
    platform/x86: thinkpad_acpi: Correct thermal sensor allocation
  * USB: Add reset-resume quirk for WD19's Realtek Hub
      drivers/usb/core/quirks.c
  * USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet
      drivers/usb/core/quirks.c
  * ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX
      sound/usb/quirks-table.h
    iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_gen2_enqueue_hcmd()
  * bpf: Fix masking negation logic upon negative dst register
      kernel/bpf/verifier.c
    mips: Do not include hi and lo in clobber list for R6
    iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd()
  * net: usb: ax88179_178a: initialize local variables before use
      drivers/net/usb/ax88179_178a.c
    ACPI: x86: Call acpi_boot_table_init() after acpi_table_upgrade()
  * ACPI: tables: x86: Reserve memory occupied by ACPI tables
      include/linux/acpi.h
    erofs: fix extended inode could cross boundary
    BACKPORT: FROMGIT: virt_wifi: Return micros for BSS TSF values
    ANDROID: Add allowed symbols requried from Qualcomm drivers
  * ANDROID: GKI: QoS: Prevent usage of dev_pm_qos_request as pm_qos_request
      drivers/base/power/qos.c
      include/linux/pm_qos.h
      kernel/power/qos.c

Bug: 189791081
Change-Id: Iab7796f3e6639b2a0b38164baa538277769efa03
Signed-off-by: Lucas Wei <lucaswei@google.com>
2021-06-14 17:29:51 +08:00
Greg Kroah-Hartman
011b73c995 Merge 4.19.191 into android-4.19-stable
Changes in 4.19.191
	s390/disassembler: increase ebpf disasm buffer size
	ACPI: custom_method: fix potential use-after-free issue
	ACPI: custom_method: fix a possible memory leak
	ftrace: Handle commands when closing set_ftrace_filter file
	ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld
	arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node
	arm64: dts: mt8173: fix property typo of 'phys' in dsi node
	ecryptfs: fix kernel panic with null dev_name
	mtd: spinand: core: add missing MODULE_DEVICE_TABLE()
	mtd: rawnand: atmel: Update ecc_stats.corrected counter
	spi: spi-ti-qspi: Free DMA resources
	scsi: qla2xxx: Fix crash in qla2xxx_mqueuecommand()
	mmc: sdhci-pci: Fix initialization of some SD cards for Intel BYT-based controllers
	mmc: block: Update ext_csd.cache_ctrl if it was written
	mmc: block: Issue a cache flush only when it's enabled
	mmc: core: Do a power cycle when the CMD11 fails
	mmc: core: Set read only for SD cards with permanent write protect bit
	erofs: add unsupported inode i_format check
	cifs: Return correct error code from smb2_get_enc_key
	btrfs: fix metadata extent leak after failure to create subvolume
	intel_th: pci: Add Rocket Lake CPU support
	fbdev: zero-fill colormap in fbcmap.c
	staging: wimax/i2400m: fix byte-order issue
	crypto: api - check for ERR pointers in crypto_destroy_tfm()
	usb: gadget: uvc: add bInterval checking for HS mode
	genirq/matrix: Prevent allocation counter corruption
	usb: gadget: f_uac1: validate input parameters
	usb: dwc3: gadget: Ignore EP queue requests during bus reset
	usb: xhci: Fix port minor revision
	PCI: PM: Do not read power state in pci_enable_device_flags()
	x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS)
	tee: optee: do not check memref size on return from Secure World
	perf/arm_pmu_platform: Fix error handling
	usb: xhci-mtk: support quirk to disable usb2 lpm
	xhci: check control context is valid before dereferencing it.
	xhci: fix potential array out of bounds with several interrupters
	spi: dln2: Fix reference leak to master
	spi: omap-100k: Fix reference leak to master
	intel_th: Consistency and off-by-one fix
	phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove()
	btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s
	scsi: lpfc: Fix incorrect dbde assignment when building target abts wqe
	scsi: lpfc: Fix pt2pt connection does not recover after LOGO
	scsi: target: pscsi: Fix warning in pscsi_complete_cmd()
	media: ite-cir: check for receive overflow
	media: drivers: media: pci: sta2x11: fix Kconfig dependency on GPIOLIB
	power: supply: bq27xxx: fix power_avg for newer ICs
	extcon: arizona: Fix some issues when HPDET IRQ fires after the jack has been unplugged
	media: media/saa7164: fix saa7164_encoder_register() memory leak bugs
	media: gspca/sq905.c: fix uninitialized variable
	power: supply: Use IRQF_ONESHOT
	drm/amdgpu : Fix asic reset regression issue introduce by 8f211fe8ac7c4f
	scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats()
	scsi: qla2xxx: Fix use after free in bsg
	scsi: scsi_dh_alua: Remove check for ASC 24h in alua_rtpg()
	media: em28xx: fix memory leak
	media: vivid: update EDID
	clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return
	power: supply: generic-adc-battery: fix possible use-after-free in gab_remove()
	power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()
	media: tc358743: fix possible use-after-free in tc358743_remove()
	media: adv7604: fix possible use-after-free in adv76xx_remove()
	media: i2c: adv7511-v4l2: fix possible use-after-free in adv7511_remove()
	media: i2c: adv7842: fix possible use-after-free in adv7842_remove()
	media: dvb-usb: fix memory leak in dvb_usb_adapter_init
	media: gscpa/stv06xx: fix memory leak
	drm/msm/mdp5: Configure PP_SYNC_HEIGHT to double the vtotal
	amdgpu: avoid incorrect %hu format string
	drm/amdgpu: fix NULL pointer dereference
	scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response
	scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic
	scsi: libfc: Fix a format specifier
	s390/archrandom: add parameter check for s390_arch_random_generate
	ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer
	ALSA: hda/conexant: Re-order CX5066 quirk table entries
	ALSA: sb: Fix two use after free in snd_sb_qsound_build
	ALSA: usb-audio: Explicitly set up the clock selector
	ALSA: usb-audio: More constifications
	ALSA: usb-audio: Add dB range mapping for Sennheiser Communications Headset PC 8
	ALSA: hda/realtek: Add quirk for Intel Clevo PCx0Dx
	btrfs: fix race when picking most recent mod log operation for an old root
	arm64/vdso: Discard .note.gnu.property sections in vDSO
	ubifs: Only check replay with inode type to judge if inode linked
	f2fs: fix to avoid out-of-bounds memory access
	mlxsw: spectrum_mr: Update egress RIF list before route's action
	openvswitch: fix stack OOB read while fragmenting IPv4 packets
	ACPI: GTDT: Don't corrupt interrupt mappings on watchdow probe failure
	NFS: Don't discard pNFS layout segments that are marked for return
	NFSv4: Don't discard segments marked for return in _pnfs_return_layout()
	jffs2: Fix kasan slab-out-of-bounds problem
	powerpc/eeh: Fix EEH handling for hugepages in ioremap space.
	powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h
	intel_th: pci: Add Alder Lake-M support
	tpm: vtpm_proxy: Avoid reading host log when using a virtual device
	md/raid1: properly indicate failure when ending a failed write request
	dm raid: fix inconclusive reshape layout on fast raid4/5/6 table reload sequences
	security: commoncap: fix -Wstringop-overread warning
	Fix misc new gcc warnings
	jffs2: check the validity of dstlen in jffs2_zlib_compress()
	Revert 337f13046f ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op")
	posix-timers: Preserve return value in clock_adjtime32()
	arm64: vdso: remove commas between macro name and arguments
	ext4: fix check to prevent false positive report of incorrect used inodes
	ext4: do not set SB_ACTIVE in ext4_orphan_cleanup()
	ext4: fix error code in ext4_commit_super
	media: dvbdev: Fix memory leak in dvb_media_device_free()
	usb: gadget: dummy_hcd: fix gpf in gadget_setup
	usb: gadget: Fix double free of device descriptor pointers
	usb: gadget/function/f_fs string table fix for multiple languages
	usb: dwc3: gadget: Fix START_TRANSFER link state check
	usb: dwc2: Fix session request interrupt handler
	tty: fix memory leak in vc_deallocate
	rsi: Use resume_noirq for SDIO
	tracing: Map all PIDs to command lines
	tracing: Restructure trace_clock_global() to never block
	dm persistent data: packed struct should have an aligned() attribute too
	dm space map common: fix division bug in sm_ll_find_free_block()
	dm rq: fix double free of blk_mq_tag_set in dev remove after table load fails
	modules: mark ref_module static
	modules: mark find_symbol static
	modules: mark each_symbol_section static
	modules: unexport __module_text_address
	modules: unexport __module_address
	modules: rename the licence field in struct symsearch to license
	modules: return licensing information from find_symbol
	modules: inherit TAINT_PROPRIETARY_MODULE
	Bluetooth: verify AMP hci_chan before amp_destroy
	hsr: use netdev_err() instead of WARN_ONCE()
	bluetooth: eliminate the potential race condition when removing the HCI controller
	net/nfc: fix use-after-free llcp_sock_bind/connect
	ASoC: samsung: tm2_wm5110: check of of_parse return value
	MIPS: pci-mt7620: fix PLL lock check
	MIPS: pci-rt2880: fix slot 0 configuration
	FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR
	iio:accel:adis16201: Fix wrong axis assignment that prevents loading
	misc: lis3lv02d: Fix false-positive WARN on various HP models
	misc: vmw_vmci: explicitly initialize vmci_notify_bm_set_msg struct
	misc: vmw_vmci: explicitly initialize vmci_datagram payload
	md/bitmap: wait for external bitmap writes to complete during tear down
	md-cluster: fix use-after-free issue when removing rdev
	md: split mddev_find
	md: factor out a mddev_find_locked helper from mddev_find
	md: md_open returns -EBUSY when entering racing area
	md: Fix missing unused status line of /proc/mdstat
	ipw2x00: potential buffer overflow in libipw_wx_set_encodeext()
	cfg80211: scan: drop entry from hidden_list on overflow
	drm/radeon: fix copy of uninitialized variable back to userspace
	ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries
	ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries
	ALSA: hda/realtek: Re-order ALC882 Clevo quirk table entries
	ALSA: hda/realtek: Re-order ALC269 HP quirk table entries
	ALSA: hda/realtek: Re-order ALC269 Dell quirk table entries
	ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries
	ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries
	ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices
	x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported
	KVM: s390: split kvm_s390_logical_to_effective
	KVM: s390: fix guarded storage control register handling
	KVM: s390: split kvm_s390_real_to_abs
	ovl: fix missing revert_creds() on error path
	usb: gadget: pch_udc: Revert d3cb25a121 completely
	memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]
	ARM: dts: exynos: correct fuel gauge interrupt trigger level on Midas family
	ARM: dts: exynos: correct MUIC interrupt trigger level on Midas family
	ARM: dts: exynos: correct PMIC interrupt trigger level on Midas family
	ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid X/U3 family
	ARM: dts: exynos: correct PMIC interrupt trigger level on SMDK5250
	ARM: dts: exynos: correct PMIC interrupt trigger level on Snow
	serial: stm32: fix incorrect characters on console
	serial: stm32: fix tx_empty condition
	usb: typec: tcpci: Check ROLE_CONTROL while interpreting CC_STATUS
	regmap: set debugfs_name to NULL after it is freed
	mtd: rawnand: fsmc: Fix error code in fsmc_nand_probe()
	mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC
	mtd: Handle possible -EPROBE_DEFER from parse_mtd_partitions()
	mtd: rawnand: qcom: Return actual error code instead of -ENODEV
	x86/microcode: Check for offline CPUs before requesting new microcode
	usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits()
	usb: gadget: pch_udc: Check if driver is present before calling ->setup()
	usb: gadget: pch_udc: Check for DMA mapping error
	crypto: qat - don't release uninitialized resources
	crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init
	fotg210-udc: Fix DMA on EP0 for length > max packet size
	fotg210-udc: Fix EP0 IN requests bigger than two packets
	fotg210-udc: Remove a dubious condition leading to fotg210_done
	fotg210-udc: Mask GRP2 interrupts we don't handle
	fotg210-udc: Don't DMA more than the buffer can take
	fotg210-udc: Complete OUT requests on short packets
	mtd: require write permissions for locking and badblock ioctls
	bus: qcom: Put child node before return
	soundwire: bus: Fix device found flag correctly
	phy: marvell: ARMADA375_USBCLUSTER_PHY should not default to y, unconditionally
	crypto: qat - fix error path in adf_isr_resource_alloc()
	usb: gadget: aspeed: fix dma map failure
	USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR()
	soundwire: stream: fix memory leak in stream config error path
	mtd: rawnand: gpmi: Fix a double free in gpmi_nand_init
	irqchip/gic-v3: Fix OF_BAD_ADDR error handling
	staging: rtl8192u: Fix potential infinite loop
	staging: greybus: uart: fix unprivileged TIOCCSERIAL
	spi: Fix use-after-free with devm_spi_alloc_*
	soc: qcom: mdt_loader: Validate that p_filesz < p_memsz
	soc: qcom: mdt_loader: Detect truncated read of segments
	ACPI: CPPC: Replace cppc_attr with kobj_attribute
	crypto: qat - Fix a double free in adf_create_ring
	cpufreq: armada-37xx: Fix setting TBG parent for load levels
	clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock
	cpufreq: armada-37xx: Fix the AVS value for load L1
	clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz
	clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0
	cpufreq: armada-37xx: Fix driver cleanup when registration failed
	cpufreq: armada-37xx: Fix determining base CPU frequency
	usb: gadget: r8a66597: Add missing null check on return from platform_get_resource
	USB: cdc-acm: fix unprivileged TIOCCSERIAL
	tty: actually undefine superseded ASYNC flags
	tty: fix return value for unsupported ioctls
	firmware: qcom-scm: Fix QCOM_SCM configuration
	usbip: vudc: fix missing unlock on error in usbip_sockfd_store()
	platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table
	x86/platform/uv: Fix !KEXEC build failure
	Drivers: hv: vmbus: Increase wait time for VMbus unload
	usb: dwc2: Fix host mode hibernation exit with remote wakeup flow.
	usb: dwc2: Fix hibernation between host and device modes.
	ttyprintk: Add TTY hangup callback.
	soc: aspeed: fix a ternary sign expansion bug
	media: vivid: fix assignment of dev->fbuf_out_flags
	media: omap4iss: return error code when omap4iss_get() failed
	media: m88rs6000t: avoid potential out-of-bounds reads on arrays
	drm/amdkfd: fix build error with AMD_IOMMU_V2=m
	x86/kprobes: Fix to check non boostable prefixes correctly
	pata_arasan_cf: fix IRQ check
	pata_ipx4xx_cf: fix IRQ check
	sata_mv: add IRQ checks
	ata: libahci_platform: fix IRQ check
	nvme: retrigger ANA log update if group descriptor isn't found
	vfio/mdev: Do not allow a mdev_type to have a NULL parent pointer
	clk: qcom: a53-pll: Add missing MODULE_DEVICE_TABLE
	clk: uniphier: Fix potential infinite loop
	scsi: jazz_esp: Add IRQ check
	scsi: sun3x_esp: Add IRQ check
	scsi: sni_53c710: Add IRQ check
	scsi: ibmvfc: Fix invalid state machine BUG_ON()
	mfd: stm32-timers: Avoid clearing auto reload register
	HSI: core: fix resource leaks in hsi_add_client_from_dt()
	x86/events/amd/iommu: Fix sysfs type mismatch
	sched/debug: Fix cgroup_path[] serialization
	drivers/block/null_blk/main: Fix a double free in null_init.
	HID: plantronics: Workaround for double volume key presses
	perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars
	net: lapbether: Prevent racing when checking whether the netif is running
	powerpc/prom: Mark identical_pvr_fixup as __init
	powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration
	ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
	bug: Remove redundant condition check in report_bug
	nfc: pn533: prevent potential memory corruption
	net: hns3: Limiting the scope of vector_ring_chain variable
	ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls
	liquidio: Fix unintented sign extension of a left shift of a u16
	powerpc/64s: Fix pte update for kernel memory on radix
	powerpc/perf: Fix PMU constraint check for EBB events
	powerpc: iommu: fix build when neither PCI or IBMVIO is set
	mac80211: bail out if cipher schemes are invalid
	mt7601u: fix always true expression
	IB/hfi1: Fix error return code in parse_platform_config()
	net: thunderx: Fix unintentional sign extension issue
	RDMA/srpt: Fix error return code in srpt_cm_req_recv()
	i2c: cadence: add IRQ check
	i2c: emev2: add IRQ check
	i2c: jz4780: add IRQ check
	i2c: sh7760: add IRQ check
	ASoC: ak5558: correct reset polarity
	drm/i915/gvt: Fix error code in intel_gvt_init_device()
	MIPS: pci-legacy: stop using of_pci_range_to_resource
	powerpc/pseries: extract host bridge from pci_bus prior to bus removal
	rtlwifi: 8821ae: upgrade PHY and RF parameters
	i2c: sh7760: fix IRQ error path
	mwl8k: Fix a double Free in mwl8k_probe_hw
	vsock/vmci: log once the failed queue pair allocation
	RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails
	ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails
	net: davinci_emac: Fix incorrect masking of tx and rx error channel
	ath9k: Fix error check in ath9k_hw_read_revisions() for PCI devices
	ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock
	powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add')
	bnxt_en: fix ternary sign extension bug in bnxt_show_temp()
	ARM: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E
	arm64: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E
	net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb
	net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send
	RDMA/bnxt_re: Fix a double free in bnxt_qplib_alloc_res
	net:nfc:digital: Fix a double free in digital_tg_recv_dep_req
	kfifo: fix ternary sign extension bugs
	mm/sparse: add the missing sparse_buffer_fini() in error branch
	mm/memory-failure: unnecessary amount of unmapping
	net: Only allow init netns to set default tcp cong to a restricted algo
	smp: Fix smp_call_function_single_async prototype
	Revert "net/sctp: fix race condition in sctp_destroy_sock"
	sctp: delay auto_asconf init until binding the first addr
	Revert "of/fdt: Make sure no-map does not remove already reserved regions"
	Revert "fdt: Properly handle "no-map" field in the memory region"
	tpm: fix error return code in tpm2_get_cc_attrs_tbl()
	fs: dlm: fix debugfs dump
	tipc: convert dest node's address to network order
	ASoC: Intel: bytcr_rt5640: Enable jack-detect support on Asus T100TAF
	net: stmmac: Set FIFO sizes for ipq806x
	i2c: bail out early when RDWR parameters are wrong
	ALSA: hdsp: don't disable if not enabled
	ALSA: hdspm: don't disable if not enabled
	ALSA: rme9652: don't disable if not enabled
	Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default
	Bluetooth: initialize skb_queue_head at l2cap_chan_create()
	net: bridge: when suppression is enabled exclude RARP packets
	Bluetooth: check for zapped sk before connecting
	ip6_vti: proper dev_{hold|put} in ndo_[un]init methods
	ASoC: Intel: bytcr_rt5640: Add quirk for the Chuwi Hi8 tablet
	i2c: Add I2C_AQ_NO_REP_START adapter quirk
	mac80211: clear the beacon's CRC after channel switch
	pinctrl: samsung: use 'int' for register masks in Exynos
	cuse: prevent clone
	selftests: Set CC to clang in lib.mk if LLVM is set
	kconfig: nconf: stop endless search loops
	sctp: Fix out-of-bounds warning in sctp_process_asconf_param()
	powerpc/smp: Set numa node before updating mask
	ASoC: rt286: Generalize support for ALC3263 codec
	ethtool: ioctl: Fix out-of-bounds warning in store_link_ksettings_for_user()
	samples/bpf: Fix broken tracex1 due to kprobe argument change
	powerpc/pseries: Stop calling printk in rtas_stop_self()
	wl3501_cs: Fix out-of-bounds warnings in wl3501_send_pkt
	wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join
	powerpc/iommu: Annotate nested lock for lockdep
	net: ethernet: mtk_eth_soc: fix RX VLAN offload
	ia64: module: fix symbolizer crash on fdescr
	ASoC: rt286: Make RT286_SET_GPIO_* readable and writable
	f2fs: fix a redundant call to f2fs_balance_fs if an error occurs
	PCI: iproc: Fix return value of iproc_msi_irq_domain_alloc()
	PCI: Release OF node in pci_scan_device()'s error path
	ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook
	rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data()
	NFSv4.2: Always flush out writes in nfs42_proc_fallocate()
	NFS: Deal correctly with attribute generation counter overflow
	PCI: endpoint: Fix missing destroy_workqueue()
	pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
	NFSv4.2 fix handling of sr_eof in SEEK's reply
	rtc: ds1307: Fix wday settings for rx8130
	net: hns3: disable phy loopback setting in hclge_mac_start_phy
	sctp: do asoc update earlier in sctp_sf_do_dupcook_a
	ethernet:enic: Fix a use after free bug in enic_hard_start_xmit
	sctp: fix a SCTP_MIB_CURRESTAB leak in sctp_sf_do_dupcook_b
	netfilter: xt_SECMARK: add new revision to fix structure layout
	drm/radeon: Fix off-by-one power_state index heap overwrite
	drm/radeon: Avoid power table parsing memory leaks
	khugepaged: fix wrong result value for trace_mm_collapse_huge_page_isolate()
	mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts()
	ksm: fix potential missing rmap_item for stable_node
	net: fix nla_strcmp to handle more then one trailing null character
	smc: disallow TCP_ULP in smc_setsockopt()
	netfilter: nfnetlink_osf: Fix a missing skb_header_pointer() NULL check
	sched/fair: Fix unfairness caused by missing load decay
	kernel: kexec_file: fix error return code of kexec_calculate_store_digests()
	netfilter: nftables: avoid overflows in nft_hash_buckets()
	i40e: Fix use-after-free in i40e_client_subtask()
	ARC: entry: fix off-by-one error in syscall number validation
	powerpc/64s: Fix crashes when toggling stf barrier
	powerpc/64s: Fix crashes when toggling entry flush barrier
	hfsplus: prevent corruption in shrinking truncate
	squashfs: fix divide error in calculate_skip()
	userfaultfd: release page in error path to avoid BUG_ON
	drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected
	iio: proximity: pulsedlight: Fix rumtime PM imbalance on error
	usb: fotg210-hcd: Fix an error message
	ACPI: scan: Fix a memory leak in an error handling path
	blk-mq: Swap two calls in blk_mq_exit_queue()
	usb: dwc3: omap: improve extcon initialization
	usb: dwc3: pci: Enable usb2-gadget-lpm-disable for Intel Merrifield
	usb: xhci: Increase timeout for HC halt
	usb: dwc2: Fix gadget DMA unmap direction
	usb: core: hub: fix race condition about TRSMRCY of resume
	usb: dwc3: gadget: Return success always for kick transfer in ep queue
	xhci: Do not use GFP_KERNEL in (potentially) atomic context
	xhci: Add reset resume quirk for AMD xhci controller.
	iio: gyro: mpu3050: Fix reported temperature value
	iio: tsl2583: Fix division by a zero lux_val
	cdc-wdm: untangle a circular dependency between callback and softint
	KVM: x86: Cancel pvclock_gtod_work on module removal
	FDDI: defxx: Make MMIO the configuration default except for EISA
	MIPS: Reinstate platform `__div64_32' handler
	MIPS: Avoid DIVU in `__div64_32' is result would be zero
	MIPS: Avoid handcoded DIVU in `__div64_32' altogether
	thermal/core/fair share: Lock the thermal zone while looping over instances
	kobject_uevent: remove warning in init_uevent_argv()
	netfilter: conntrack: Make global sysctls readonly in non-init netns
	clk: exynos7: Mark aclk_fsys1_200 as critical
	nvme: do not try to reconfigure APST when the controller is not live
	x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes
	kgdb: fix gcc-11 warning on indentation
	usb: sl811-hcd: improve misleading indentation
	cxgb4: Fix the -Wmisleading-indentation warning
	isdn: capi: fix mismatched prototypes
	pinctrl: ingenic: Improve unreachable code generation
	xsk: Simplify detection of empty and full rings
	PCI: thunder: Fix compile testing
	ARM: 9066/1: ftrace: pause/unpause function graph tracer in cpu_suspend()
	ACPI / hotplug / PCI: Fix reference count leak in enable_slot()
	Input: elants_i2c - do not bind to i2c-hid compatible ACPI instantiated devices
	Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state
	um: Mark all kernel symbols as local
	ARM: 9075/1: kernel: Fix interrupted SMC calls
	scripts/recordmcount.pl: Fix RISC-V regex for clang
	riscv: Workaround mcount name prior to clang-13
	ceph: fix fscache invalidation
	scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
	gpiolib: acpi: Add quirk to ignore EC wakeups on Dell Venue 10 Pro 5055
	ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP
	block: reexpand iov_iter after read/write
	lib: stackdepot: turn depot_lock spinlock to raw_spinlock
	net: stmmac: Do not enable RX FIFO overflow interrupts
	ip6_gre: proper dev_{hold|put} in ndo_[un]init methods
	sit: proper dev_{hold|put} in ndo_[un]init methods
	ip6_tunnel: sit: proper dev_{hold|put} in ndo_[un]init methods
	ipv6: remove extra dev_hold() for fallback tunnels
	iomap: fix sub-page uptodate handling
	KVM: arm64: Initialize VCPU mdcr_el2 before loading it
	tweewide: Fix most Shebang lines
	scripts: switch explicitly to Python 3
	Linux 4.19.191

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2ea4fc6350bb5c5b5ae38ec7ad52ec20cf3b7aae
2021-05-22 11:54:36 +02:00
Ard Biesheuvel
67afaf1a0a crypto: api - check for ERR pointers in crypto_destroy_tfm()
[ Upstream commit 83681f2bebb34dbb3f03fecd8f570308ab8b7c2c ]

Given that crypto_alloc_tfm() may return ERR pointers, and to avoid
crashes on obscure error paths where such pointers are presented to
crypto_destroy_tfm() (such as [0]), add an ERR_PTR check there
before dereferencing the second argument as a struct crypto_tfm
pointer.

[0] https://lore.kernel.org/linux-crypto/000000000000de949705bc59e0f6@google.com/

Reported-by: syzbot+12cf5fbfdeba210a89dd@syzkaller.appspotmail.com
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-22 10:59:14 +02:00
Jiten Patel
dd588625da ice: add return value for functions where ICE is disabled
Add proper return value for functions defined when Inline
Crypto Driver is not enabled. This ensures any test case
calling ICE functions to fail gracefully and avoid potential
PCNOC errors.

Tests: 1. Boot sdm660 LA4.0 target with change (FBE enabled)
       2. Run create_key test-> Test fails (expected), no crash observed
       3. Reboot device -> Device booted Successfully
       4. Boot sdm660 LA.4.0 target with change (FDE enabled)
       5. Run create_key test-> Test PASSED, no crash observed
       6. Reboot device -> Device booted Successfully

Change-Id: I35e5c151d5b2860e77c092e6502e25ab1839e567
Signed-off-by: Jiten Patel <jitepate@codeaurora.org>
2021-03-25 06:33:01 -07:00
Jiten Patel
f22e39f73c msm: ice: Fix stack-out-of-bound erros on kasan builds
ice_type defined in local scope and is passed to class_create
function where it saves the passed buffer as name identifier.
Due to local scope the passed buffer becomes invalid and if
read during uevent can cause in stack-out-of-bounds errors.

This change adds two variable is_sdcc_ice and is_ufscard_ice
which is used to determine corrrect ice instance name. ice
instance names are global macro which is passed to clas_create
which fix stack-out-of-bound issue due to local scope.

Change-Id: I59e617263801a0741e45d423401ce1232b3d65d1
Signed-off-by: Jiten Patel <jitepate@codeaurora.org>
2021-03-07 19:46:04 -08:00
Srinivasarao P
20912a8acc Merge android-4.19-stable.157 (8ee67bc) into msm-4.19
* refs/heads/tmp-8ee67bc
  Revert "nl80211: fix non-split wiphy information"
  Reverting usb changes
  Linux 4.19.157
  powercap: restrict energy meter to root access
  Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple"
  Linux 4.19.156
  arm64: dts: marvell: espressobin: Add ethernet switch aliases
  net: dsa: read mac address from DT for slave device
  tools: perf: Fix build error in v4.19.y
  perf/core: Fix a memory leak in perf_event_parse_addr_filter()
  PM: runtime: Resume the device earlier in __device_release_driver()
  Revert "ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE"
  ARC: stack unwinding: avoid indefinite looping
  usb: mtu3: fix panic in mtu3_gadget_stop()
  USB: Add NO_LPM quirk for Kingston flash drive
  USB: serial: option: add Telit FN980 composition 0x1055
  USB: serial: option: add LE910Cx compositions 0x1203, 0x1230, 0x1231
  USB: serial: option: add Quectel EC200T module support
  USB: serial: cyberjack: fix write-URB completion race
  serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init
  serial: 8250_mtk: Fix uart_get_baud_rate warning
  fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
  vt: Disable KD_FONT_OP_COPY
  ACPI: NFIT: Fix comparison to '-ENXIO'
  drm/vc4: drv: Add error handding for bind
  vsock: use ns_capable_noaudit() on socket create
  scsi: core: Don't start concurrent async scan on same host
  blk-cgroup: Pre-allocate tree node on blkg_conf_prep
  blk-cgroup: Fix memleak on error path
  of: Fix reserved-memory overlap detection
  x86/kexec: Use up-to-dated screen_info copy to fill boot params
  ARM: dts: sun4i-a10: fix cpu_alert temperature
  futex: Handle transient "ownerless" rtmutex state correctly
  tracing: Fix out of bounds write in get_trace_buf
  ftrace: Handle tracing when switching between context
  ftrace: Fix recursion check for NMI test
  ring-buffer: Fix recursion protection transitions between interrupt context
  gfs2: Wake up when sd_glock_disposal becomes zero
  mm: always have io_remap_pfn_range() set pgprot_decrypted()
  kthread_worker: prevent queuing delayed work from timer_fn when it is being canceled
  lib/crc32test: remove extra local_irq_disable/enable
  mm: mempolicy: fix potential pte_unmap_unlock pte error
  ALSA: usb-audio: Add implicit feedback quirk for MODX
  ALSA: usb-audio: Add implicit feedback quirk for Qu-16
  ALSA: usb-audio: add usb vendor id as DSD-capable for Khadas devices
  ALSA: usb-audio: Add implicit feedback quirk for Zoom UAC-2
  Fonts: Replace discarded const qualifier
  btrfs: tree-checker: fix the error message for transid error
  btrfs: tree-checker: Verify inode item
  btrfs: tree-checker: Enhance chunk checker to validate chunk profile
  btrfs: tree-checker: Fix wrong check on max devid
  btrfs: tree-checker: Verify dev item
  btrfs: tree-checker: Check chunk item at tree block read time
  btrfs: tree-checker: Make btrfs_check_chunk_valid() return EUCLEAN instead of EIO
  btrfs: tree-checker: Make chunk item checker messages more readable
  btrfs: Move btrfs_check_chunk_valid() to tree-check.[ch] and export it
  btrfs: Don't submit any btree write bio if the fs has errors
  Btrfs: fix unwritten extent buffers and hangs on future writeback attempts
  btrfs: extent_io: add proper error handling to lock_extent_buffer_for_io()
  btrfs: extent_io: Handle errors better in btree_write_cache_pages()
  btrfs: extent_io: Handle errors better in extent_write_full_page()
  btrfs: flush write bio if we loop in extent_write_cache_pages
  Revert "btrfs: flush write bio if we loop in extent_write_cache_pages"
  btrfs: extent_io: Move the BUG_ON() in flush_write_bio() one level up
  btrfs: extent_io: Kill the forward declaration of flush_write_bio
  blktrace: fix debugfs use after free
  sfp: Fix error handing in sfp_probe()
  sctp: Fix COMM_LOST/CANT_STR_ASSOC err reporting on big-endian platforms
  net: usb: qmi_wwan: add Telit LE910Cx 0x1230 composition
  gianfar: Account for Tx PTP timestamp in the skb headroom
  gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP
  chelsio/chtls: fix always leaking ctrl_skb
  chelsio/chtls: fix memory leaks caused by a race
  cadence: force nonlinear buffers to be cloned
  ptrace: fix task_join_group_stop() for the case when current is traced
  tipc: fix use-after-free in tipc_bcast_get_mode
  drm/i915: Break up error capture compression loops with cond_resched()
  ANDROID: fuse: Add support for d_canonical_path
  ANDROID: vfs: add d_canonical_path for stacked filesystem support
  ANDROID: Temporarily disable XFRM_USER_COMPAT filtering
  Linux 4.19.155
  staging: octeon: Drop on uncorrectable alignment or FCS error
  staging: octeon: repair "fixed-link" support
  staging: comedi: cb_pcidas: Allow 2-channel commands for AO subdevice
  KVM: arm64: Fix AArch32 handling of DBGD{CCINT,SCRext} and DBGVCR
  device property: Don't clear secondary pointer for shared primary firmware node
  device property: Keep secondary firmware node secondary by type
  ARM: s3c24xx: fix missing system reset
  ARM: samsung: fix PM debug build with DEBUG_LL but !MMU
  arm: dts: mt7623: add missing pause for switchport
  hil/parisc: Disable HIL driver when it gets stuck
  cachefiles: Handle readpage error correctly
  arm64: berlin: Select DW_APB_TIMER_OF
  tty: make FONTX ioctl use the tty pointer they were actually passed
  rtc: rx8010: don't modify the global rtc ops
  drm/ttm: fix eviction valuable range check.
  ext4: fix invalid inode checksum
  ext4: fix error handling code in add_new_gdb
  ext4: fix leaking sysfs kobject after failed mount
  vringh: fix __vringh_iov() when riov and wiov are different
  ring-buffer: Return 0 on success from ring_buffer_resize()
  9P: Cast to loff_t before multiplying
  libceph: clear con->out_msg on Policy::stateful_server faults
  ceph: promote to unsigned long long before shifting
  drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally
  drm/amdgpu: don't map BO in reserved region
  i2c: imx: Fix external abort on interrupt in exit paths
  ia64: fix build error with !COREDUMP
  ubi: check kthread_should_stop() after the setting of task state
  perf python scripting: Fix printable strings in python3 scripts
  ubifs: dent: Fix some potential memory leaks while iterating entries
  NFSD: Add missing NFSv2 .pc_func methods
  NFSv4.2: support EXCHGID4_FLAG_SUPP_FENCE_OPS 4.2 EXCHANGE_ID flag
  powerpc: Fix undetected data corruption with P9N DD2.1 VSX CI load emulation
  powerpc/powernv/elog: Fix race while processing OPAL error log event.
  powerpc: Warn about use of smt_snooze_delay
  powerpc/rtas: Restrict RTAS requests from userspace
  s390/stp: add locking to sysfs functions
  powerpc/drmem: Make lmb_size 64 bit
  iio:gyro:itg3200: Fix timestamp alignment and prevent data leak.
  iio:adc:ti-adc12138 Fix alignment issue with timestamp
  iio:adc:ti-adc0832 Fix alignment issue with timestamp
  iio:light:si1145: Fix timestamp alignment and prevent data leak.
  dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status
  udf: Fix memory leak when mounting
  HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery
  vt: keyboard, extend func_buf_lock to readers
  vt: keyboard, simplify vt_kdgkbsent
  drm/i915: Force VT'd workarounds when running as a guest OS
  usb: host: fsl-mph-dr-of: check return of dma_set_mask()
  usb: typec: tcpm: reset hard_reset_count for any disconnect
  usb: cdc-acm: fix cooldown mechanism
  usb: dwc3: core: don't trigger runtime pm when remove driver
  usb: dwc3: core: add phy cleanup for probe error handling
  usb: dwc3: gadget: Check MPS of the request length
  usb: dwc3: ep0: Fix ZLP for OUT ep0 requests
  usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC
  btrfs: fix use-after-free on readahead extent after failure to create it
  btrfs: cleanup cow block on error
  btrfs: use kvzalloc() to allocate clone_roots in btrfs_ioctl_send()
  btrfs: send, recompute reference path after orphanization of a directory
  btrfs: reschedule if necessary when logging directory items
  btrfs: improve device scanning messages
  btrfs: qgroup: fix wrong qgroup metadata reserve for delayed inode
  scsi: qla2xxx: Fix crash on session cleanup with unload
  scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove()
  w1: mxc_w1: Fix timeout resolution problem leading to bus error
  acpi-cpufreq: Honor _PSD table setting on new AMD CPUs
  ACPI: debug: don't allow debugging when ACPI is disabled
  ACPI: video: use ACPI backlight for HP 635 Notebook
  ACPI / extlog: Check for RDMSR failure
  ACPI: button: fix handling lid state changes when input device closed
  NFS: fix nfs_path in case of a rename retry
  fs: Don't invalidate page buffers in block_write_full_page()
  media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect
  leds: bcm6328, bcm6358: use devres LED registering function
  perf/x86/amd/ibs: Fix raw sample data accumulation
  perf/x86/amd/ibs: Don't include randomized bits in get_ibs_op_count()
  mmc: sdhci-acpi: AMDI0040: Set SDHCI_QUIRK2_PRESET_VALUE_BROKEN
  md/raid5: fix oops during stripe resizing
  nvme-rdma: fix crash when connect rejected
  sgl_alloc_order: fix memory leak
  nbd: make the config put is called before the notifying the waiter
  ARM: dts: s5pv210: remove dedicated 'audio-subsystem' node
  ARM: dts: s5pv210: move PMU node out of clock controller
  ARM: dts: s5pv210: remove DMA controller bus node name to fix dtschema warnings
  memory: emif: Remove bogus debugfs error handling
  ARM: dts: omap4: Fix sgx clock rate for 4430
  arm64: dts: renesas: ulcb: add full-pwr-cycle-in-suspend into eMMC nodes
  cifs: handle -EINTR in cifs_setattr
  gfs2: add validation checks for size of superblock
  ext4: Detect already used quota file early
  drivers: watchdog: rdc321x_wdt: Fix race condition bugs
  net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid
  clk: ti: clockdomain: fix static checker warning
  rpmsg: glink: Use complete_all for open states
  bnxt_en: Log unknown link speed appropriately.
  md/bitmap: md_bitmap_get_counter returns wrong blocks
  btrfs: fix replace of seed device
  drm/amd/display: HDMI remote sink need mode validation for Linux
  power: supply: test_power: add missing newlines when printing parameters by sysfs
  bus/fsl_mc: Do not rely on caller to provide non NULL mc_io
  drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values
  ACPI: Add out of bounds and numa_off protections to pxm_to_node()
  xfs: don't free rt blocks when we're doing a REMAP bunmapi call
  arm64/mm: return cpu_all_mask when node is NUMA_NO_NODE
  usb: xhci: omit duplicate actions when suspending a runtime suspended host.
  uio: free uio id after uio file node is freed
  USB: adutux: fix debugging
  cpufreq: sti-cpufreq: add stih418 support
  riscv: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
  media: uvcvideo: Fix dereference of out-of-bound list iterator
  kgdb: Make "kgdbcon" work properly with "kgdb_earlycon"
  ia64: kprobes: Use generic kretprobe trampoline handler
  printk: reduce LOG_BUF_SHIFT range for H8300
  arm64: topology: Stop using MPIDR for topology information
  drm/bridge/synopsys: dsi: add support for non-continuous HS clock
  mmc: via-sdmmc: Fix data race bug
  media: imx274: fix frame interval handling
  media: tw5864: check status of tw5864_frameinterval_get
  usb: typec: tcpm: During PR_SWAP, source caps should be sent only after tSwapSourceStart
  media: platform: Improve queue set up flow for bug fixing
  media: videodev2.h: RGB BT2020 and HSV are always full range
  drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly
  ath10k: fix VHT NSS calculation when STBC is enabled
  ath10k: start recovery process when payload length exceeds max htc length for sdio
  video: fbdev: pvr2fb: initialize variables
  xfs: fix realtime bitmap/summary file truncation when growing rt volume
  power: supply: bq27xxx: report "not charging" on all types
  ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses
  um: change sigio_spinlock to a mutex
  f2fs: fix to check segment boundary during SIT page readahead
  f2fs: fix uninit-value in f2fs_lookup
  f2fs: add trace exit in exception path
  sparc64: remove mm_cpumask clearing to fix kthread_use_mm race
  powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
  mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race
  powerpc/powernv/smp: Fix spurious DBG() warning
  futex: Fix incorrect should_fail_futex() handling
  ata: sata_nv: Fix retrieving of active qcs
  RDMA/qedr: Fix memory leak in iWARP CM
  mlxsw: core: Fix use-after-free in mlxsw_emad_trans_finish()
  x86/unwind/orc: Fix inactive tasks with stack pointer in %sp on GCC 10 compiled kernels
  xen/events: block rogue events for some time
  xen/events: defer eoi in case of excessive number of events
  xen/events: use a common cpu hotplug hook for event channels
  xen/events: switch user event channels to lateeoi model
  xen/pciback: use lateeoi irq binding
  xen/pvcallsback: use lateeoi irq binding
  xen/scsiback: use lateeoi irq binding
  xen/netback: use lateeoi irq binding
  xen/blkback: use lateeoi irq binding
  xen/events: add a new "late EOI" evtchn framework
  xen/events: fix race in evtchn_fifo_unmask()
  xen/events: add a proper barrier to 2-level uevent unmasking
  xen/events: avoid removing an event channel while handling it
  xen/events: don't use chip_data for legacy IRQs
  Revert "block: ratelimit handle_bad_sector() message"
  fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext
  fscrypt: only set dentry_operations on ciphertext dentries
  fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory
  fscrypt: fix race allowing rename() and link() of ciphertext dentries
  fscrypt: clean up and improve dentry revalidation
  fscrypt: return -EXDEV for incompatible rename or link into encrypted dir
  ata: sata_rcar: Fix DMA boundary mask
  serial: pl011: Fix lockdep splat when handling magic-sysrq interrupt
  mtd: lpddr: Fix bad logic in print_drs_error
  RDMA/addr: Fix race with netevent_callback()/rdma_addr_cancel()
  cxl: Rework error message for incompatible slots
  p54: avoid accessing the data mapped to streaming DMA
  evm: Check size of security.evm before using it
  bpf: Fix comment for helper bpf_current_task_under_cgroup()
  fuse: fix page dereference after free
  x86/xen: disable Firmware First mode for correctable memory errors
  arch/x86/amd/ibs: Fix re-arming IBS Fetch
  cxgb4: set up filter action after rewrites
  r8169: fix issue with forced threading in combination with shared interrupts
  tipc: fix memory leak caused by tipc_buf_append()
  tcp: Prevent low rmem stalls with SO_RCVLOWAT.
  ravb: Fix bit fields checking in ravb_hwtstamp_get()
  netem: fix zero division in tabledist
  mlxsw: core: Fix memory leak on module removal
  gtp: fix an use-before-init in gtp_newlink()
  chelsio/chtls: fix tls record info to user
  chelsio/chtls: fix memory leaks in CPL handlers
  chelsio/chtls: fix deadlock issue
  efivarfs: Replace invalid slashes with exclamation marks in dentries.
  x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled
  arm64: link with -z norelro regardless of CONFIG_RELOCATABLE
  arm64: Run ARCH_WORKAROUND_1 enabling code on all CPUs
  scripts/setlocalversion: make git describe output more reliable
  objtool: Support Clang non-section symbols in ORC generation
  ANDROID: GKI: Enable DEBUG_INFO_DWARF4
  UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller
  BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
  BACKPORT: xfrm/compat: Add 32=>64-bit messages translator
  UPSTREAM: xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
  UPSTREAM: xfrm/compat: Add 64=>32-bit messages translator
  BACKPORT: xfrm: Provide API to register translator module
  ANDROID: Publish uncompressed Image on aarch64
  FROMLIST: crypto: arm64/poly1305-neon - reorder PAC authentication with SP update
  UPSTREAM: crypto: arm64/chacha - fix chacha_4block_xor_neon() for big endian
  UPSTREAM: crypto: arm64/chacha - fix hchacha_block_neon() for big endian
  Linux 4.19.154
  usb: gadget: f_ncm: allow using NCM in SuperSpeed Plus gadgets.
  eeprom: at25: set minimum read/write access stride to 1
  USB: cdc-wdm: Make wdm_flush() interruptible and add wdm_fsync().
  usb: cdc-acm: add quirk to blacklist ETAS ES58X devices
  tty: serial: fsl_lpuart: fix lpuart32_poll_get_char
  net: korina: cast KSEG0 address to pointer in kfree
  ath10k: check idx validity in __ath10k_htt_rx_ring_fill_n()
  scsi: ufs: ufs-qcom: Fix race conditions caused by ufs_qcom_testbus_config()
  usb: core: Solve race condition in anchor cleanup functions
  brcm80211: fix possible memleak in brcmf_proto_msgbuf_attach
  mwifiex: don't call del_timer_sync() on uninitialized timer
  reiserfs: Fix memory leak in reiserfs_parse_options()
  ipvs: Fix uninit-value in do_ip_vs_set_ctl()
  tty: ipwireless: fix error handling
  scsi: qedi: Fix list_del corruption while removing active I/O
  scsi: qedi: Protect active command list to avoid list corruption
  Fix use after free in get_capset_info callback.
  rtl8xxxu: prevent potential memory leak
  brcmsmac: fix memory leak in wlc_phy_attach_lcnphy
  scsi: ibmvfc: Fix error return in ibmvfc_probe()
  Bluetooth: Only mark socket zapped after unlocking
  usb: ohci: Default to per-port over-current protection
  xfs: make sure the rt allocator doesn't run off the end
  reiserfs: only call unlock_new_inode() if I_NEW
  misc: rtsx: Fix memory leak in rtsx_pci_probe
  ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()
  can: flexcan: flexcan_chip_stop(): add error handling and propagate error value
  usb: dwc3: simple: add support for Hikey 970
  USB: cdc-acm: handle broken union descriptors
  udf: Avoid accessing uninitialized data on failed inode read
  udf: Limit sparing table size
  usb: gadget: function: printer: fix use-after-free in __lock_acquire
  misc: vop: add round_up(x,4) for vring_size to avoid kernel panic
  mic: vop: copy data to kernel space then write to io memory
  scsi: target: core: Add CONTROL field for trace events
  scsi: mvumi: Fix error return in mvumi_io_attach()
  PM: hibernate: remove the bogus call to get_gendisk() in software_resume()
  mac80211: handle lack of sband->bitrates in rates
  ip_gre: set dev->hard_header_len and dev->needed_headroom properly
  ntfs: add check for mft record size in superblock
  media: venus: core: Fix runtime PM imbalance in venus_probe
  fs: dlm: fix configfs memory leak
  media: saa7134: avoid a shift overflow
  mmc: sdio: Check for CISTPL_VERS_1 buffer size
  media: uvcvideo: Ensure all probed info is returned to v4l2
  media: media/pci: prevent memory leak in bttv_probe
  media: bdisp: Fix runtime PM imbalance on error
  media: platform: sti: hva: Fix runtime PM imbalance on error
  media: platform: s3c-camif: Fix runtime PM imbalance on error
  media: vsp1: Fix runtime PM imbalance on error
  media: exynos4-is: Fix a reference count leak
  media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync
  media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync
  media: sti: Fix reference count leaks
  media: st-delta: Fix reference count leak in delta_run_work
  media: ati_remote: sanity check for both endpoints
  media: firewire: fix memory leak
  crypto: ccp - fix error handling
  block: ratelimit handle_bad_sector() message
  i2c: core: Restore acpi_walk_dep_device_list() getting called after registering the ACPI i2c devs
  perf: correct SNOOPX field offset
  sched/features: Fix !CONFIG_JUMP_LABEL case
  NTB: hw: amd: fix an issue about leak system resources
  nvmet: fix uninitialized work for zero kato
  powerpc/powernv/dump: Fix race while processing OPAL dump
  arm64: dts: zynqmp: Remove additional compatible string for i2c IPs
  ARM: dts: owl-s500: Fix incorrect PPI interrupt specifiers
  arm64: dts: qcom: msm8916: Fix MDP/DSI interrupts
  arm64: dts: qcom: pm8916: Remove invalid reg size from wcd_codec
  memory: fsl-corenet-cf: Fix handling of platform_get_irq() error
  memory: omap-gpmc: Fix build error without CONFIG_OF
  memory: omap-gpmc: Fix a couple off by ones
  ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix dcdc1 regulator
  ARM: dts: imx6sl: fix rng node
  netfilter: nf_fwd_netdev: clear timestamp in forwarding path
  netfilter: conntrack: connection timeout after re-register
  KVM: x86: emulating RDPID failure shall return #UD rather than #GP
  Input: sun4i-ps2 - fix handling of platform_get_irq() error
  Input: twl4030_keypad - fix handling of platform_get_irq() error
  Input: omap4-keypad - fix handling of platform_get_irq() error
  Input: ep93xx_keypad - fix handling of platform_get_irq() error
  Input: stmfts - fix a & vs && typo
  Input: imx6ul_tsc - clean up some errors in imx6ul_tsc_resume()
  SUNRPC: fix copying of multiple pages in gss_read_proxy_verf()
  vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages
  vfio/pci: Clear token on bypass registration failure
  ext4: limit entries returned when counting fsmap records
  svcrdma: fix bounce buffers for unaligned offsets and multiple pages
  watchdog: sp5100: Fix definition of EFCH_PM_DECODEEN3
  watchdog: Use put_device on error
  watchdog: Fix memleak in watchdog_cdev_register
  clk: bcm2835: add missing release if devm_clk_hw_register fails
  clk: at91: clk-main: update key before writing AT91_CKGR_MOR
  clk: rockchip: Initialize hw to error to avoid undefined behavior
  pwm: img: Fix null pointer access in probe
  rpmsg: smd: Fix a kobj leak in in qcom_smd_parse_edge()
  PCI: iproc: Set affinity mask on MSI interrupts
  i2c: rcar: Auto select RESET_CONTROLLER
  mailbox: avoid timer start from callback
  rapidio: fix the missed put_device() for rio_mport_add_riodev
  rapidio: fix error handling path
  ramfs: fix nommu mmap with gaps in the page cache
  lib/crc32.c: fix trivial typo in preprocessor condition
  f2fs: wait for sysfs kobject removal before freeing f2fs_sb_info
  IB/rdmavt: Fix sizeof mismatch
  cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier
  powerpc/perf/hv-gpci: Fix starting index value
  powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints
  overflow: Include header file with SIZE_MAX declaration
  kdb: Fix pager search for multi-line strings
  RDMA/hns: Fix missing sq_sig_type when querying QP
  RDMA/hns: Set the unsupported wr opcode
  perf intel-pt: Fix "context_switch event has no tid" error
  RDMA/cma: Consolidate the destruction of a cma_multicast in one place
  RDMA/cma: Remove dead code for kernel rdmacm multicast
  powerpc/64s/radix: Fix mm_cpumask trimming race vs kthread_use_mm
  powerpc/tau: Disable TAU between measurements
  powerpc/tau: Check processor type before enabling TAU interrupt
  ANDROID: GKI: update the ABI xml
  Linux 4.19.153
  powerpc/tau: Remove duplicated set_thresholds() call
  powerpc/tau: Convert from timer to workqueue
  powerpc/tau: Use appropriate temperature sample interval
  RDMA/qedr: Fix inline size returned for iWARP
  RDMA/qedr: Fix use of uninitialized field
  xfs: fix high key handling in the rt allocator's query_range function
  xfs: limit entries returned when counting fsmap records
  arc: plat-hsdk: fix kconfig dependency warning when !RESET_CONTROLLER
  ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values
  mtd: mtdoops: Don't write panic data twice
  powerpc/pseries: explicitly reschedule during drmem_lmb list traversal
  mtd: lpddr: fix excessive stack usage with clang
  RDMA/ucma: Add missing locking around rdma_leave_multicast()
  RDMA/ucma: Fix locking for ctx->events_reported
  powerpc/icp-hv: Fix missing of_node_put() in success path
  powerpc/pseries: Fix missing of_node_put() in rng_init()
  IB/mlx4: Adjust delayed work when a dup is observed
  IB/mlx4: Fix starvation in paravirt mux/demux
  mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary
  mm/memcg: fix device private memcg accounting
  netfilter: nf_log: missing vlan offload tag and proto
  net: korina: fix kfree of rx/tx descriptor array
  ipvs: clear skb->tstamp in forwarding path
  mwifiex: fix double free
  platform/x86: mlx-platform: Remove PSU EEPROM configuration
  scsi: be2iscsi: Fix a theoretical leak in beiscsi_create_eqs()
  scsi: target: tcmu: Fix warning: 'page' may be used uninitialized
  usb: dwc2: Fix INTR OUT transfers in DDMA mode.
  nl80211: fix non-split wiphy information
  usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well
  usb: gadget: f_ncm: fix ncm_bitrate for SuperSpeed and above.
  iwlwifi: mvm: split a print to avoid a WARNING in ROC
  mfd: sm501: Fix leaks in probe()
  net: enic: Cure the enic api locking trainwreck
  qtnfmac: fix resource leaks on unsupported iftype error return path
  HID: hid-input: fix stylus battery reporting
  slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback
  slimbus: core: do not enter to clock pause mode in core
  slimbus: core: check get_addr before removing laddr ida
  quota: clear padding in v2r1_mem2diskdqb()
  usb: dwc2: Fix parameter type in function pointer prototype
  ALSA: seq: oss: Avoid mutex lock for a long-time ioctl
  misc: mic: scif: Fix error handling path
  ath6kl: wmi: prevent a shift wrapping bug in ath6kl_wmi_delete_pstream_cmd()
  net: dsa: rtl8366rb: Support all 4096 VLANs
  net: dsa: rtl8366: Skip PVID setting if not requested
  net: dsa: rtl8366: Refactor VLAN/PVID init
  net: dsa: rtl8366: Check validity of passed VLANs
  cpufreq: armada-37xx: Add missing MODULE_DEVICE_TABLE
  net: stmmac: use netif_tx_start|stop_all_queues() function
  net/mlx5: Don't call timecounter cyc2time directly from 1PPS flow
  pinctrl: mcp23s08: Fix mcp23x17 precious range
  pinctrl: mcp23s08: Fix mcp23x17_regmap initialiser
  HID: roccat: add bounds checking in kone_sysfs_write_settings()
  video: fbdev: radeon: Fix memleak in radeonfb_pci_register
  video: fbdev: sis: fix null ptr dereference
  video: fbdev: vga16fb: fix setting of pixclock because a pass-by-value error
  drivers/virt/fsl_hypervisor: Fix error handling path
  pwm: lpss: Add range limit check for the base_unit register value
  pwm: lpss: Fix off by one error in base_unit math in pwm_lpss_prepare()
  pty: do tty_flip_buffer_push without port->lock in pty_write
  tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup()
  tty: serial: earlycon dependency
  VMCI: check return value of get_user_pages_fast() for errors
  backlight: sky81452-backlight: Fix refcount imbalance on error
  scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()
  scsi: qla2xxx: Fix wrong return value in qla_nvme_register_hba()
  scsi: qla4xxx: Fix an error handling path in 'qla4xxx_get_host_stats()'
  drm/gma500: fix error check
  staging: rtl8192u: Do not use GFP_KERNEL in atomic context
  mwifiex: Do not use GFP_KERNEL in atomic context
  brcmfmac: check ndev pointer
  ASoC: qcom: lpass-cpu: fix concurrency issue
  ASoC: qcom: lpass-platform: fix memory leak
  wcn36xx: Fix reported 802.11n rx_highest rate wcn3660/wcn3680
  ath10k: Fix the size used in a 'dma_free_coherent()' call in an error handling path
  ath9k: Fix potential out of bounds in ath9k_htc_txcompletion_cb()
  ath6kl: prevent potential array overflow in ath6kl_add_new_sta()
  Bluetooth: hci_uart: Cancel init work before unregistering
  ath10k: provide survey info as accumulated data
  spi: spi-s3c64xx: Check return values
  spi: spi-s3c64xx: swap s3c64xx_spi_set_cs() and s3c64xx_enable_datapath()
  pinctrl: bcm: fix kconfig dependency warning when !GPIOLIB
  regulator: resolve supply after creating regulator
  media: ti-vpe: Fix a missing check and reference count leak
  media: stm32-dcmi: Fix a reference count leak
  media: s5p-mfc: Fix a reference count leak
  media: camss: Fix a reference count leak.
  media: platform: fcp: Fix a reference count leak.
  media: rockchip/rga: Fix a reference count leak.
  media: rcar-vin: Fix a reference count leak.
  media: tc358743: cleanup tc358743_cec_isr
  media: tc358743: initialize variable
  media: mx2_emmaprp: Fix memleak in emmaprp_probe
  cypto: mediatek - fix leaks in mtk_desc_ring_alloc
  hwmon: (pmbus/max34440) Fix status register reads for MAX344{51,60,61}
  crypto: omap-sham - fix digcnt register handling with export/import
  media: omap3isp: Fix memleak in isp_probe
  media: uvcvideo: Silence shift-out-of-bounds warning
  media: uvcvideo: Set media controller entity functions
  media: m5mols: Check function pointer in m5mols_sensor_power
  media: Revert "media: exynos4-is: Add missed check for pinctrl_lookup_state()"
  media: tuner-simple: fix regression in simple_set_radio_freq
  crypto: picoxcell - Fix potential race condition bug
  crypto: ixp4xx - Fix the size used in a 'dma_free_coherent()' call
  crypto: mediatek - Fix wrong return value in mtk_desc_ring_alloc()
  crypto: algif_skcipher - EBUSY on aio should be an error
  x86/events/amd/iommu: Fix sizeof mismatch
  x86/nmi: Fix nmi_handle() duration miscalculation
  drivers/perf: xgene_pmu: Fix uninitialized resource struct
  x86/fpu: Allow multiple bits in clearcpuid= parameter
  EDAC/ti: Fix handling of platform_get_irq() error
  EDAC/i5100: Fix error handling order in i5100_init_one()
  crypto: algif_aead - Do not set MAY_BACKLOG on the async path
  ima: Don't ignore errors from crypto_shash_update()
  KVM: SVM: Initialize prev_ga_tag before use
  KVM: x86/mmu: Commit zap of remaining invalid pages when recovering lpages
  cifs: Return the error from crypt_message when enc/dec key not found.
  cifs: remove bogus debug code
  ALSA: hda/realtek: Enable audio jacks of ASUS D700SA with ALC887
  icmp: randomize the global rate limiter
  r8169: fix operation under forced interrupt threading
  tcp: fix to update snd_wl1 in bulk receiver fast path
  nfc: Ensure presence of NFC_ATTR_FIRMWARE_NAME attribute in nfc_genl_fw_download()
  net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels
  net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup
  net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device
  chelsio/chtls: correct function return and return type
  chelsio/chtls: correct netdevice for vlan interface
  chelsio/chtls: fix socket lock
  ALSA: bebob: potential info leak in hwdep_read()
  binder: fix UAF when releasing todo list
  net/tls: sendfile fails with ktls offload
  r8169: fix data corruption issue on RTL8402
  net/ipv4: always honour route mtu during forwarding
  tipc: fix the skb_unshare() in tipc_buf_append()
  net: usb: qmi_wwan: add Cellient MPL200 card
  net/smc: fix valid DMBE buffer sizes
  net: fix pos incrementment in ipv6_route_seq_next
  net: fec: Fix PHY init after phy_reset_after_clk_enable()
  net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()
  mlx4: handle non-napi callers to napi_poll
  ipv4: Restore flowi4_oif update before call to xfrm_lookup_route
  ibmveth: Identify ingress large send packets.
  ibmveth: Switch order of ibmveth_helper calls.
  ANDROID: clang: update to 11.0.5
  FROMLIST: arm64: link with -z norelro regardless of CONFIG_RELOCATABLE
  ANDROID: GKI: enable CONFIG_WIREGUARD
  UPSTREAM: wireguard: peerlookup: take lock before checking hash in replace operation
  UPSTREAM: wireguard: noise: take lock when removing handshake entry from table
  UPSTREAM: wireguard: queueing: make use of ip_tunnel_parse_protocol
  UPSTREAM: net: ip_tunnel: add header_ops for layer 3 devices
  UPSTREAM: wireguard: receive: account for napi_gro_receive never returning GRO_DROP
  UPSTREAM: wireguard: device: avoid circular netns references
  UPSTREAM: wireguard: noise: do not assign initiation time in if condition
  UPSTREAM: wireguard: noise: separate receive counter from send counter
  UPSTREAM: wireguard: queueing: preserve flow hash across packet scrubbing
  UPSTREAM: wireguard: noise: read preshared key while taking lock
  UPSTREAM: wireguard: selftests: use newer iproute2 for gcc-10
  UPSTREAM: wireguard: send/receive: use explicit unlikely branch instead of implicit coalescing
  UPSTREAM: wireguard: selftests: initalize ipv6 members to NULL to squelch clang warning
  UPSTREAM: wireguard: send/receive: cond_resched() when processing worker ringbuffers
  UPSTREAM: wireguard: socket: remove errant restriction on looping to self
  UPSTREAM: wireguard: selftests: use normal kernel stack size on ppc64
  UPSTREAM: wireguard: receive: use tunnel helpers for decapsulating ECN markings
  UPSTREAM: wireguard: queueing: cleanup ptr_ring in error path of packet_queue_init
  UPSTREAM: wireguard: send: remove errant newline from packet_encrypt_worker
  UPSTREAM: wireguard: noise: error out precomputed DH during handshake rather than config
  UPSTREAM: wireguard: receive: remove dead code from default packet type case
  UPSTREAM: wireguard: queueing: account for skb->protocol==0
  UPSTREAM: wireguard: selftests: remove duplicated include <sys/types.h>
  UPSTREAM: wireguard: socket: remove extra call to synchronize_net
  UPSTREAM: wireguard: send: account for mtu=0 devices
  UPSTREAM: wireguard: receive: reset last_under_load to zero
  UPSTREAM: wireguard: selftests: reduce complexity and fix make races
  UPSTREAM: wireguard: device: use icmp_ndo_send helper
  UPSTREAM: wireguard: selftests: tie socket waiting to target pid
  UPSTREAM: wireguard: selftests: ensure non-addition of peers with failed precomputation
  UPSTREAM: wireguard: noise: reject peers with low order public keys
  UPSTREAM: wireguard: allowedips: fix use-after-free in root_remove_peer_lists
  UPSTREAM: net: skbuff: disambiguate argument and member for skb_list_walk_safe helper
  UPSTREAM: net: introduce skb_list_walk_safe for skb segment walking
  UPSTREAM: wireguard: socket: mark skbs as not on list when receiving via gro
  UPSTREAM: wireguard: queueing: do not account for pfmemalloc when clearing skb header
  UPSTREAM: wireguard: selftests: remove ancient kernel compatibility code
  UPSTREAM: wireguard: allowedips: use kfree_rcu() instead of call_rcu()
  UPSTREAM: wireguard: main: remove unused include <linux/version.h>
  UPSTREAM: wireguard: global: fix spelling mistakes in comments
  UPSTREAM: wireguard: Kconfig: select parent dependency for crypto
  UPSTREAM: wireguard: selftests: import harness makefile for test suite
  UPSTREAM: net: WireGuard secure network tunnel
  UPSTREAM: timekeeping: Boot should be boottime for coarse ns accessor
  UPSTREAM: timekeeping: Add missing _ns functions for coarse accessors
  UPSTREAM: icmp: introduce helper for nat'd source address in network device context
  UPSTREAM: crypto: poly1305-x86_64 - Use XORL r32,32
  UPSTREAM: crypto: curve25519-x86_64 - Use XORL r32,32
  UPSTREAM: crypto: arm/poly1305 - Add prototype for poly1305_blocks_neon
  UPSTREAM: crypto: arm/curve25519 - include <linux/scatterlist.h>
  UPSTREAM: crypto: x86/curve25519 - Remove unused carry variables
  UPSTREAM: crypto: x86/chacha-sse3 - use unaligned loads for state array
  UPSTREAM: crypto: lib/chacha20poly1305 - Add missing function declaration
  UPSTREAM: crypto: arch/lib - limit simd usage to 4k chunks
  UPSTREAM: crypto: arm[64]/poly1305 - add artifact to .gitignore files
  UPSTREAM: crypto: x86/curve25519 - leave r12 as spare register
  UPSTREAM: crypto: x86/curve25519 - replace with formally verified implementation
  UPSTREAM: crypto: arm64/chacha - correctly walk through blocks
  UPSTREAM: crypto: x86/curve25519 - support assemblers with no adx support
  UPSTREAM: crypto: chacha20poly1305 - prevent integer overflow on large input
  UPSTREAM: crypto: Kconfig - allow tests to be disabled when manager is disabled
  UPSTREAM: crypto: arm/chacha - fix build failured when kernel mode NEON is disabled
  UPSTREAM: crypto: x86/poly1305 - emit does base conversion itself
  UPSTREAM: crypto: chacha20poly1305 - add back missing test vectors and test chunking
  UPSTREAM: crypto: x86/poly1305 - fix .gitignore typo
  UPSTREAM: crypto: curve25519 - Fix selftest build error
  UPSTREAM: crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit
  UPSTREAM: crypto: x86/poly1305 - wire up faster implementations for kernel
  UPSTREAM: crypto: x86/poly1305 - import unmodified cryptogams implementation
  UPSTREAM: crypto: poly1305 - add new 32 and 64-bit generic versions
  UPSTREAM: crypto: lib/curve25519 - re-add selftests
  UPSTREAM: crypto: arm/curve25519 - add arch-specific key generation function
  UPSTREAM: crypto: chacha - fix warning message in header file
  UPSTREAM: crypto: arch - conditionalize crypto api in arch glue for lib code
  UPSTREAM: crypto: lib/chacha20poly1305 - use chacha20_crypt()
  UPSTREAM: crypto: x86/chacha - only unregister algorithms if registered
  UPSTREAM: crypto: chacha_generic - remove unnecessary setkey() functions
  UPSTREAM: crypto: lib/chacha20poly1305 - reimplement crypt_from_sg() routine
  UPSTREAM: crypto: chacha20poly1305 - import construction and selftest from Zinc
  UPSTREAM: crypto: arm/curve25519 - wire up NEON implementation
  UPSTREAM: crypto: arm/curve25519 - import Bernstein and Schwabe's Curve25519 ARM implementation
  UPSTREAM: crypto: curve25519 - x86_64 library and KPP implementations
  UPSTREAM: crypto: lib/curve25519 - work around Clang stack spilling issue
  UPSTREAM: crypto: curve25519 - implement generic KPP driver
  UPSTREAM: crypto: curve25519 - add kpp selftest
  UPSTREAM: crypto: curve25519 - generic C library implementations
  UPSTREAM: crypto: blake2s - x86_64 SIMD implementation
  UPSTREAM: crypto: blake2s - implement generic shash driver
  UPSTREAM: crypto: testmgr - add test cases for Blake2s
  UPSTREAM: crypto: blake2s - generic C library implementation and selftest
  UPSTREAM: crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation
  UPSTREAM: crypto: arm/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation
  UPSTREAM: crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation
  UPSTREAM: crypto: x86/poly1305 - expose existing driver as poly1305 library
  UPSTREAM: crypto: x86/poly1305 - depend on generic library not generic shash
  UPSTREAM: crypto: poly1305 - expose init/update/final library interface
  UPSTREAM: crypto: x86/poly1305 - unify Poly1305 state struct with generic code
  UPSTREAM: crypto: poly1305 - move core routines into a separate library
  UPSTREAM: crypto: chacha - unexport chacha_generic routines
  UPSTREAM: crypto: mips/chacha - wire up accelerated 32r2 code from Zinc
  UPSTREAM: crypto: mips/chacha - import 32r2 ChaCha code from Zinc
  UPSTREAM: crypto: arm/chacha - expose ARM ChaCha routine as library function
  UPSTREAM: crypto: arm/chacha - remove dependency on generic ChaCha driver
  UPSTREAM: crypto: arm/chacha - import Eric Biggers's scalar accelerated ChaCha code
  UPSTREAM: crypto: arm64/chacha - expose arm64 ChaCha routine as library function
  UPSTREAM: crypto: arm64/chacha - depend on generic chacha library instead of crypto driver
  UPSTREAM: crypto: arm64/chacha - use combined SIMD/ALU routine for more speed
  UPSTREAM: crypto: arm64/chacha - optimize for arbitrary length inputs
  UPSTREAM: crypto: x86/chacha - expose SIMD ChaCha routine as library function
  UPSTREAM: crypto: x86/chacha - depend on generic chacha library instead of crypto driver
  UPSTREAM: crypto: chacha - move existing library code into lib/crypto
  UPSTREAM: crypto: lib - tidy up lib/crypto Kconfig and Makefile
  UPSTREAM: crypto: chacha - constify ctx and iv arguments
  UPSTREAM: crypto: x86/poly1305 - Clear key material from stack in SSE2 variant
  UPSTREAM: crypto: xchacha20 - fix comments for test vectors
  UPSTREAM: crypto: xchacha - add test vector from XChaCha20 draft RFC
  UPSTREAM: crypto: arm64/chacha - add XChaCha12 support
  UPSTREAM: crypto: arm64/chacha20 - refactor to allow varying number of rounds
  UPSTREAM: crypto: arm64/chacha20 - add XChaCha20 support
  UPSTREAM: crypto: x86/chacha - avoid sleeping under kernel_fpu_begin()
  UPSTREAM: crypto: x86/chacha - yield the FPU occasionally
  UPSTREAM: crypto: x86/chacha - add XChaCha12 support
  UPSTREAM: crypto: x86/chacha20 - refactor to allow varying number of rounds
  UPSTREAM: crypto: x86/chacha20 - add XChaCha20 support
  UPSTREAM: crypto: x86/chacha20 - Add a 4-block AVX-512VL variant
  UPSTREAM: crypto: x86/chacha20 - Add a 2-block AVX-512VL variant
  UPSTREAM: crypto: x86/chacha20 - Add a 8-block AVX-512VL variant
  UPSTREAM: crypto: x86/chacha20 - Add a 4-block AVX2 variant
  UPSTREAM: crypto: x86/chacha20 - Add a 2-block AVX2 variant
  UPSTREAM: crypto: x86/chacha20 - Use larger block functions more aggressively
  UPSTREAM: crypto: x86/chacha20 - Support partial lengths in 8-block AVX2 variant
  UPSTREAM: crypto: x86/chacha20 - Support partial lengths in 4-block SSSE3 variant
  UPSTREAM: crypto: x86/chacha20 - Support partial lengths in 1-block SSSE3 variant
  ANDROID: GKI: Enable CONFIG_USB_ANNOUNCE_NEW_DEVICES
  ANDROID: GKI: Enable CONFIG_X86_X2APIC
  ANDROID: move builds to use gas prebuilts
  UPSTREAM: binder: fix UAF when releasing todo list

 Conflicts:
	crypto/algif_aead.c
	drivers/rpmsg/qcom_glink_native.c
	drivers/scsi/ufs/ufs-qcom.c
	drivers/slimbus/qcom-ngd-ctrl.c
	fs/notify/inotify/inotify_user.c
	include/linux/dcache.h
	include/linux/fsnotify.h
	mm/oom_kill.c

 Fixed build errors:
	fs/fuse/dir.c

Change-Id: I95bdbb1b183fa2c569023f18e09799d9cb96fc9f
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2020-12-18 18:35:06 +05:30
Ard Biesheuvel
695a313db3 UPSTREAM: crypto: x86/chacha-sse3 - use unaligned loads for state array
Due to the fact that the x86 port does not support allocating objects
on the stack with an alignment that exceeds 8 bytes, we have a rather
ugly hack in the x86 code for ChaCha to ensure that the state array is
aligned to 16 bytes, allowing the SSE3 implementation of the algorithm
to use aligned loads.

Given that the performance benefit of using of aligned loads appears to
be limited (~0.25% for 1k blocks using tcrypt on a Corei7-8650U), and
the fact that this hack has leaked into generic ChaCha code, let's just
remove it.

Cc: Martin Willi <martin@strongswan.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Martin Willi <martin@strongswan.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit e79a31715193686e92dadb4caedfbb1f5de3659c)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1c372c0b826b6fb2d1007bd7e39450a07db3f4c5
2020-10-25 11:48:06 +01:00
Herbert Xu
08c570826d UPSTREAM: crypto: lib/chacha20poly1305 - Add missing function declaration
This patch adds a declaration for chacha20poly1305_selftest to
silence a sparse warning.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 06cc2afbbdf9a9e8df3e2f8db724997dd6e1b4ac)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9dc1c6df2e73e6a60d81f24384e8363309d6d109
2020-10-25 11:48:05 +01:00
Jason A. Donenfeld
cb7a0123be UPSTREAM: crypto: x86/curve25519 - support assemblers with no adx support
Some older version of GAS do not support the ADX instructions, similarly
to how they also don't support AVX and such. This commit adds the same
build-time detection mechanisms we use for AVX and others for ADX, and
then makes sure that the curve25519 library dispatcher calls the right
functions.

Reported-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 1579f1bc3b753d17a44de3457d5c6f4a5b14c752)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I33bbec8f44f8a312f2eebcdb0cbaed68ee37db26
2020-10-25 11:48:01 +01:00
Jason A. Donenfeld
1ff35ded67 UPSTREAM: crypto: poly1305 - add new 32 and 64-bit generic versions
These two C implementations from Zinc -- a 32x32 one and a 64x64 one,
depending on the platform -- come from Andrew Moon's public domain
poly1305-donna portable code, modified for usage in the kernel. The
precomputation in the 32-bit version and the use of 64x64 multiplies in
the 64-bit version make these perform better than the code it replaces.
Moon's code is also very widespread and has received many eyeballs of
scrutiny.

There's a bit of interference between the x86 implementation, which
relies on internal details of the old scalar implementation. In the next
commit, the x86 implementation will be replaced with a faster one that
doesn't rely on this, so none of this matters much. But for now, to keep
this passing the tests, we inline the bits of the old implementation
that the x86 implementation relied on. Also, since we now support a
slightly larger key space, via the union, some offsets had to be fixed
up.

Nonce calculation was folded in with the emit function, to take
advantage of 64x64 arithmetic. However, Adiantum appeared to rely on no
nonce handling in emit, so this path was conditionalized. We also
introduced a new struct, poly1305_core_key, to represent the precise
amount of space that particular implementation uses.

Testing with kbench9000, depending on the CPU, the update function for
the 32x32 version has been improved by 4%-7%, and for the 64x64 by
19%-30%. The 32x32 gains are small, but I think there's great value in
having a parallel implementation to the 64x64 one so that the two can be
compared side-by-side as nice stand-alone units.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 1c08a104360f3e18f4ee6346c21cc3923efb952e)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie53f7e47335863df3d82dbc268c6d8323ae5f559
2020-10-25 11:47:54 +01:00
Valdis Klētnieks
a8bc5219c9 UPSTREAM: crypto: chacha - fix warning message in header file
Building with W=1 causes a warning:

  CC [M]  arch/x86/crypto/chacha_glue.o
In file included from arch/x86/crypto/chacha_glue.c:10:
./include/crypto/internal/chacha.h:37:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
   37 | static int inline chacha12_setkey(struct crypto_skcipher *tfm, const u8 *key,
      | ^~~~~~

Straighten out the order to match the rest of the header file.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 579d705cd64e44f3fcda1a6cfd5f37468a5ddf63)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idb1c5251202344937a42bb095e67fab325e5106d
2020-10-25 11:47:51 +01:00