Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6210f958 authored by Ram Muthiah's avatar Ram Muthiah
Browse files

Merge android-4.14 into android-4.14-stable



Signed-off-by: default avatarRam Muthiah <rammuthiah@google.com>
Change-Id: I75d5534f9150f355bc9be7bb3457d76b15c0c027
parents 09950ac3 bf3b3bbd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -137,6 +137,10 @@
			dynamic table installation which will install SSDT
			tables to /sys/firmware/acpi/tables/dynamic.

	acpi_no_watchdog	[HW,ACPI,WDT]
			Ignore the ACPI-based watchdog interface (WDAT) and let
			a native driver control the watchdog device instead.

	acpi_rsdp=	[ACPI,EFI,KEXEC]
			Pass the RSDP address to the kernel, mostly used
			on machines running EFI runtime service to boot the
+9 −2
Original line number Diff line number Diff line
@@ -44,8 +44,15 @@ The AArch64 Tagged Address ABI has two stages of relaxation depending
how the user addresses are used by the kernel:

1. User addresses not accessed by the kernel but used for address space
   management (e.g. ``mmap()``, ``mprotect()``, ``madvise()``). The use
   of valid tagged pointers in this context is always allowed.
   management (e.g. ``mprotect()``, ``madvise()``). The use of valid
   tagged pointers in this context is allowed with the exception of
   ``brk()``, ``mmap()`` and the ``new_address`` argument to
   ``mremap()`` as these have the potential to alias with existing
   user addresses.

   NOTE: This behaviour changed in v5.6 and so some earlier kernels may
   incorrectly accept valid tagged pointers for the ``brk()``,
   ``mmap()`` and ``mremap()`` system calls.

2. User addresses accessed by the kernel (e.g. ``write()``). This ABI
   relaxation is disabled by default and the application thread needs to
+11 −0
Original line number Diff line number Diff line
@@ -633,6 +633,17 @@ from a passphrase or other low-entropy user credential.
FS_IOC_GET_ENCRYPTION_PWSALT is deprecated.  Instead, prefer to
generate and manage any needed salt(s) in userspace.

Getting a file's encryption nonce
---------------------------------

Since Linux v5.7, the ioctl FS_IOC_GET_ENCRYPTION_NONCE is supported.
On encrypted files and directories it gets the inode's 16-byte nonce.
On unencrypted files and directories, it fails with ENODATA.

This ioctl can be useful for automated tests which verify that the
encryption is being done correctly.  It is not needed for normal use
of fscrypt.

Adding keys
-----------

+7 −0
Original line number Diff line number Diff line
@@ -606,3 +606,10 @@ in your dentry operations instead.
	dentry separately, and it now has request_mask and query_flags arguments
	to specify the fields and sync type requested by statx.  Filesystems not
	supporting any statx-specific features may ignore the new arguments.
--
[mandatory]

	[should've been added in 2016] stale comment in finish_open()
	nonwithstanding, failure exits in ->atomic_open() instances should
	*NOT* fput() the file, no matter what.  Everything is handled by the
	caller.
+61 −0
Original line number Diff line number Diff line
==============
USB Raw Gadget
==============

USB Raw Gadget is a kernel module that provides a userspace interface for
the USB Gadget subsystem. Essentially it allows to emulate USB devices
from userspace. Enabled with CONFIG_USB_RAW_GADGET. Raw Gadget is
currently a strictly debugging feature and shouldn't be used in
production, use GadgetFS instead.

Comparison to GadgetFS
~~~~~~~~~~~~~~~~~~~~~~

Raw Gadget is similar to GadgetFS, but provides a more low-level and
direct access to the USB Gadget layer for the userspace. The key
differences are:

1. Every USB request is passed to the userspace to get a response, while
   GadgetFS responds to some USB requests internally based on the provided
   descriptors. However note, that the UDC driver might respond to some
   requests on its own and never forward them to the Gadget layer.

2. GadgetFS performs some sanity checks on the provided USB descriptors,
   while Raw Gadget allows you to provide arbitrary data as responses to
   USB requests.

3. Raw Gadget provides a way to select a UDC device/driver to bind to,
   while GadgetFS currently binds to the first available UDC.

4. Raw Gadget uses predictable endpoint names (handles) across different
   UDCs (as long as UDCs have enough endpoints of each required transfer
   type).

5. Raw Gadget has ioctl-based interface instead of a filesystem-based one.

Userspace interface
~~~~~~~~~~~~~~~~~~~

To create a Raw Gadget instance open /dev/raw-gadget. Multiple raw-gadget
instances (bound to different UDCs) can be used at the same time. The
interaction with the opened file happens through the ioctl() calls, see
comments in include/uapi/linux/usb/raw_gadget.h for details.

The typical usage of Raw Gadget looks like:

1. Open Raw Gadget instance via /dev/raw-gadget.
2. Initialize the instance via USB_RAW_IOCTL_INIT.
3. Launch the instance with USB_RAW_IOCTL_RUN.
4. In a loop issue USB_RAW_IOCTL_EVENT_FETCH calls to receive events from
   Raw Gadget and react to those depending on what kind of USB device
   needs to be emulated.

Potential future improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Implement ioctl's for setting/clearing halt status on endpoints.

- Reporting more events (suspend, resume, etc.) through
  USB_RAW_IOCTL_EVENT_FETCH.

- Support O_NONBLOCK I/O.
Loading