Commit graph

6674 commits

Author SHA1 Message Date
Greg Kroah-Hartman
de1774a9d2 This is the 4.19.120 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl6tkQkACgkQONu9yGCS
 aT5q+BAAjQ9jNM1XW0xRndVo09cMEami0ACKbbZRu3EtrVwVjnZFOxr2gD+ofBBc
 lJpjVCHpghkxQ/8OfW8beRbLIeh3iF8KmBDOdjVQK13klnX22zviot9XW9XOTkT4
 p902zqqj+Oxl5L3xdDQXLbmxKemFQl1X6iiQlxmNW4eGYmHsUpeghKHKrf5k4vMi
 KVz8rCyYa/qUrRrIdwGvrA1B7xXRTbhPY54ss34WExt7xKjaofHsMGzQa5kpLUa0
 7wAw6wZhIjKb7YRfsdtxS9YUUZl2OdK0KEOrGS57s9qS2aZKpbVLj+1jAdFxRnL3
 txNPrQB913smB3CLtmgBApePR7IRkWXfvujAXEylAxiYVxbHGCCB8UTeEomitrkl
 BVpGcUlFGkpWvfr2kqWp+AP0E/EFguSG6eG3fSxhGX7pWYYzucrBkuCalS65XICQ
 f4v7RsUjMrdBAQKKKPKIrcpMFekQWIQLvWU/RLLdbOMoAR++ZtBW+24OJgvYTtCI
 YEFn6ko5E1SmyfboqMFQS1EKEFk1f8LanmdkBYP+xb9LzJIgXrNsDa2KhHApBsLF
 QtQBOzw3WfdOiaeIT4jY2891WrXyjeGM/q0x8lsSWzJvOv3AGMgdA0A+U78dfFmY
 IkyIRyk6iK3jQYrdvfgggjGv6st46Gp43u96E/F7TjV4EGu/UFI=
 =3ZxP
 -----END PGP SIGNATURE-----

Merge 4.19.120 into android-4.19

Changes in 4.19.120
	remoteproc: Fix wrong rvring index computation
	mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer
	include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap
	binder: take read mode of mmap_sem in binder_alloc_free_page()
	usb: dwc3: gadget: Do link recovery for SS and SSP
	usb: gadget: udc: bdc: Remove unnecessary NULL checks in bdc_req_complete
	iio:ad7797: Use correct attribute_group
	ASoC: q6dsp6: q6afe-dai: add missing channels to MI2S DAIs
	ASoC: tas571x: disable regulators on failed probe
	ASoC: wm8960: Fix wrong clock after suspend & resume
	nfsd: memory corruption in nfsd4_lock()
	i2c: altera: use proper variable to hold errno
	rxrpc: Fix DATA Tx to disable nofrag for UDP on AF_INET6 socket
	net/cxgb4: Check the return from t4_query_params properly
	xfs: acquire superblock freeze protection on eofblocks scans
	svcrdma: Fix trace point use-after-free race
	svcrdma: Fix leak of svc_rdma_recv_ctxt objects
	PCI: Avoid ASMedia XHCI USB PME# from D0 defect
	PCI: Move Apex Edge TPU class quirk to fix BAR assignment
	ARM: dts: bcm283x: Disable dsi0 node
	cpumap: Avoid warning when CONFIG_DEBUG_PER_CPU_MAPS is enabled
	net/mlx5: Fix failing fw tracer allocation on s390
	perf/core: fix parent pid/tid in task exit events
	bpf, x86_32: Fix incorrect encoding in BPF_LDX zero-extension
	mm: shmem: disable interrupt when acquiring info->lock in userfaultfd_copy path
	xfs: clear PF_MEMALLOC before exiting xfsaild thread
	bpf, x86: Fix encoding for lower 8-bit registers in BPF_STX BPF_B
	net: fec: set GPR bit on suspend by DT configuration.
	x86: hyperv: report value of misc_features
	xfs: fix partially uninitialized structure in xfs_reflink_remap_extent
	ALSA: hda: Keep the controller initialization even if no codecs found
	ALSA: hda: Explicitly permit using autosuspend if runtime PM is supported
	scsi: target: fix PR IN / READ FULL STATUS for FC
	scsi: target: tcmu: reset_ring should reset TCMU_DEV_BIT_BROKEN
	objtool: Fix CONFIG_UBSAN_TRAP unreachable warnings
	objtool: Support Clang non-section symbols in ORC dump
	xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status
	ALSA: hda: call runtime_allow() for all hda controllers
	arm64: Delete the space separator in __emit_inst
	ext4: use matching invalidatepage in ext4_writepage
	ext4: increase wait time needed before reuse of deleted inode numbers
	ext4: convert BUG_ON's to WARN_ON's in mballoc.c
	hwmon: (jc42) Fix name to have no illegal characters
	bpf, x86_32: Fix clobbering of dst for BPF_JSET
	qed: Fix use after free in qed_chain_free
	ext4: check for non-zero journal inum in ext4_calculate_overhead
	propagate_one(): mnt_set_mountpoint() needs mount_lock
	Linux 4.19.120

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ied3c507eb5bd85c39aff278827e534cf150e2cc0
2020-05-03 08:48:02 +02:00
Christian Borntraeger
a52262b8a8 include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap
commit 467d12f5c7842896d2de3ced74e4147ee29e97c8 upstream.

QEMU has a funny new build error message when I use the upstream kernel
headers:

      CC      block/file-posix.o
    In file included from /home/cborntra/REPOS/qemu/include/qemu/timer.h:4,
                     from /home/cborntra/REPOS/qemu/include/qemu/timed-average.h:29,
                     from /home/cborntra/REPOS/qemu/include/block/accounting.h:28,
                     from /home/cborntra/REPOS/qemu/include/block/block_int.h:27,
                     from /home/cborntra/REPOS/qemu/block/file-posix.c:30:
    /usr/include/linux/swab.h: In function `__swab':
    /home/cborntra/REPOS/qemu/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef]
       20 | #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
          |                                  ^~~~~~
    /home/cborntra/REPOS/qemu/include/qemu/bitops.h:20:41: error: missing binary operator before token "("
       20 | #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
          |                                         ^
    cc1: all warnings being treated as errors
    make: *** [/home/cborntra/REPOS/qemu/rules.mak:69: block/file-posix.o] Error 1
    rm tests/qemu-iotests/socket_scm_helper.o

This was triggered by commit d5767057c9a ("uapi: rename ext2_swab() to
swab() and share globally in swab.h").  That patch is doing

  #include <asm/bitsperlong.h>

but it uses BITS_PER_LONG.

The kernel file asm/bitsperlong.h provide only __BITS_PER_LONG.

Let us use the __ variant in swap.h

Link: http://lkml.kernel.org/r/20200213142147.17604-1-borntraeger@de.ibm.com
Fixes: d5767057c9a ("uapi: rename ext2_swab() to swab() and share globally in swab.h")
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Yury Norov <yury.norov@gmail.com>
Cc: Allison Randal <allison@lohutok.net>
Cc: Joe Perches <joe@perches.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-02 17:25:48 +02:00
J. Avila
269ba02f63 ANDROID: GKI: Add support for missing V4L2 symbols
Adds support for the below #defines to fix some warnings:

V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_P010_VENUS
V4L2_PIX_FMT_NV12_512
V4L2_PIX_FMT_NV12_UBWC
V4L2_PIX_FMT_NV12_TP10_UBWC

Bug: 155434217
[elavila snapshot of required #defines from e8507af28b]
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Icba92ff8dfad59a9d84d2fa676dffbca1f56053d
2020-04-30 23:55:25 +00:00
Will McVicker
36eb5e86be ANDROID: GKI: ipv4: add vendor padding to __IPV4_DEVCONF_* enums
Add vendor padding to the __IPV4_DEVCONFIG_* enum in order to provide
room for a vendor feature without breaking MODVERSIONS. Do not port 5.4.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 154377500
Change-Id: I733b20dded7cab3cb5818215fdd6b771062e20d8
2020-04-30 16:38:09 +00:00
Will McVicker
dfc1e2f92a Revert "ANDROID: GKI: ipv4: increase __IPV4_DEVCONF_MAX to 64"
This reverts commit 5071be2967. We would
rather fill in vendor padding vs specify a max value.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 154377500
Change-Id: If0376b2b46d0f811c8d02eb05096bf00c204d54f
2020-04-30 16:37:57 +00:00
Will McVicker
5071be2967 ANDROID: GKI: ipv4: increase __IPV4_DEVCONF_MAX to 64
This allows for vendor modifications (up to 41 modifications) to their
built-in netfilters without breaking the ABI or MODVERSIONS.

Change-Id: Ic3a4c1f94ffa0e53105ab890ed75b9e70a670eaf
Bug: 154377500
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-29 06:45:52 +00:00
Jouni Malinen
a78a253c53 BACKPORT: cfg80211: Support key configuration for Beacon protection (BIGTK)
IEEE P802.11-REVmd/D3.0 adds support for protecting Beacon frames using
a new set of keys (BIGTK; key index 6..7) similarly to the way
group-addressed Robust Management frames are protected (IGTK; key index
4..5). Extend cfg80211 and nl80211 to allow the new BIGTK to be
configured. Add an extended feature flag to indicate driver support for
the new key index values to avoid array overflows in driver
implementations and also to indicate to user space when this
functionality is available.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Link: https://lore.kernel.org/r/20200222132548.20835-2-jouni@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 56be393fa8b40db2d4f54f97614f645eb8d3c32e)
[connoro: resolve conflicts; add preceding enum values to preserve
uapi; drop changes to lines not present in 4.19]
Bug: 154523213
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: Iab2dff167159556167600a88091a8e6b28db4ad8
2020-04-28 16:29:52 -07:00
Veerendranath Jakkam
a7321039a2 BACKPORT: cfg80211: Enhance the AKM advertizement to support per interface.
Commit ab4dfa20534e ("cfg80211: Allow drivers to advertise supported AKM
suites") introduces the support to advertize supported AKMs to userspace.

This needs an enhancement to advertize the AKM support per interface type,
specifically for the cfg80211-based drivers that implement SME and use
different mechanisms to support the AKM's for each interface type (e.g.,
the support for SAE, OWE AKM's take different paths for such drivers on
STA/AP mode).

This commit aims the same and enhances the earlier mechanism of advertizing
the AKMs per wiphy. Add new nl80211 attributes and data structure to
provide supported AKMs per interface type to userspace.

the AKMs advertized in akm_suites are default capabilities if not
advertized for a specific interface type in iftype_akm_suites.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
Link: https://lore.kernel.org/r/20200126203032.21934-1-vjakkam@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit d6039a3416f7af37c04f22c411f120ad46f51663)
[connoro: drop changes to lines not present in android-4.19; add enum
values to nl80211_commands to match uapi]
Bug: 154523213
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I2aef7de9d477b71432c2547a1cba1728a2d22d14
2020-04-28 23:25:49 +00:00
Sanjana B
cf675d71fe ANDROID: GKI: kernel: sound: update codec options with block size
Add block size for dsd in codec options.

Change-Id: I2653cc85ca5a526917d12ef5b2f5d5fa776945a2
Bug: 155087902
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
(cherry picked from commit fa70ef7092)
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-28 18:30:34 +00:00
Masahiro Yamada
5934d33fbe BACKPORT: linux/kernel.h: split *_MAX and *_MIN macros into <linux/limits.h>
<linux/kernel.h> tends to be cluttered because we often put various sort
of unrelated stuff in it.  So, we have split out a sensible chunk of
code into a separate header from time to time.

This commit splits out the *_MAX and *_MIN defines.

The standard header <limits.h> contains various MAX, MIN constants
including numerial limits.  [1]

I think it makes sense to move in-kernel MAX, MIN constants into
include/linux/limits.h.

We already have include/uapi/linux/limits.h to contain some user-space
constants.  I changed its include guard to _UAPI_LINUX_LIMITS_H.  This
change has no impact to the user-space because
scripts/headers_install.sh rips off the '_UAPI' prefix from the include
guards of exported headers.

[1] http://pubs.opengroup.org/onlinepubs/009604499/basedefs/limits.h.html

Link: http://lkml.kernel.org/r/1549156242-20806-2-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Alex Elder <elder@linaro.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 54d50897d544c874562253e2a8f70dfcad22afe8)
[ salyzyn: moved include of linux/limits.h to solve module CRC differences ]
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Iae4259d122e289d6854edb221440a45be95ca015
2020-04-27 22:51:59 -07:00
Hemant Kumar
a10905b7c0 ANDROID: GKI: usb: core: Add support to parse config summary capability descriptors
USB 3.2 Specification updated configuration summary descriptor
different from drafted version. This descriptor is needed per
function. Descriptor provides list of configuration indices
that include that function. Use bcdVersion to handle spec
compliant descriptor and select device preferred config supporting
UAC3 or lower revision.

Change-Id: I7cf28eaf61ca91496be84d90ad00704fe4acb149
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Bug: 153666697
(cherry picked from commit 1f64d4e3b5)
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-24 23:47:06 +00:00
Sunil Dutt
14cdc153d6 UPSTREAM: cfg80211/nl80211: Offload OWE processing to user space in AP mode
This interface allows the host driver to offload OWE processing
to user space. This intends to support OWE (Opportunistic Wireless
Encryption) AKM by the drivers that implement SME but rely on the
user space for the cryptographic/OWE processing in AP mode. Such
drivers are not capable of processing/deriving the DH IE.

A new NL80211 command - NL80211_CMD_UPDATE_OWE_INFO is introduced
to send the request/event between the host driver and user space.

Driver shall provide the OWE info (MAC address and DH IE) of
the peer to user space for cryptographic processing of the DH IE
through the event. Accordingly, the user space shall update the
OWE info/DH IE to the driver.

Following is the sequence in AP mode for OWE authentication.

Driver passes the OWE info obtained from the peer in the
Association Request to the user space through the event
cfg80211_update_owe_info_event. User space shall process the
OWE info received and generate new OWE info. This OWE info is
passed to the driver through NL80211_CMD_UPDATE_OWE_INFO
request. Driver eventually uses this OWE info to send the
Association Response to the peer.

This OWE info in the command interface carries the IEs that include
PMKID of the peer if the PMKSA is still valid or an updated DH IE
for generating a new PMKSA with the peer.

Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Signed-off-by: Sunil Dutt <usdutt@codeaurora.org>
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
[remove policy initialization - no longer exists]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit cb74e9775871f8c82a1297cf76209f10ab5bbe3d)
Bug: 154523213
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I3c5cd950f1777cf62e622fcf774ce1aac456f22c
2020-04-23 14:37:14 -07:00
Liangwei Dong
04b5067d12 ANDROID: GKI: cfg80211: Sync nl80211 commands/feature with upstream
Update header for nl80211 nl80211_ext_feature_index and
nl80211_commands enum from master branch of upstream repoistory
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
which includes the following changes (with changes to extract
"enum" value change only):
91b5ab6289 cfg80211: support 4-way handshake offloading for WPA/WPA2-PSK
3a00df5707 cfg80211: support 4-way handshake offloading for 802.1X
2d23d0736e nl80211: add OCE scan and capability flags
65026002d6 nl80211: add an option to allow MFP without requiring it
5037a00992 nl80211: Introduce scan flags to emphasize requested scan
behavior
13cf6dec93 cfg80211/nl80211: add DFS offload flag
2576a9ace4 nl80211: Implement TX of control port frames
9c06602b1b9 cfg80211: clarify frames covered by average ACK signal report
52539ca89f cfg80211: Expose TXQ stats and parameters to userspace
2e076f1990 nl80211: add scan features for improved scan privac
2b815b04dfe nl80211: Add CAN_REPLACE_PTK0 API
81e54d08d9d cfg80211: support FTM responder configuration/statistics
36647055b37 cfg80211: Add airtime statistics and settings
466b9936bf cfg80211: Add support to notify station's opmode change to
userspace
6a671a50f8 nl80211: Add CMD_CONTROL_PORT_FRAME API
9bb7e0f24e7 cfg80211: add peer measurement with FTM initiator API
30c63115e20 nl80211: Add support to notify radar event info received from
STA.

CRs-Fixed: 2396941
Change-Id: I976a9177b9dd705c6131a3a9a62d64432e3d715a
Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
(cherry picked from commit b1096dd100)
Bug: 154523213
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-04-23 14:37:14 -07:00
Gerd Hoffmann
a8742cd952 UPSTREAM: virtio-gpu api: comment feature flags
Add comments to the existing feature flags,
documenting which commands belong to them.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190410114227.25846-2-kraxel@redhat.com
(cherry picked from commit beb941b970fb129dae206050593d3e768859b146)
Bug: 153580313
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I8130b6a04aea46f8f6ea8f4ab14acccf0c1932eb
2020-04-22 20:28:40 +00:00
Greg Kroah-Hartman
95bff4cdab This is the 4.19.116 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl6ZbYYACgkQONu9yGCS
 aT76ohAAn4lIjSuMRCILy/lq0DXVWDy7q6YdfyzNBITxc86tVfnfjMeQxUBviE/1
 OzShWgMRXeqrb0xJTJ5Rv6mt5Kf9a3DpPWt2jwo1iqWkl4AihDtDV7Z2Bh+QdnSX
 +lQ1xGPqDi4MMgoYlpMtlFc3wq/pJV0i8Q7amXC/KbsDkt5dlDrQYeEZHe2P7pR9
 ZljKLHEdGRE3uGqXmEM8qb6aLjQudnHmH/9uChP4UX6b+ZADDCc05DMhEkhEoCZT
 jdxiqVZvRdiiXTc1r6ckGv0xae77s0IAAZMQAd+24zFK94QByi6d9Cw0y6qyyDi7
 1rfHIWSjvetY3+4DCQDOu/k2/pLt/Vqh9zuvtaf8Tu8cKM9rxow0Hl9FlL3fZpBN
 btpqeCY6twFxApHoAp9ZDK6otaVEOtbg1MCsmpUbVxWIF9IR8cPqMGyYK3lR2Ao1
 HgdKEFkYOycAOu51ujuHsDLx/9k2ZqeSPyh0yrdVpFUVvMV/YqoYP9X3jzGRVllL
 hgYfFcywgrVgxK4c02/6cPiJNbFskTpLllDPVVXGIjO+9R4vTRUgJ74CNrqL25aT
 ioSFWJA00UvXObnbCDdA+otYYWAmYOJX7HVvEieb0oDqPYHZHa1UW6+1WlYSAQLm
 WAsHiejOv6PwzRmCDI6RyuZKQjjX6bppAWFq0/RLPO0uEqjXlxc=
 =Iq3k
 -----END PGP SIGNATURE-----

Merge 4.19.116 into android-4.19

Changes in 4.19.116
	ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage
	bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads
	net: vxge: fix wrong __VA_ARGS__ usage
	hinic: fix a bug of waitting for IO stopped
	hinic: fix wrong para of wait_for_completion_timeout
	cxgb4/ptp: pass the sign of offset delta in FW CMD
	qlcnic: Fix bad kzalloc null test
	i2c: st: fix missing struct parameter description
	cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL
	media: venus: hfi_parser: Ignore HEVC encoding for V1
	firmware: arm_sdei: fix double-lock on hibernate with shared events
	null_blk: Fix the null_add_dev() error path
	null_blk: Handle null_add_dev() failures properly
	null_blk: fix spurious IO errors after failed past-wp access
	xhci: bail out early if driver can't accress host in resume
	x86: Don't let pgprot_modify() change the page encryption bit
	block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices
	irqchip/versatile-fpga: Handle chained IRQs properly
	sched: Avoid scale real weight down to zero
	selftests/x86/ptrace_syscall_32: Fix no-vDSO segfault
	PCI/switchtec: Fix init_completion race condition with poll_wait()
	media: i2c: video-i2c: fix build errors due to 'imply hwmon'
	libata: Remove extra scsi_host_put() in ata_scsi_add_hosts()
	pstore/platform: fix potential mem leak if pstore_init_fs failed
	gfs2: Don't demote a glock until its revokes are written
	x86/boot: Use unsigned comparison for addresses
	efi/x86: Ignore the memory attributes table on i386
	genirq/irqdomain: Check pointer in irq_domain_alloc_irqs_hierarchy()
	block: Fix use-after-free issue accessing struct io_cq
	media: i2c: ov5695: Fix power on and off sequences
	usb: dwc3: core: add support for disabling SS instances in park mode
	irqchip/gic-v4: Provide irq_retrigger to avoid circular locking dependency
	md: check arrays is suspended in mddev_detach before call quiesce operations
	firmware: fix a double abort case with fw_load_sysfs_fallback
	locking/lockdep: Avoid recursion in lockdep_count_{for,back}ward_deps()
	block, bfq: fix use-after-free in bfq_idle_slice_timer_body
	btrfs: qgroup: ensure qgroup_rescan_running is only set when the worker is at least queued
	btrfs: remove a BUG_ON() from merge_reloc_roots()
	btrfs: track reloc roots based on their commit root bytenr
	IB/mlx5: Replace tunnel mpls capability bits for tunnel_offloads
	uapi: rename ext2_swab() to swab() and share globally in swab.h
	slub: improve bit diffusion for freelist ptr obfuscation
	ASoC: fix regwmask
	ASoC: dapm: connect virtual mux with default value
	ASoC: dpcm: allow start or stop during pause for backend
	ASoC: topology: use name_prefix for new kcontrol
	usb: gadget: f_fs: Fix use after free issue as part of queue failure
	usb: gadget: composite: Inform controller driver of self-powered
	ALSA: usb-audio: Add mixer workaround for TRX40 and co
	ALSA: hda: Add driver blacklist
	ALSA: hda: Fix potential access overflow in beep helper
	ALSA: ice1724: Fix invalid access for enumerated ctl items
	ALSA: pcm: oss: Fix regression by buffer overflow fix
	ALSA: doc: Document PC Beep Hidden Register on Realtek ALC256
	ALSA: hda/realtek - Set principled PC Beep configuration for ALC256
	ALSA: hda/realtek - Remove now-unnecessary XPS 13 headphone noise fixups
	ALSA: hda/realtek - Add quirk for MSI GL63
	media: ti-vpe: cal: fix disable_irqs to only the intended target
	acpi/x86: ignore unspecified bit positions in the ACPI global lock field
	thermal: devfreq_cooling: inline all stubs for CONFIG_DEVFREQ_THERMAL=n
	nvme-fc: Revert "add module to ops template to allow module references"
	nvme: Treat discovery subsystems as unique subsystems
	PCI: pciehp: Fix indefinite wait on sysfs requests
	PCI/ASPM: Clear the correct bits when enabling L1 substates
	PCI: Add boot interrupt quirk mechanism for Xeon chipsets
	PCI: endpoint: Fix for concurrent memory allocation in OB address region
	tpm: Don't make log failures fatal
	tpm: tpm1_bios_measurements_next should increase position index
	tpm: tpm2_bios_measurements_next should increase position index
	KEYS: reaching the keys quotas correctly
	irqchip/versatile-fpga: Apply clear-mask earlier
	pstore: pstore_ftrace_seq_next should increase position index
	MIPS/tlbex: Fix LDDIR usage in setup_pw() for Loongson-3
	MIPS: OCTEON: irq: Fix potential NULL pointer dereference
	ath9k: Handle txpower changes even when TPC is disabled
	signal: Extend exec_id to 64bits
	x86/entry/32: Add missing ASM_CLAC to general_protection entry
	KVM: nVMX: Properly handle userspace interrupt window request
	KVM: s390: vsie: Fix region 1 ASCE sanity shadow address checks
	KVM: s390: vsie: Fix delivery of addressing exceptions
	KVM: x86: Allocate new rmap and large page tracking when moving memslot
	KVM: VMX: Always VMCLEAR in-use VMCSes during crash with kexec support
	KVM: x86: Gracefully handle __vmalloc() failure during VM allocation
	KVM: VMX: fix crash cleanup when KVM wasn't used
	CIFS: Fix bug which the return value by asynchronous read is error
	mtd: spinand: Stop using spinand->oobbuf for buffering bad block markers
	mtd: spinand: Do not erase the block before writing a bad block marker
	Btrfs: fix crash during unmount due to race with delayed inode workers
	btrfs: set update the uuid generation as soon as possible
	btrfs: drop block from cache on error in relocation
	btrfs: fix missing file extent item for hole after ranged fsync
	btrfs: fix missing semaphore unlock in btrfs_sync_file
	crypto: mxs-dcp - fix scatterlist linearization for hash
	erofs: correct the remaining shrink objects
	powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()
	x86/speculation: Remove redundant arch_smt_update() invocation
	tools: gpio: Fix out-of-tree build regression
	mm: Use fixed constant in page_frag_alloc instead of size + 1
	net: qualcomm: rmnet: Allow configuration updates to existing devices
	arm64: dts: allwinner: h6: Fix PMU compatible
	dm writecache: add cond_resched to avoid CPU hangs
	dm verity fec: fix memory leak in verity_fec_dtr
	scsi: zfcp: fix missing erp_lock in port recovery trigger for point-to-point
	arm64: armv8_deprecated: Fix undef_hook mask for thumb setend
	selftests: vm: drop dependencies on page flags from mlock2 tests
	rtc: omap: Use define directive for PIN_CONFIG_ACTIVE_HIGH
	drm/etnaviv: rework perfmon query infrastructure
	powerpc/pseries: Avoid NULL pointer dereference when drmem is unavailable
	NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
	ext4: fix a data race at inode->i_blocks
	fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once()
	ocfs2: no need try to truncate file beyond i_size
	perf tools: Support Python 3.8+ in Makefile
	s390/diag: fix display of diagnose call statistics
	Input: i8042 - add Acer Aspire 5738z to nomux list
	clk: ingenic/jz4770: Exit with error if CGU init failed
	kmod: make request_module() return an error when autoloading is disabled
	cpufreq: powernv: Fix use-after-free
	hfsplus: fix crash and filesystem corruption when deleting files
	libata: Return correct status in sata_pmp_eh_recover_pm() when ATA_DFLAG_DETACH is set
	ipmi: fix hung processes in __get_guid()
	xen/blkfront: fix memory allocation flags in blkfront_setup_indirect()
	powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle
	powerpc/64/tm: Don't let userspace set regs->trap via sigreturn
	powerpc/hash64/devmap: Use H_PAGE_THP_HUGE when setting up huge devmap PTE entries
	powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs
	powerpc/kprobes: Ignore traps that happened in real mode
	scsi: mpt3sas: Fix kernel panic observed on soft HBA unplug
	powerpc: Add attributes for setjmp/longjmp
	powerpc: Make setjmp/longjmp signature standard
	btrfs: use nofs allocations for running delayed items
	dm zoned: remove duplicate nr_rnd_zones increase in dmz_init_zone()
	crypto: caam - update xts sector size for large input length
	crypto: ccree - improve error handling
	crypto: ccree - zero out internal struct before use
	crypto: ccree - don't mangle the request assoclen
	crypto: ccree - dec auth tag size from cryptlen map
	crypto: ccree - only try to map auth tag if needed
	Revert "drm/dp_mst: Remove VCPI while disabling topology mgr"
	drm/dp_mst: Fix clearing payload state on topology disable
	drm: Remove PageReserved manipulation from drm_pci_alloc
	ftrace/kprobe: Show the maxactive number on kprobe_events
	powerpc/fsl_booke: Avoid creating duplicate tlb1 entry
	misc: echo: Remove unnecessary parentheses and simplify check for zero
	etnaviv: perfmon: fix total and idle HI cyleces readout
	mfd: dln2: Fix sanity checking for endpoints
	efi/x86: Fix the deletion of variables in mixed mode
	Linux 4.19.116

Change-Id: If09fbb53fcb11ea01eaaa7fee7ed21ed6234f352
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-04-18 13:33:51 +02:00
Meng Wang
209a4825b3 ANDROID: GKI: ALSA: compress: Add support to send codec specific data
Codec specific  metadata is sent only for first stream in gapless
playback. This causes incorrect configuration to be set for second
stream and distortions are observed due to framedrops in adsp.
Add support to send codec specific format during start of
next stream in gapless using set_next_track_param.

Change-Id: Ieec6b2afedec156e47873efcad9b3571160b0a29
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit acff8e6a3c)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:55 -07:00
Asish Bhattacharya
2430e0237e ANDROID: GKI: ASoC: msm: qdsp6v2: add support for AMR_WB_PLUS offload
Add AMR_WB_PLUS to supported offload formats and send media
format block through compress driver.

Change-Id: I258dc05fd5b6442ef40a5d1d4538870c4ddcbe2e
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Bug: 151372815
(cherry picked from commit a909cafb69)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:55 -07:00
Nidhisha Dhananjayan
2596dca52d ANDROID: GKI: msm: dolby: MAT and THD audiocodec name modification
Modified names of SND_AUDIOCODEC for THD and MAT
as per the standards.
SND_AUDIOCODEC_DLB_THD to SND_AUDIOCODEC_THD
SND_AUDIOCODEC_DLB_MAT to SND_AUDIOCODEC_MAT.

Change-Id: If03662774cf0ae3573ed98ed6b6de42a7589e358
Acked-by: Janamaddi Sravan Kumar <c_jsrava@qti.qualcomm.com>
Signed-off-by: Nidhisha Dhananjayan <nidhis@codeaurora.org>
Bug: 151372815
(cherry picked from commit 5992d8fae1)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Deeraj Soman
e221163705 ANDROID: GKI: asoc: msm: Add support for compressed perf mode
Add support for compressed perf mode.
Compressed perf mode configures the DSP in low latency
mode. In low latency mode, DSP have reduced buffer
size for faster operations. Above layers may pass
this flag for configuring the DSP in low latency
mode.

Change-Id: Ib291d0fb9921edbaf2466d44c87aeed3367aec67
Signed-off-by: Deeraj Soman <sdeeraj@codeaurora.org>
Bug: 151372815
(cherry picked from commit aec78f41d3)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Nidhisha Dhananjayan
e04046b0a3 ANDROID: GKI: msm: audio: support for gapless_pcm
snd_codec_option structure for gapless_pcm_playback.
This is used for updating the channels in gapless pcm
cases.

Change-Id: Id0d950f0f431e5d9fe2a8ccd5e5124a235b66f27
Acked-by: Janamaddi Sravan Kumar <c_jsrava@qti.qualcomm.com>
Signed-off-by: Nidhisha Dhananjayan <nidhis@codeaurora.org>
Bug: 151372815
(cherry picked from commit 4fc12e7fd8)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Nidhisha Dhananjayan
81e1224283 ANDROID: GKI: uapi: msm: dolby: Support for TrueHD and MAT decoders
Audio codec addition of MAT and TrueHD decoders for
decoding in DSP.

Change-Id: I049c1210d3600da723850bae1dd61b6ad4b3a78a
Acked-by: Janamaddi Sravan Kumar <c_jsrava@qti.qualcomm.com>
Signed-off-by: Nidhisha Dhananjayan <nidhis@codeaurora.org>
Bug: 151372815
(cherry picked from commit 0563121f3e)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Meng Wang
9dfd801016 ANDROID: GKI: ASoC: msm: qdsp6v2: Add TrueHD HDMI compress pass-though
Add TrueHD audio format for compressed HDMI pass-through

Change-Id: Id8a0b8c3a01c881ae284f13c2c0a36959c2413ac
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit cd79e0f7bc)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Dhanalakshmi Siddani
dee954b28b ANDROID: GKI: ALSA: compress: Add APTX format support in ALSA
Extend ALSA (Advanced Linux Sound Architecture) compress
to support APTX format.

CRs-Fixed: 1106128
Change-Id: I301c3fac1f0e267ca82f20a42437bae86a22413c
Signed-off-by: Dhanalakshmi Siddani <dsiddani@codeaurora.org>
Bug: 151372815
(cherry picked from commit 3aeaf95e8d)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
418114d1ce ANDROID: GKI: msm: qdsp6v2: Add timestamp support for compress capture
Add timestamp support for compress driver.
Modify ASM driver to read the buffer from predefined offset.

CRs-fixed: 1072067
Change-Id: I1c46befc223285495b3c0650e6c3eaae81f58771
Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit a0c23f9915)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
473ad5915d ANDROID: GKI: SoC: msm: Add support for meta data in compressed TX
There is a usecase where compressed data is sent over HDMI IN to
ADSP. The format of compressed is detected in ADSP and sent through
the meta data to compressed driver. Add support for meta data in
compressed TX for this use case.

Change-Id: Idbb18fe4a0ad828e9c2e9d7beec048b3cedf002d
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 3e34295e0d)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
9383e53071 ANDROID: GKI: ALSA: compress: Add DSD format support for ALSA
WCD934X audio codec supports playback of DSD (Direct
Stream Digital) format. Extend ALSA (Advanced Linux
Sound Architecture) compress to support DSD format.

CRs-Fixed: 1056422
Change-Id: Ifb06674c251335a1d8cec71931355dca4c0e012d
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 9fb80c87a2)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
ed8ba29c69 ANDROID: GKI: ASoC: msm: qdsp6v2: add support for ALAC and APE offload
Add ALAC and APE to supported offload formats and send media
format block for both formats through compress driver.

Change-Id: I22b7cf38684250d2f8d6f9aefcd43452bb18e7f9
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 040ab02c60)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Sudheer Papothi
5397ecb300 ANDROID: GKI: SoC: msm: Add compressed TX and passthrough support
There is use case that the HDMI input goes through MI2S
TX interface to ADSP. Add compressed TX support for
this use case.
Add support for compressed bitstream passthrough over HDMI
for DD/DDP contents.
Use compressed driver to support passthrough.

Change-Id: I92d0f301d44cc71c89de07cd60a4d20ce6f7913e
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit ebb7ffe46b)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
03333fc86c ANDROID: GKI: ASoC: msm: qdsp6v2: Add FLAC in compress offload path
Add FLAC format in compress offload driver, and asm
module.

Change-Id: I818ace8397e761b1acff7f9b2eab6e0103ed78c8
Signed-off-by: Apurupa Pattapu <apurupa@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 02c08155fd)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
4e39276ff3 ANDROID: GKI: ASoC: msm: add support for different compressed formats
Add support for below compressed formats and features
 * DTS playback
 * PCM capture in Compressed driver
 * MP2 decoder
 * DTS_LBR Passthrough Support
 * Transcode from MP3, WMA to DTS compressed
 * Update compress audio params

Change-Id: I595e638da78cced02142f4ee430afb7357eb336c
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit ee29f1dd0f)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:53 -07:00
Banajit Goswami
07ac574f15 ANDROID: GKI: ASoC: msm: Update the encode option and sample rate
Populate the sample rate, encode option in wma config params.
WMA V9 and WMA Pro tunnel-mode supports are added to compressed
driver. It allows user-space application to decode WMA V9 and
WMA Pro audio stream through QDSP6.
Codec specific metadata is sent only for first stream in gapless
playback. This causes incorrect configuration to be set for second
stream and distortions are observed due to framedrops in adsp.
Add support to send codec specific format during start of
next stream in gapless.
Add bit rate to wma codec data structure as it can vary between
streams in gapless.

Change-Id: Ieeb9d302454d3935faa51cac77021e7c1d77012c
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 2315eec8b2)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:53 -07:00
Alistair Delva
c4ea3263ea Revert "BACKPORT: drm: Add HDR source metadata property"
This reverts commit 4ae8f7c45a.

We don't need these drm blob properties on this branch.

Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ib715f4e3b6394091c8b537d4cb534c3b31d7f8c8
2020-04-17 20:26:06 +00:00
Yury Norov
9af535dc01 uapi: rename ext2_swab() to swab() and share globally in swab.h
[ Upstream commit d5767057c9a76a29f073dad66b7fa12a90e8c748 ]

ext2_swab() is defined locally in lib/find_bit.c However it is not
specific to ext2, neither to bitmaps.

There are many potential users of it, so rename it to just swab() and
move to include/uapi/linux/swab.h

ABI guarantees that size of unsigned long corresponds to BITS_PER_LONG,
therefore drop unneeded cast.

Link: http://lkml.kernel.org/r/20200103202846.21616-1-yury.norov@gmail.com
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Cc: Allison Randal <allison@lohutok.net>
Cc: Joe Perches <joe@perches.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-17 10:48:43 +02:00
Banajit Goswami
98a387cdfe ANDROID: GKI: ALSA: jack: Add support to report second microphone
ALSA jack framework currently supports reporting only
one single microphone. Add support to report presence of
the second microphone to userspace.

Test: build
Bug: 149430094
Change-Id: I72d16892f2fa563c026bf90d847d9365dcf2233a
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit b071d2a1b2)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-17 00:42:31 +00:00
Banajit Goswami
3d8c1bbf03 ANDROID: GKI: ALSA: jack: Update supported jack switch types
Change adds support for jack switch types supported
by platform.

This change also squashes the below changes-

include: increase allowed SW INPUT device ID from 15 to 32

Increase the Input device SW ID from 15 to 32. This is needed
to accommodate more input devices.

Test: build
Bug: 149430094
Change-Id: If77f8b37b4db72ada2b5d8a3095265eef90ab62b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit 3e70a3037a)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-17 00:42:23 +00:00
Maheshwar Ajja
fbfc98114a ANDROID: media: increase video max frame number
Few userspace clients and drivers need more frames and
hence increase video max frame number from 32 to 64.

Bug: 143356419
Change-Id: Ib5394b7b71d75177234333dae23ec30fea01450f
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
(cherry picked from commit e81694723af1c2d89edcd1948e77a8d53126d5a5)
Bug: 154168148
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-04-16 23:00:21 +00:00
Uma Shankar
4ae8f7c45a BACKPORT: drm: Add HDR source metadata property
This patch adds a blob property to get HDR metadata
information from userspace. This will be send as part
of AVI Infoframe to panel.

It also implements get() and set() functions for HDR output
metadata property.The blob data is received from userspace and
saved in connector state, the same is returned as blob in get
property call to userspace.

v2: Rebase and modified the metadata structure elements
as per Ville's POC changes.

v3: No Change

v4: Addressed Shashank's review comments

v5: Rebase.

v6: Addressed Brian Starkey's review comments, defined
new structure with header for dynamic metadata scalability.
Merge get/set property functions for metadata in this patch.

v7: Addressed Jonas Karlman review comments and defined separate
structure for infoframe to better align with CTA 861.G spec. Added
Shashank's RB.

v8: Addressed Ville's review comments. Moved sink metadata structure
out of uapi headers as suggested by Jonas Karlman.

v9: Rebase and addressed Jonas Karlman review comments.

v10: Addressed Ville's review comments, dropped the metdata_changed
state variable as its not needed anymore.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-2-git-send-email-uma.shankar@intel.com
(cherry picked from commit fbb5d0353c62d10c3699ec844d2d015a762952d7)
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ifa4950c6d27a9652fa91f1913cb145be0d555ae4
2020-04-16 00:18:55 +00:00
Shashank Babu Chinta Venkata
0ea9d81fdc ANDROID: drivers: gpu: drm: add support for secure framebuffer
Add mode flag to indicate friamebuffer operating in
secure mode.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: I95d66c8a0cd56262aa779de568650a3e48240b1f
2020-04-14 22:51:44 +00:00
Shashank Babu Chinta Venkata
ecb9944f6c ANDROID: include: uapi: drm: add additional QCOM modifiers
Add QCOM modifiers to support frame buffer size
calculations for linear and compressed tp10 format
and a5x tile pixel formats.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: If2c5777514130f5f1dfeadf241af06b7adc9429c
2020-04-14 22:18:35 +00:00
Shashank Babu Chinta Venkata
c0936c90ec ANDROID: include: uapi: drm: add additional drm mode flags
Add additional drm mode flags to specify panel capability
to support command mode and video mode seamless transition.
Additionally, add mode flags to specify support for
YUV, RGB formats.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: Ifdc71a123f1f697ff9b5dbe6a6e2f557c3069060
2020-04-14 22:16:39 +00:00
Ankita Bajaj
8766a7247a BACKPORT: nl80211: Add per peer statistics to compute FCS error rate
Add support for drivers to report the total number of MPDUs received
and the number of MPDUs received with an FCS error from a specific
peer. These counters will be incremented only when the TA of the
frame matches the MAC address of the peer irrespective of FCS
error.

It should be noted that the TA field in the frame might be corrupted
when there is an FCS error and TA matching logic would fail in such
cases. Hence, FCS error counter might not be fully accurate, but it can
provide help in detecting bad RX links in significant number of cases.
This FCS error counter without full accuracy can be used, e.g., to
trigger a kick-out of a connected client with a bad link in AP mode to
force such a client to roam to another AP.

Test: build
Bug: 153912588
Signed-off-by: Ankita Bajaj <bankita@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 0d4e14a32dcab9c4bd559d02874120fbb86b1322)
[hridya: resolved minor conflicts]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: I5306d36e6df255efcb130b0de5151bebda67c549
2020-04-14 12:57:22 -07:00
Greg Kroah-Hartman
2d2af525a7 This is the 4.19.115 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl6USBUACgkQONu9yGCS
 aT6dNxAA1BJKHbO1TOMTYi21N8XNbMOOblVxrLDe+Y2nEj2KIqiehlsoreV34F/g
 IswNAuA3JXp7pU53RIKsTIWvx9CvNit55sJ1eKWTfFZGCotsBWH9Xzeh9Ao1wURG
 vhE5tX8PUwEzZ/sFphVmVvv5oUkQyHYKpEosyVOqL5eIQe5E430PxB/xvz4I0Vyq
 HHiXmrNekXi5kY156k1RqLQ/RhKMFPNi7swm1uFKLS1qrcIlQzgq5MFk5l59oEMo
 xob25EeeddVa/4roNSVk9IZGZjXpRPsvRM8kxjSXn2KVz1aO8TgYXF1RyWeNthsZ
 VXf6XkasSh3bwMX6imhV1fGmepG3OvSZg0k2EvRTpcY84kFlIrC1l2YuOHrCETgL
 GkptUtGK0a2FEiyBK/0nxvf2E6iaoT4NeTYlyTkL8iOgJ+xMvuSzCpFfQjfkOjGz
 h3AD+Twqu7lqY54nOvyAkA94joEFzVuzSoYCABAImFq4kvu4khhWBXTmkqUf47aI
 1O3m4bMEMLDBRwiBpRsu5c0C+ghHHQtOWTH/UjyOI1aGEKFZyBe5CHYmRo2W9tDg
 rrlymg1iVMR1o9pvzzRroCokKCzBSirEWKxyyMIFWko5xQvTvae5fTIaAWlvBGjP
 oH3eIPDWw1ZD1WxiSGzM2Wx4AyumZ1y3pnOHV3uUnYb3cM0l9g8=
 =bfll
 -----END PGP SIGNATURE-----

Merge 4.19.115 into android-4.19

Changes in 4.19.115
	ipv4: fix a RCU-list lock in fib_triestat_seq_show
	net, ip_tunnel: fix interface lookup with no key
	sctp: fix refcount bug in sctp_wfree
	sctp: fix possibly using a bad saddr with a given dst
	nvme-rdma: Avoid double freeing of async event data
	drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017
	drm/bochs: downgrade pci_request_region failure from error to warning
	initramfs: restore default compression behavior
	drm/amdgpu: fix typo for vcn1 idle check
	tools/power turbostat: Fix gcc build warnings
	tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks
	drm/etnaviv: replace MMU flush marker with flush sequence
	media: rc: IR signal for Panasonic air conditioner too long
	misc: rtsx: set correct pcr_ops for rts522A
	misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
	misc: pci_endpoint_test: Avoid using module parameter to determine irqtype
	coresight: do not use the BIT() macro in the UAPI header
	mei: me: add cedar fork device ids
	extcon: axp288: Add wakeup support
	power: supply: axp288_charger: Add special handling for HP Pavilion x2 10
	ALSA: hda/ca0132 - Add Recon3Di quirk to handle integrated sound on EVGA X99 Classified motherboard
	rxrpc: Fix sendmsg(MSG_WAITALL) handling
	net: Fix Tx hash bound checking
	padata: always acquire cpu_hotplug_lock before pinst->lock
	bitops: protect variables in set_mask_bits() macro
	include/linux/notifier.h: SRCU: fix ctags
	mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
	ipv6: don't auto-add link-local address to lag ports
	net: dsa: bcm_sf2: Do not register slave MDIO bus with OF
	net: dsa: bcm_sf2: Ensure correct sub-node is parsed
	net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
	net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
	slcan: Don't transmit uninitialized stack data in padding
	mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
	random: always use batched entropy for get_random_u{32,64}
	usb: dwc3: gadget: Wrap around when skip TRBs
	tools/accounting/getdelays.c: fix netlink attribute length
	hwrng: imx-rngc - fix an error path
	ASoC: jz4740-i2s: Fix divider written at incorrect offset in register
	IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
	IB/hfi1: Fix memory leaks in sysfs registration and unregistration
	ceph: remove the extra slashes in the server path
	ceph: canonicalize server path in place
	RDMA/ucma: Put a lock around every call to the rdma_cm layer
	RDMA/cma: Teach lockdep about the order of rtnl and lock
	Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
	RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
	fbcon: fix null-ptr-deref in fbcon_switch
	clk: qcom: rcg: Return failure for RCG update
	drm/msm: stop abusing dma_map/unmap for cache
	arm64: Fix size of __early_cpu_boot_status
	rpmsg: glink: Remove chunk size word align warning
	usb: dwc3: don't set gadget->is_otg flag
	drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()
	drm/msm: Use the correct dma_sync calls in msm_gem
	Linux 4.19.115

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idc17d8aa387491167efc60df0a9764b82e4344da
2020-04-13 13:09:17 +02:00
Eugene Syromiatnikov
80adb710a1 coresight: do not use the BIT() macro in the UAPI header
commit 9b6eaaf3db5e5888df7bca7fed7752a90f7fd871 upstream.

The BIT() macro definition is not available for the UAPI headers
(moreover, it can be defined differently in the user space); replace
its usage with the _BITUL() macro that is defined in <linux/const.h>.

Fixes: 237483aa5c ("coresight: stm: adding driver for CoreSight STM component")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200324042213.GA10452@asgard.redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13 10:45:03 +02:00
Meng Wang
dbad92f6e8 ANDROID: GKI: ASoC: msm: fix integer overflow for long duration offload playback
32 bit variable is used for storing number of bytes copied to DSP,
which can overflow when playback duration goes beyond 24 hours.
Change data type for this variable to uint64_t to prevent overflow
and related playback anomaly.

Bug: 153747771
Test: compile
CRs-Fixed: 877677
Change-Id: Ie4dfa630cf89559bb784d4712c52526665baeca6
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit 5396710759)
Signed-off-by: Will McVicker <willmcvicker@google.com>
[willmcvicker: fixed merged conflict in compress_offload.c]
2020-04-11 00:30:41 +00:00
Paul Lawrence
e251cfe620 ANDROID: Incremental fs: Protect get_fill_block, and add a field
Since INCFS_IOC_GET_FILLED_BLOCKS potentially leaks information about usage
patterns, and is only useful to someone filling the file, best protect it in
the same way as INCFS_IOC_FILL_BLOCKS.

Add useful field data_block_out as well

Test: incfs_test passes
Bug: 152983639
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I126a8cf711e56592479093e9aadbfd0e7f700752
2020-04-03 17:25:30 +00:00
Greg Kroah-Hartman
6ca29140d7 This is the 4.19.114 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl6F6HkACgkQONu9yGCS
 aT7FkxAAgZOwRDVRkqjfSE+MBAqbE41sO3iAWmv9gQazdK+APGdQaasQ73gBdcuQ
 wliG5W9k9J0qkcnUIAnEgooAWXB9+7p4NF1BZHmpmYleXZckmXtaDK3cKgFWAOVD
 KMQgiEYHgdm6otlNf328uOmoaggN1wRqmMsW/PZys0AvQ183oTsidhQwfOofCt3k
 LwJiu5o+gJCIePrqKuHtkteKmjFR1KQ2RZHPmJ2ApoxVymBreJWKMl8ZVCRyteDx
 JoWZfprPnZZaqb83ylkpE/lXyut0etT2zmI+W/Bg4LFDZTVfqw+HPB7opvITfP0p
 6H0YwH9Qn/BiOcP6JncVUPLe8/bEiOJ/jsJwPRCcl0C7PmDrn6uhBNVfrY4CreAL
 h38/vKSwK8iduyPpne6zq6hQDYBTdEpBDtXFsnElNBmyIE7yIH3ta8qDYsW13Fr7
 x9U7F9KagIR1AH2b/uMzjlTDv85hvzGP8vS06S1gJn6RJP0WSDtpE7RNT6MkfMIw
 Ti16a9nEJ3H+Zn76vdvlLirmziETsIVpxHSDRu/X9QfxJmXHnXg7581bu8aGZ1zN
 6xwWP9mWA8KJzbX5mxXChHoZ9qQ/o4D10MxS+7DXFYiya4prHWphyTS2MYbzMzIl
 TIOJ54FVg01QiQbh29X05hvd3RMOkdzJ9Tggq8oTSLvgTIUSmi0=
 =jtGQ
 -----END PGP SIGNATURE-----

Merge 4.19.114 into android-4.19

Changes in 4.19.114
	mmc: core: Allow host controllers to require R1B for CMD6
	mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard
	mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command
	mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
	mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
	Revert "drm/dp_mst: Skip validating ports during destruction, just ref"
	geneve: move debug check after netdev unregister
	hsr: fix general protection fault in hsr_addr_is_self()
	macsec: restrict to ethernet devices
	mlxsw: spectrum_mr: Fix list iteration in error path
	net: cbs: Fix software cbs to consider packet sending time
	net: dsa: Fix duplicate frames flooded by learning
	net: mvneta: Fix the case where the last poll did not process all rx
	net/packet: tpacket_rcv: avoid a producer race condition
	net: qmi_wwan: add support for ASKEY WWHC050
	net_sched: cls_route: remove the right filter from hashtable
	net_sched: keep alloc_hash updated after hash allocation
	net: stmmac: dwmac-rk: fix error path in rk_gmac_probe
	NFC: fdp: Fix a signedness bug in fdp_nci_send_patch()
	slcan: not call free_netdev before rtnl_unlock in slcan_open
	bnxt_en: fix memory leaks in bnxt_dcbnl_ieee_getets()
	bnxt_en: Reset rings if ring reservation fails during open()
	net: ip_gre: Separate ERSPAN newlink / changelink callbacks
	net: ip_gre: Accept IFLA_INFO_DATA-less configuration
	net: dsa: mt7530: Change the LINK bit to reflect the link status
	net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value
	r8169: re-enable MSI on RTL8168c
	tcp: repair: fix TCP_QUEUE_SEQ implementation
	vxlan: check return value of gro_cells_init()
	hsr: use rcu_read_lock() in hsr_get_node_{list/status}()
	hsr: add restart routine into hsr_get_node_list()
	hsr: set .netnsok flag
	cgroup-v1: cgroup_pidlist_next should update position index
	nfs: add minor version to nfs_server_key for fscache
	cpupower: avoid multiple definition with gcc -fno-common
	drivers/of/of_mdio.c:fix of_mdiobus_register()
	cgroup1: don't call release_agent when it is ""
	dt-bindings: net: FMan erratum A050385
	arm64: dts: ls1043a: FMan erratum A050385
	fsl/fman: detect FMan erratum A050385
	s390/qeth: handle error when backing RX buffer
	scsi: ipr: Fix softlockup when rescanning devices in petitboot
	mac80211: Do not send mesh HWMP PREQ if HWMP is disabled
	dpaa_eth: Remove unnecessary boolean expression in dpaa_get_headroom
	sxgbe: Fix off by one in samsung driver strncpy size arg
	ftrace/x86: Anotate text_mutex split between ftrace_arch_code_modify_post_process() and ftrace_arch_code_modify_prepare()
	i2c: hix5hd2: add missed clk_disable_unprepare in remove
	Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger()
	Input: synaptics - enable RMI on HP Envy 13-ad105ng
	Input: avoid BIT() macro usage in the serio.h UAPI header
	ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL
	ARM: dts: dra7: Add bus_dma_limit for L3 bus
	ARM: dts: omap5: Add bus_dma_limit for L3 bus
	perf probe: Do not depend on dwfl_module_addrsym()
	tools: Let O= makes handle a relative path with -C option
	scripts/dtc: Remove redundant YYLOC global declaration
	scsi: sd: Fix optimal I/O size for devices that change reported values
	nl80211: fix NL80211_ATTR_CHANNEL_WIDTH attribute type
	mac80211: mark station unauthorized before key removal
	gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk
	gpiolib: acpi: Rework honor_wakeup option into an ignore_wake option
	gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 BYT + AXP288 model
	RDMA/core: Ensure security pkey modify is not lost
	genirq: Fix reference leaks on irq affinity notifiers
	xfrm: handle NETDEV_UNREGISTER for xfrm device
	vti[6]: fix packet tx through bpf_redirect() in XinY cases
	RDMA/mlx5: Block delay drop to unprivileged users
	xfrm: fix uctx len check in verify_sec_ctx_len
	xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire
	xfrm: policy: Fix doulbe free in xfrm_policy_timer
	afs: Fix some tracing details
	netfilter: flowtable: reload ip{v6}h in nf_flow_tuple_ip{v6}
	netfilter: nft_fwd_netdev: validate family and chain type
	bpf/btf: Fix BTF verification of enum members in struct/union
	vti6: Fix memory leak of skb if input policy check fails
	Revert "r8169: check that Realtek PHY driver module is loaded"
	mac80211: add option for setting control flags
	mac80211: set IEEE80211_TX_CTRL_PORT_CTRL_PROTO for nl80211 TX
	USB: serial: option: add support for ASKEY WWHC050
	USB: serial: option: add BroadMobi BM806U
	USB: serial: option: add Wistron Neweb D19Q1
	USB: cdc-acm: restore capability check order
	USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
	usb: musb: fix crash with highmen PIO and usbmon
	media: flexcop-usb: fix endpoint sanity check
	media: usbtv: fix control-message timeouts
	staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device table
	staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb
	staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
	ahci: Add Intel Comet Lake H RAID PCI ID
	libfs: fix infoleak in simple_attr_read()
	media: ov519: add missing endpoint sanity checks
	media: dib0700: fix rc endpoint lookup
	media: stv06xx: add missing descriptor sanity checks
	media: xirlink_cit: add missing descriptor sanity checks
	mac80211: Check port authorization in the ieee80211_tx_dequeue() case
	mac80211: fix authentication with iwlwifi/mvm
	vt: selection, introduce vc_is_sel
	vt: ioctl, switch VT_IS_IN_USE and VT_BUSY to inlines
	vt: switch vt_dont_switch to bool
	vt: vt_ioctl: remove unnecessary console allocation checks
	vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
	vt: vt_ioctl: fix use-after-free in vt_in_use()
	platform/x86: pmc_atom: Add Lex 2I385SW to critclk_systems DMI table
	bpf: Explicitly memset the bpf_attr structure
	bpf: Explicitly memset some bpf info structures declared on the stack
	gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model
	net: ks8851-ml: Fix IO operations, again
	arm64: alternative: fix build with clang integrated assembler
	perf map: Fix off by one in strncpy() size argument
	ARM: dts: oxnas: Fix clear-mask property
	ARM: bcm2835-rpi-zero-w: Add missing pinctrl name
	ARM: dts: imx6: phycore-som: fix arm and soc minimum voltage
	ARM: dts: N900: fix onenand timings
	arm64: dts: ls1043a-rdb: correct RGMII delay mode to rgmii-id
	arm64: dts: ls1046ardb: set RGMII interfaces to RGMII_ID mode
	Linux 4.19.114

Change-Id: Icc165d2e49aba750e1b5a8856d9774c149e59ce7
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-04-03 08:17:23 +02:00
Srinivas Dasari
052c2f7381 UPSTREAM: cfg80211: Authentication offload to user space in AP mode
commit 40cbfa9021 ("cfg80211/nl80211: Optional authentication
offload to userspace")' introduced authentication offload to user
space by the host drivers in station mode. This commit extends
the same for the AP mode too.

Extend NL80211_ATTR_EXTERNAL_AUTH_SUPPORT to also claim the
support of external authentication from the user space in AP mode.
A new flag parameter is introduced in cfg80211_ap_settings to
intend the same while "start ap".

Host driver to use NL80211_CMD_FRAME interface to transmit and
receive the authentication frames to / from the user space.

Host driver to indicate the flag NL80211_RXMGMT_FLAG_EXTERNAL_AUTH
while sending the authentication frame to the user space. This
intends to the user space that the driver wishes it to process
the authentication frame for certain protocols, though it had
initially advertised the support for SME functionality.

User space shall accordingly do the authentication and indicate
its final status through the command NL80211_CMD_EXTERNAL_AUTH.
Allow the command even if userspace doesn't include the attribute
NL80211_ATTR_SSID for AP interface.

Host driver shall continue with the association sequence and
indicate the STA connection status through cfg80211_new_sta.

To facilitate the host drivers in AP mode for matching the pmkid
by the stations during the association, NL80211_CMD_EXTERNAL_AUTH
is also enhanced to include the pmkid to drivers after
the authentication.
This pmkid can also be used in the STA mode to include in the
association request.

Also modify nl80211_external_auth to not mandate SSID in AP mode.

Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
[remove useless nla_get_flag() usage]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit fe4943702c850fa07f963eaa6f1530d9d4c2da78)
Bug: 153011874
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: Iecdd38a0b6fa7726938c905c4810b9879bc48530
2020-04-02 12:51:05 -07:00
Eugene Syromiatnikov
74d0c209f9 Input: avoid BIT() macro usage in the serio.h UAPI header
commit 52afa505a03d914081f40cb869a3248567a57573 upstream.

The commit 19ba1eb15a ("Input: psmouse - add a custom serio protocol
to send extra information") introduced usage of the BIT() macro
for SERIO_* flags; this macro is not provided in UAPI headers.
Replace if with similarly defined _BITUL() macro defined
in <linux/const.h>.

Fixes: 19ba1eb15a ("Input: psmouse - add a custom serio protocol to send extra information")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Cc: <stable@vger.kernel.org> # v5.0+
Link: https://lore.kernel.org/r/20200324041341.GA32335@asgard.redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-02 15:28:16 +02:00
Eric Biggers
4182a31c77 UPSTREAM: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl
Add an ioctl FS_IOC_GET_ENCRYPTION_NONCE which retrieves the nonce from
an encrypted file or directory.  The nonce is the 16-byte random value
stored in the inode's encryption xattr.  It is normally used together
with the master key to derive the inode's actual encryption key.

The nonces are needed by automated tests that verify the correctness of
the ciphertext on-disk.  Except for the IV_INO_LBLK_64 case, there's no
way to replicate a file's ciphertext without knowing that file's nonce.

The nonces aren't secret, and the existing ciphertext verification tests
in xfstests retrieve them from disk using debugfs or dump.f2fs.  But in
environments that lack these debugging tools, getting the nonces by
manually parsing the filesystem structure would be very hard.

To make this important type of testing much easier, let's just add an
ioctl that retrieves the nonce.

Link: https://lore.kernel.org/r/20200314205052.93294-2-ebiggers@kernel.org
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit e98ad464750c0894bc560d10503dae8ff90ccdac)
Bug: 151100202
Change-Id: Ieef2c57b9257ae38eb2e5c1a018ca6f325bb62dd
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-04-01 09:48:10 -07:00
Andrey Konovalov
d63a6475b8 UPSTREAM: usb: raw_gadget: fix compilation warnings in uapi headers
(Upstream commit 956ae8df7fed0a2acc7ae934f24493eaeb031f62.)

Mark usb_raw_io_flags_valid() and usb_raw_io_flags_zero() as inline to
fix the following warnings:

./usr/include/linux/usb/raw_gadget.h:69:12: warning: unused function 'usb_raw_io_flags_valid' [-Wunused-function]
./usr/include/linux/usb/raw_gadget.h:74:12: warning: unused function 'usb_raw_io_flags_zero' [-Wunused-function]

Reported-by: kernelci.org bot <bot@kernelci.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Link: https://lore.kernel.org/r/6206b80b3810f95bfe1d452de45596609a07b6ea.1584456779.git.andreyknvl@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 147413187
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Change-Id: I9bc9708a39f3af4e6a892685530ff04cdf5abe64
2020-03-31 17:40:18 +02:00