diff --git a/Documentation/ABI/testing/sysfs-class-devlink b/Documentation/ABI/testing/sysfs-class-devlink new file mode 100644 index 000000000000..64791b65c9a3 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-devlink @@ -0,0 +1,126 @@ +What: /sys/class/devlink/.../ +Date: May 2020 +Contact: Saravana Kannan +Description: + Provide a place in sysfs for the device link objects in the + kernel at any given time. The name of a device link directory, + denoted as ... above, is of the form -- + where is the supplier device name and is + the consumer device name. + +What: /sys/class/devlink/.../auto_remove_on +Date: May 2020 +Contact: Saravana Kannan +Description: + This file indicates if the device link will ever be + automatically removed by the driver core when the consumer and + supplier devices themselves are still present. + + This will be one of the following strings: + + 'consumer unbind' + 'supplier unbind' + 'never' + + 'consumer unbind' means the device link will be removed when + the consumer's driver is unbound from the consumer device. + + 'supplier unbind' means the device link will be removed when + the supplier's driver is unbound from the supplier device. + + 'never' means the device link will not be automatically removed + when as long as the supplier and consumer devices themselves + are still present. + +What: /sys/class/devlink/.../consumer +Date: May 2020 +Contact: Saravana Kannan +Description: + This file is a symlink to the consumer device's sysfs directory. + +What: /sys/class/devlink/.../runtime_pm +Date: May 2020 +Contact: Saravana Kannan +Description: + This file indicates if the device link has any impact on the + runtime power management behavior of the consumer and supplier + devices. For example: Making sure the supplier doesn't enter + runtime suspend while the consumer is active. + + This will be one of the following strings: + + '0' - Does not affect runtime power management + '1' - Affects runtime power management + +What: /sys/class/devlink/.../status +Date: May 2020 +Contact: Saravana Kannan +Description: + This file indicates the status of the device link. The status + of a device link is affected by whether the supplier and + consumer devices have been bound to their corresponding + drivers. The status of a device link also affects the binding + and unbinding of the supplier and consumer devices with their + drivers and also affects whether the software state of the + supplier device is synced with the hardware state of the + supplier device after boot up. + See also: sysfs-devices-state_synced. + + This will be one of the following strings: + + 'not tracked' + 'dormant' + 'available' + 'consumer probing' + 'active' + 'supplier unbinding' + 'unknown' + + 'not tracked' means this device link does not track the status + and has no impact on the binding, unbinding and syncing the + hardware and software device state. + + 'dormant' means the supplier and the consumer devices have not + bound to their driver. + + 'available' means the supplier has bound to its driver and is + available to supply resources to the consumer device. + + 'consumer probing' means the consumer device is currently + trying to bind to its driver. + + 'active' means the supplier and consumer devices have both + bound successfully to their drivers. + + 'supplier unbinding' means the supplier devices is currently in + the process of unbinding from its driver. + + 'unknown' means the state of the device link is not any of the + above. If this is ever the value, there's a bug in the kernel. + +What: /sys/class/devlink/.../supplier +Date: May 2020 +Contact: Saravana Kannan +Description: + This file is a symlink to the supplier device's sysfs directory. + +What: /sys/class/devlink/.../sync_state_only +Date: May 2020 +Contact: Saravana Kannan +Description: + This file indicates if the device link is limited to only + affecting the syncing of the hardware and software state of the + supplier device. + + This will be one of the following strings: + + '0' + '1' - Affects runtime power management + + '0' means the device link can affect other device behaviors + like binding/unbinding, suspend/resume, runtime power + management, etc. + + '1' means the device link will only affect the syncing of + hardware and software state of the supplier device after boot + up and doesn't not affect other behaviors of the devices. diff --git a/Documentation/ABI/testing/sysfs-devices-consumer b/Documentation/ABI/testing/sysfs-devices-consumer new file mode 100644 index 000000000000..1f06d74d1c3c --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-consumer @@ -0,0 +1,8 @@ +What: /sys/devices/.../consumer: +Date: May 2020 +Contact: Saravana Kannan +Description: + The /sys/devices/.../consumer: are symlinks to device + links where this device is the supplier. denotes the + name of the consumer in that device link. There can be zero or + more of these symlinks for a given device. diff --git a/Documentation/ABI/testing/sysfs-devices-state_synced b/Documentation/ABI/testing/sysfs-devices-state_synced new file mode 100644 index 000000000000..0c922d7d02fc --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-state_synced @@ -0,0 +1,24 @@ +What: /sys/devices/.../state_synced +Date: May 2020 +Contact: Saravana Kannan +Description: + The /sys/devices/.../state_synced attribute is only present for + devices whose bus types or driver provides the .sync_state() + callback. The number read from it (0 or 1) reflects the value + of the device's 'state_synced' field. A value of 0 means the + .sync_state() callback hasn't been called yet. A value of 1 + means the .sync_state() callback has been called. + + Generally, if a device has sync_state() support and has some of + the resources it provides enabled at the time the kernel starts + (Eg: enabled by hardware reset or bootloader or anything that + run before the kernel starts), then it'll keep those resources + enabled and in a state that's compatible with the state they + were in at the start of the kernel. The device will stop doing + this only when the sync_state() callback has been called -- + which happens only when all its consumer devices are registered + and have probed successfully. Resources that were left disabled + at the time the kernel starts are not affected or limited in + any way by sync_state() callbacks. + + diff --git a/Documentation/ABI/testing/sysfs-devices-supplier b/Documentation/ABI/testing/sysfs-devices-supplier new file mode 100644 index 000000000000..a919e0db5e90 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-supplier @@ -0,0 +1,8 @@ +What: /sys/devices/.../supplier: +Date: May 2020 +Contact: Saravana Kannan +Description: + The /sys/devices/.../supplier: are symlinks to device + links where this device is the consumer. denotes the + name of the supplier in that device link. There can be zero or + more of these symlinks for a given device. diff --git a/Documentation/ABI/testing/sysfs-devices-waiting_for_supplier b/Documentation/ABI/testing/sysfs-devices-waiting_for_supplier new file mode 100644 index 000000000000..59d073d20db6 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-waiting_for_supplier @@ -0,0 +1,17 @@ +What: /sys/devices/.../waiting_for_supplier +Date: May 2020 +Contact: Saravana Kannan +Description: + The /sys/devices/.../waiting_for_supplier attribute is only + present when fw_devlink kernel command line option is enabled + and is set to something stricter than "permissive". It is + removed once a device probes successfully (because the + information is no longer relevant). The number read from it (0 + or 1) reflects whether the device is waiting for one or more + suppliers to be added and then linked to using device links + before the device can probe. + + A value of 0 means the device is not waiting for any suppliers + to be added before it can probe. A value of 1 means the device + is waiting for one or more suppliers to be added before it can + probe. diff --git a/Makefile b/Makefile index ded5e23755b1..bde2119c2928 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 56 +SUBLEVEL = 57 EXTRAVERSION = NAME = Kleptomaniac Octopus diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index d32a00e62cb1..c4fdc931507a 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -3,12 +3,12 @@ - + - - + + - + @@ -22,32 +22,32 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - + + - + - + @@ -55,63 +55,63 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - + - - - + + + - - + + - + - - - - - + + + + + - - + + - + - + @@ -122,130 +122,130 @@ - - - - - - + + + + + + - - - - + + + + - - + + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - - + + + - - + + - - - - + + + + - + - - - - - + + + + + - + - + - - - - - + + + + + - - - - + + + + - + - + - - + + - + - + - - - + + + - + - + - - - - - - + + + + + + @@ -272,15 +272,15 @@ - - - + + + - + @@ -288,285 +288,285 @@ - + - - - - + + + + - + - - - - + + + + - + - + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - + - - - - - - - + + + + + + + - - + + - + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - - - - - - - - - + + + + + + + + + - + - - - + + + @@ -574,73 +574,73 @@ - + - - + + - + - + - + - - - - - - - - + + + + + + + + - + - - + + - + - - - - + + + + - - + + - - + + - - + + - - + + @@ -652,66 +652,66 @@ - - - - + + + + - + - + - - + + - + - - - - - + + + + + - + - + - + - - - + + + - - - - - + + + + + - + - - - + + + - + @@ -723,240 +723,240 @@ - - - - - + + + + + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -965,38 +965,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1011,20 +1011,20 @@ - - - - - - - + + + + + + + - + - - - + + + @@ -1033,13 +1033,13 @@ - - - - - - - + + + + + + + @@ -1051,244 +1051,244 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - + + + - - + + - - - - + + + + @@ -1297,154 +1297,154 @@ - - + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - + - + - + - + - + - - + + - - - - - - - - + + + + + + + + @@ -1458,125 +1458,125 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - + - - - - + + + + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - - - + + + + - + @@ -1592,58 +1592,58 @@ - - + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + @@ -1656,10 +1656,10 @@ - - - - + + + + @@ -1668,268 +1668,268 @@ - + - - + + - - - + + + - - - - - - - - - + + + + + + + + + - - - + + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - + + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - + + - + - - - + + + - - - - + + + + - - - - + + + + - + @@ -1938,28 +1938,28 @@ - - + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + @@ -1971,8 +1971,8 @@ - - + + @@ -2029,78 +2029,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2122,96 +2122,96 @@ - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - + + + + + + @@ -2220,216 +2220,216 @@ - - - - - - - - - + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - + - - + + - - - + + + - - - + + + - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + @@ -2437,173 +2437,173 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2611,56 +2611,56 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - + + + + - - - + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + @@ -2678,28 +2678,28 @@ - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + - + @@ -2721,9 +2721,9 @@ - - - + + + @@ -2731,124 +2731,124 @@ - - - - - + + + + + - + - + - - - + + + - - + + - + - + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - + + + + + - + - - + + @@ -2859,148 +2859,148 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - + - + - - + + - + - - - + + + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -3014,34 +3014,34 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - + + + @@ -3060,79 +3060,79 @@ - + - + - - - + + + - - - - - - - - + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3143,226 +3143,226 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3371,10 +3371,10 @@ - + - + @@ -3382,7 +3382,7 @@ - + @@ -3404,25 +3404,25 @@ - - - - + + + + - - + + - - + + - - - + + + @@ -3441,49 +3441,49 @@ - - - - - + + + + + - - - - - - - - - - + + + + + + + + + + - + - - - - - - + + + + + + - + - - - - + + + + @@ -3500,193 +3500,193 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - + + + + + + + + - - + + - + - + - + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - + + - + - + - - + + - - + + - - - + + + - - - - - - - - + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - - - + + + - - + + - - - + + + - - - - + + + + - + @@ -3699,122 +3699,122 @@ - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -3822,57 +3822,57 @@ - - - + + + - - - + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - + + - - + + @@ -3886,95 +3886,95 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - - - + + + - - + + - - + + @@ -3988,27 +3988,27 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + @@ -4017,43 +4017,43 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -4078,9 +4078,9 @@ - + - + @@ -4093,7 +4093,7 @@ - + @@ -4111,31 +4111,31 @@ - - + + - - + + - + - + - + - - + + @@ -4153,9 +4153,9 @@ - + - + @@ -4165,13 +4165,13 @@ - - + + - - - + + + @@ -4186,14 +4186,14 @@ - + - + - + @@ -21678,51 +21678,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -21738,10 +21693,6 @@ - - - - @@ -21886,91 +21837,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -22000,13 +21866,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -26032,7 +26071,7 @@ - + @@ -26116,7 +26155,7 @@ - + @@ -35071,45 +35110,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -35212,6 +35212,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -35320,43 +35369,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -35426,35 +35438,35 @@ - - + + - - + + - - + + - - + + - - - - + + + + - - - + + + @@ -35483,14 +35495,6 @@ - - - - - - - - @@ -35832,7 +35836,6 @@ - @@ -36852,13 +36855,13 @@ - + - + @@ -38946,7 +38949,7 @@ - + @@ -39038,7 +39041,7 @@ - + @@ -39617,17 +39620,17 @@ - + - + - + @@ -41321,7 +41324,7 @@ - + @@ -41333,7 +41336,7 @@ - + @@ -41453,7 +41456,7 @@ - + @@ -41921,7 +41924,7 @@ - + @@ -41933,7 +41936,7 @@ - + @@ -44308,7 +44311,7 @@ - + @@ -44454,7 +44457,7 @@ - + @@ -46436,13 +46439,13 @@ - + - + @@ -47171,7 +47174,7 @@ - + @@ -47219,7 +47222,7 @@ - + @@ -47228,7 +47231,7 @@ - + @@ -47239,7 +47242,7 @@ - + @@ -49214,7 +49217,7 @@ - + @@ -49878,7 +49881,7 @@ - + @@ -50859,13 +50862,13 @@ - + - + @@ -51376,7 +51379,6 @@ - @@ -51400,7 +51402,7 @@ - + @@ -51408,7 +51410,7 @@ - + @@ -51637,7 +51639,7 @@ - + @@ -51651,17 +51653,6 @@ - - - - - - - - - - - @@ -51858,6 +51849,17 @@ + + + + + + + + + + + @@ -55023,6 +55025,17 @@ + + + + + + + + + + + @@ -57114,17 +57127,6 @@ - - - - - - - - - - - @@ -58569,20 +58571,6 @@ - - - - - - - - - - - - - - @@ -60336,7 +60324,6 @@ - @@ -61411,6 +61398,17 @@ + + + + + + + + + + + @@ -61871,7 +61869,7 @@ - + @@ -63769,36 +63767,39 @@ - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + + + + @@ -63853,7 +63854,7 @@ - + @@ -64668,7 +64669,7 @@ - + @@ -65241,7 +65242,7 @@ - + @@ -66941,17 +66942,17 @@ - + - + - + @@ -67890,8 +67891,8 @@ - - + + @@ -72038,7 +72039,7 @@ - + @@ -75626,7 +75627,7 @@ - + @@ -75653,7 +75654,7 @@ - + @@ -75755,7 +75756,7 @@ - + @@ -78466,7 +78467,7 @@ - + @@ -80235,15 +80236,15 @@ - + - + - + @@ -80670,7 +80671,7 @@ - + @@ -83717,7 +83718,7 @@ - + @@ -84353,6 +84354,25 @@ + + + + + + + + + + + + + + + + + + + @@ -84992,7 +85012,7 @@ - + @@ -85010,13 +85030,13 @@ - + - + @@ -85070,7 +85090,7 @@ - + @@ -85468,7 +85488,7 @@ - + @@ -86336,7 +86356,7 @@ - + @@ -88264,7 +88284,7 @@ - + @@ -88280,7 +88300,7 @@ - + @@ -88288,7 +88308,7 @@ - + @@ -88316,6 +88336,25 @@ + + + + + + + + + + + + + + + + + + + @@ -88870,7 +88909,7 @@ - + @@ -88892,8 +88931,8 @@ - - + + @@ -89359,159 +89398,159 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -89667,7 +89706,7 @@ - + @@ -89993,7 +90032,7 @@ - + @@ -90011,7 +90050,7 @@ - + @@ -91146,10 +91185,10 @@ - + - + @@ -92498,7 +92537,7 @@ - + @@ -92865,7 +92904,7 @@ - + @@ -94765,7 +94804,7 @@ - + @@ -96856,27 +96895,27 @@ - + - + - + - + - + - + - + - + @@ -97577,7 +97616,7 @@ - + @@ -97858,7 +97897,7 @@ - + @@ -97943,7 +97982,7 @@ - + @@ -98938,7 +98977,7 @@ - + @@ -100475,7 +100514,7 @@ - + @@ -101908,7 +101947,7 @@ - + @@ -101938,7 +101977,7 @@ - + @@ -102023,7 +102062,7 @@ - + @@ -102191,7 +102230,7 @@ - + @@ -102470,17 +102509,6 @@ - - - - - - - - - - - @@ -102829,17 +102857,6 @@ - - - - - - - - - - - @@ -103390,7 +103407,7 @@ - + @@ -103401,7 +103418,7 @@ - + @@ -103488,25 +103505,6 @@ - - - - - - - - - - - - - - - - - - - @@ -104024,7 +104022,7 @@ - + @@ -104104,7 +104102,7 @@ - + @@ -104241,7 +104239,7 @@ - + @@ -104304,7 +104302,7 @@ - + @@ -104865,6 +104863,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104888,7 +104916,7 @@ - + @@ -105091,6 +105119,25 @@ + + + + + + + + + + + + + + + + + + + @@ -105132,7 +105179,7 @@ - + @@ -105654,8 +105701,8 @@ - - + + @@ -105822,7 +105869,7 @@ - + @@ -105830,7 +105877,7 @@ - + @@ -105852,7 +105899,7 @@ - + @@ -105860,7 +105907,7 @@ - + @@ -105885,7 +105932,7 @@ - + @@ -106752,10 +106799,10 @@ - + - + @@ -106924,7 +106971,7 @@ - + @@ -106934,7 +106981,7 @@ - + @@ -107640,7 +107687,7 @@ - + @@ -107648,7 +107695,7 @@ - + @@ -107664,7 +107711,7 @@ - + @@ -107740,7 +107787,7 @@ - + @@ -108023,7 +108070,7 @@ - + @@ -108032,7 +108079,7 @@ - + @@ -108783,62 +108830,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -108960,10 +108951,10 @@ - + - + @@ -109116,8 +109107,6 @@ - - @@ -109411,14 +109400,6 @@ - - - - - - - - @@ -109440,10 +109421,10 @@ - + - + @@ -109451,14 +109432,6 @@ - - - - - - - - @@ -109476,7 +109449,7 @@ - + @@ -109484,7 +109457,7 @@ - + @@ -109849,17 +109822,6 @@ - - - - - - - - - - - @@ -109969,7 +109931,7 @@ - + @@ -109988,7 +109950,7 @@ - + @@ -110391,7 +110353,7 @@ - + @@ -110403,6 +110365,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -110424,21 +110421,45 @@ - + - + - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -112027,7 +112048,7 @@ - + @@ -112057,7 +112078,7 @@ - + @@ -112076,10 +112097,10 @@ - + - + @@ -115171,7 +115192,7 @@ - + @@ -115179,7 +115200,7 @@ - + @@ -115187,7 +115208,7 @@ - + @@ -115195,7 +115216,7 @@ - + @@ -115217,7 +115238,7 @@ - + @@ -115225,7 +115246,7 @@ - + @@ -115236,7 +115257,7 @@ - + @@ -116068,10 +116089,10 @@ - + - + @@ -116079,7 +116100,7 @@ - + @@ -116125,7 +116146,7 @@ - + @@ -116207,10 +116228,10 @@ - + - + @@ -116786,7 +116807,7 @@ - + @@ -116938,6 +116959,17 @@ + + + + + + + + + + + @@ -117030,7 +117062,7 @@ - + @@ -117082,7 +117114,7 @@ - + @@ -117142,7 +117174,7 @@ - + @@ -117876,17 +117908,17 @@ - + - + - + @@ -117894,7 +117926,7 @@ - + @@ -117922,7 +117954,7 @@ - + @@ -117939,7 +117971,7 @@ - + @@ -117967,22 +117999,22 @@ - + - + - + - + - + @@ -117990,7 +118022,7 @@ - + @@ -117998,7 +118030,7 @@ - + @@ -118006,7 +118038,7 @@ - + @@ -118029,7 +118061,7 @@ - + @@ -118107,13 +118139,13 @@ - + - + @@ -119021,7 +119053,7 @@ - + @@ -119189,7 +119221,7 @@ - + @@ -119873,7 +119905,7 @@ - + @@ -119990,10 +120022,10 @@ - + - + @@ -120078,10 +120110,10 @@ - + - + @@ -120951,7 +120983,7 @@ - + @@ -122160,7 +122192,7 @@ - + @@ -122775,15 +122807,15 @@ - + - - - - + + + + @@ -122791,6 +122823,6 @@ diff --git a/android/abi_gki_aarch64_fcb0d3ef9b.xml b/android/abi_gki_aarch64_3f413d0ec7.xml similarity index 98% rename from android/abi_gki_aarch64_fcb0d3ef9b.xml rename to android/abi_gki_aarch64_3f413d0ec7.xml index 0460ad28bcd3..99415696a788 100644 --- a/android/abi_gki_aarch64_fcb0d3ef9b.xml +++ b/android/abi_gki_aarch64_3f413d0ec7.xml @@ -3,12 +3,12 @@ - + - - + + - + @@ -18,60 +18,60 @@ - - - - - + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + - + - - - + + + - + - + @@ -79,94 +79,94 @@ - + - + - - + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - + + + + - + - + - + - + - - - + + + - - - - - - + + + + + + @@ -193,230 +193,230 @@ - + - + - + - - - + + + - + - + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - + + - + - + - - - - - - - - - + + + + + + + + + - + - + - + - + - - - - - - - - + + + + + + + + - - + + - + - - - + + + - + - + @@ -426,212 +426,212 @@ - - - - + + + + - - + + - + - + - - - + + + - + - + - - - + + + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -640,36 +640,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -684,18 +684,18 @@ - - - - - - + + + + + + - + - - + + @@ -704,10 +704,10 @@ - - - - + + + + @@ -715,199 +715,199 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - - - - - - - + + + + + + + - - - - + + + + - - + + - + - - - - + + + + @@ -916,118 +916,118 @@ - - - - - - + + + + + + - - - - - - - - + + + + + + + + - + - - - - - - - - - + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + - + - + - + - - - - - - - - + + + + + + + + @@ -1039,87 +1039,87 @@ - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - + @@ -1127,39 +1127,39 @@ - + - - + + - - + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + @@ -1173,168 +1173,168 @@ - + - - - - - - - + + + + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - + + - - - + + + - - - - - - - - + + + + + + + + - + - + - - - - - + + + + + - - - - - + + + + + - - + + @@ -1383,42 +1383,42 @@ - - - - - - - - - - + + + + + + + + + + - - + + - - + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -1431,21 +1431,21 @@ - - - - - - - - - - + + + + + + + + + + - + - - + + @@ -1453,166 +1453,166 @@ - - - - - - - + + + + + + + - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + @@ -1620,140 +1620,140 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + - + - + @@ -1767,21 +1767,21 @@ - - - - - + + + + + - - - - - + + + + + - + @@ -1802,128 +1802,128 @@ - + - - - - - + + + + + - + - - + + - + - + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - + - + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - + - - + + - + @@ -1931,57 +1931,57 @@ - - + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + @@ -1992,27 +1992,27 @@ - - - - - - - - - + + + + + + + + + - - - + + + - + - - - + + + @@ -2030,185 +2030,185 @@ - - - - - + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -2245,13 +2245,13 @@ - + - - + + @@ -2268,155 +2268,155 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + - + - - - + + + - - - - + + + + - - + + - + - + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + - + - + - - + + - - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - - - + + + + - + @@ -2428,127 +2428,127 @@ - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - + - - - - - - + + + + + + - - - - - + + + + + - - + + - - + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + - - + + @@ -2562,58 +2562,58 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + - + - - + + - - + + @@ -2625,16 +2625,16 @@ - - - - - - - + + + + + + + - + @@ -2643,14 +2643,14 @@ - + - - - - - - + + + + + + @@ -2663,7 +2663,7 @@ - + @@ -2675,7 +2675,7 @@ - + @@ -2684,19 +2684,19 @@ - + - + - + - + @@ -2710,16 +2710,16 @@ - + - + - - + + @@ -2731,12 +2731,12 @@ - - + + - + @@ -4639,7 +4639,7 @@ - + @@ -4850,20 +4850,6 @@ - - - - - - - - - - - - - - @@ -4997,6 +4983,20 @@ + + + + + + + + + + + + + + @@ -7055,7 +7055,7 @@ - + @@ -7283,10 +7283,6 @@ - - - - @@ -7346,58 +7342,180 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + - - - + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + - - - + + + - - - + + + + + + + @@ -7454,81 +7572,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -7536,10 +7579,6 @@ - - - - @@ -12392,7 +12431,7 @@ - + @@ -18590,23 +18629,21 @@ - + - + - + + + + + + + - - - - - - - - - + @@ -19680,6 +19717,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -19758,6 +19830,17 @@ + + + + + + + + + + + @@ -20016,15 +20099,15 @@ - + - + - + @@ -20047,7 +20130,7 @@ - + @@ -21603,7 +21686,7 @@ - + @@ -21623,7 +21706,7 @@ - + @@ -22733,7 +22816,7 @@ - + @@ -22799,7 +22882,7 @@ - + @@ -22836,7 +22919,7 @@ - + @@ -22855,7 +22938,7 @@ - + @@ -23020,9 +23103,9 @@ - + - + @@ -23883,10 +23966,10 @@ - + - + @@ -24396,10 +24479,10 @@ - + - + @@ -24450,7 +24533,7 @@ - + @@ -24461,7 +24544,7 @@ - + @@ -24553,13 +24636,13 @@ - + - + @@ -25109,7 +25192,7 @@ - + @@ -25118,7 +25201,7 @@ - + @@ -25345,7 +25428,7 @@ - + @@ -25354,7 +25437,7 @@ - + @@ -27309,7 +27392,7 @@ - + @@ -27321,7 +27404,7 @@ - + @@ -27977,7 +28060,7 @@ - + @@ -27985,7 +28068,7 @@ - + @@ -28283,7 +28366,7 @@ - + @@ -28375,7 +28458,7 @@ - + @@ -28393,7 +28476,7 @@ - + @@ -28426,7 +28509,7 @@ - + @@ -28444,7 +28527,7 @@ - + @@ -28666,7 +28749,7 @@ - + @@ -30118,7 +30201,7 @@ - + @@ -30153,10 +30236,10 @@ - + - + @@ -30167,6 +30250,14 @@ + + + + + + + + @@ -30921,14 +31012,6 @@ - - - - - - - - @@ -30987,6 +31070,25 @@ + + + + + + + + + + + + + + + + + + + @@ -30995,13 +31097,13 @@ - + - + @@ -31020,7 +31122,7 @@ - + @@ -31163,10 +31265,10 @@ - + - + @@ -31188,10 +31290,10 @@ - + - + @@ -31225,7 +31327,7 @@ - + @@ -31269,7 +31371,7 @@ - + @@ -31497,18 +31599,26 @@ - + - + - + - + - + + + + + + + + + @@ -31541,7 +31651,7 @@ - + @@ -31549,7 +31659,7 @@ - + @@ -31557,7 +31667,7 @@ - + @@ -33104,15 +33214,12 @@ - + - + - - - - + @@ -33251,7 +33358,7 @@ - + @@ -33725,7 +33832,7 @@ - + @@ -33747,7 +33854,7 @@ - + @@ -34576,36 +34683,39 @@ - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + + + + @@ -34674,7 +34784,7 @@ - + @@ -35847,7 +35957,7 @@ - + @@ -36968,14 +37078,6 @@ - - - - - - - - @@ -38609,7 +38711,7 @@ - + @@ -38617,7 +38719,7 @@ - + @@ -38630,7 +38732,23 @@ - + + + + + + + + + + + + + + + + + @@ -38641,7 +38759,7 @@ - + @@ -38655,7 +38773,15 @@ - + + + + + + + + + @@ -38663,7 +38789,24 @@ - + + + + + + + + + + + + + + + + + + @@ -38671,7 +38814,7 @@ - + @@ -38679,7 +38822,7 @@ - + @@ -38825,6 +38968,17 @@ + + + + + + + + + + + @@ -38879,7 +39033,7 @@ - + @@ -38887,15 +39041,15 @@ - + - + - + @@ -39503,10 +39657,10 @@ - + - + @@ -39559,10 +39713,10 @@ - + - + @@ -39651,7 +39805,7 @@ - + @@ -40183,7 +40337,7 @@ - + @@ -40223,10 +40377,10 @@ - + - + @@ -40712,10 +40866,10 @@ - + - + @@ -40729,7 +40883,7 @@ - + @@ -40751,7 +40905,7 @@ - + @@ -40760,7 +40914,7 @@ - + @@ -41151,7 +41305,7 @@ - + @@ -42725,7 +42879,7 @@ - + @@ -43145,7 +43299,7 @@ - + @@ -43164,7 +43318,7 @@ - + @@ -43532,12 +43686,12 @@ - + - + @@ -48463,7 +48617,7 @@ - + @@ -49213,7 +49367,7 @@ - + @@ -49254,7 +49408,7 @@ - + @@ -49267,7 +49421,7 @@ - + @@ -49281,7 +49435,7 @@ - + @@ -49851,7 +50005,7 @@ - + @@ -49937,7 +50091,7 @@ - + @@ -49951,14 +50105,6 @@ - - - - - - - - @@ -49967,7 +50113,7 @@ - + @@ -50286,7 +50432,7 @@ - + @@ -50501,7 +50647,7 @@ - + @@ -50516,7 +50662,7 @@ - + @@ -50552,7 +50698,7 @@ - + @@ -50967,10 +51113,10 @@ - + - + @@ -51165,7 +51311,7 @@ - + @@ -51530,7 +51676,7 @@ - + @@ -51576,7 +51722,7 @@ - + @@ -51928,7 +52074,7 @@ - + @@ -52020,7 +52166,7 @@ - + @@ -52037,7 +52183,7 @@ - + @@ -52193,14 +52339,6 @@ - - - - - - - - @@ -52212,10 +52350,10 @@ - + - + @@ -52228,10 +52366,10 @@ - + - + @@ -52246,10 +52384,10 @@ - + - + @@ -52303,6 +52441,14 @@ + + + + + + + + @@ -54383,159 +54529,159 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -54691,7 +54837,7 @@ - + @@ -54824,27 +54970,27 @@ - + - + - + - + - + - + - + - + @@ -55612,7 +55758,7 @@ - + @@ -55935,7 +56081,7 @@ - + @@ -56756,7 +56902,7 @@ - + @@ -56768,7 +56914,7 @@ - + @@ -56987,10 +57133,10 @@ - + - + @@ -57362,7 +57508,7 @@ - + @@ -57631,14 +57777,14 @@ - + - + @@ -59480,13 +59626,13 @@ - + - + - + @@ -59554,7 +59700,7 @@ - + @@ -60825,7 +60971,7 @@ - + @@ -62090,29 +62236,29 @@ - + - + - + - + - + - + - + - + - + @@ -65197,7 +65343,7 @@ - + @@ -65532,7 +65678,7 @@ - + @@ -67524,7 +67670,7 @@ - + @@ -67567,7 +67713,7 @@ - + @@ -67591,7 +67737,7 @@ - + @@ -67610,7 +67756,7 @@ - + @@ -67637,7 +67783,7 @@ - + @@ -67659,7 +67805,7 @@ - + @@ -67667,7 +67813,7 @@ - + @@ -67828,13 +67974,13 @@ - + - + @@ -67853,6 +67999,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -67960,6 +68182,25 @@ + + + + + + + + + + + + + + + + + + + @@ -67968,7 +68209,7 @@ - + @@ -68079,23 +68320,6 @@ - - - - - - - - - - - - - - - - - @@ -68441,7 +68665,7 @@ - + @@ -68460,7 +68684,7 @@ - + @@ -68780,7 +69004,7 @@ - + @@ -68865,7 +69089,7 @@ - + @@ -69081,7 +69305,7 @@ - + @@ -69144,7 +69368,7 @@ - + @@ -69509,7 +69733,7 @@ - + @@ -69902,10 +70126,10 @@ - + - + @@ -70580,7 +70804,7 @@ - + @@ -70613,7 +70837,7 @@ - + @@ -70626,7 +70850,7 @@ - + @@ -70721,7 +70945,7 @@ - + @@ -70878,7 +71102,7 @@ - + @@ -71974,7 +72198,7 @@ - + @@ -72174,7 +72398,7 @@ - + @@ -73417,14 +73641,6 @@ - - - - - - - - @@ -76179,7 +76395,7 @@ - + @@ -76192,7 +76408,7 @@ - + @@ -76244,7 +76460,7 @@ - + @@ -76271,7 +76487,7 @@ - + @@ -76312,7 +76528,7 @@ - + @@ -76332,7 +76548,7 @@ - + @@ -76915,7 +77131,7 @@ - + @@ -76955,15 +77171,15 @@ - + - + - + @@ -77171,29 +77387,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -78330,7 +78523,7 @@ - + @@ -78499,7 +78692,7 @@ - + @@ -79219,7 +79412,7 @@ - + @@ -79240,7 +79433,7 @@ - + @@ -79558,7 +79751,6 @@ - @@ -80100,7 +80292,7 @@ - + @@ -80119,13 +80311,13 @@ - + - + - + @@ -80151,7 +80343,7 @@ - + @@ -80888,11 +81080,11 @@ - + - + @@ -80901,7 +81093,7 @@ - + @@ -80955,15 +81147,15 @@ - + - + - + @@ -81011,17 +81203,6 @@ - - - - - - - - - - - @@ -81321,7 +81502,7 @@ - + @@ -81446,23 +81627,6 @@ - - - - - - - - - - - - - - - - - @@ -81594,7 +81758,7 @@ - + @@ -81701,7 +81865,7 @@ - + @@ -82412,7 +82576,7 @@ - + @@ -82788,7 +82952,7 @@ - + @@ -82826,7 +82990,7 @@ - + @@ -82847,7 +83011,7 @@ - + @@ -82871,7 +83035,7 @@ - + @@ -82879,7 +83043,7 @@ - + @@ -83317,7 +83481,7 @@ - + @@ -83381,7 +83545,7 @@ - + @@ -84706,7 +84870,7 @@ - + @@ -84931,9 +85095,9 @@ - - - + + + @@ -85013,7 +85177,7 @@ - + @@ -85136,7 +85300,7 @@ - + @@ -85181,7 +85345,7 @@ - + @@ -85455,13 +85619,13 @@ - + - + @@ -85470,7 +85634,7 @@ - + @@ -86119,16 +86283,16 @@ - + - + - + @@ -86136,7 +86300,7 @@ - + @@ -86146,7 +86310,7 @@ - + @@ -86235,7 +86399,7 @@ - + @@ -86255,7 +86419,7 @@ - + @@ -86292,7 +86456,7 @@ - + @@ -86616,7 +86780,7 @@ - + @@ -86683,7 +86847,7 @@ - + @@ -86813,7 +86977,7 @@ - + @@ -86878,7 +87042,7 @@ - + @@ -86886,7 +87050,7 @@ - + @@ -87032,7 +87196,7 @@ - + @@ -87085,12 +87249,12 @@ - + - + @@ -87107,7 +87271,7 @@ - + @@ -87344,7 +87508,7 @@ - + @@ -87404,7 +87568,7 @@ - + @@ -87412,7 +87576,7 @@ - + @@ -87428,7 +87592,7 @@ - + @@ -87455,7 +87619,7 @@ - + @@ -87495,7 +87659,7 @@ - + @@ -87539,7 +87703,7 @@ - + @@ -87813,7 +87977,7 @@ - + @@ -87821,7 +87985,7 @@ - + @@ -88453,13 +88617,13 @@ - + - + - + @@ -88473,17 +88637,17 @@ - + - + - + @@ -88504,7 +88668,7 @@ - + @@ -88513,7 +88677,7 @@ - + @@ -89034,7 +89198,7 @@ - + @@ -89190,7 +89354,7 @@ - + @@ -89423,7 +89587,7 @@ - + @@ -89717,7 +89881,15 @@ - + + + + + + + + + @@ -90054,41 +90226,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -90105,7 +90245,7 @@ - + @@ -90116,36 +90256,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -90189,7 +90299,7 @@ - + @@ -91766,9 +91876,9 @@ - + - + @@ -91777,7 +91887,7 @@ - + @@ -91785,10 +91895,10 @@ - + - + @@ -91796,14 +91906,6 @@ - - - - - - - - @@ -91815,10 +91917,10 @@ - + - + @@ -94830,7 +94932,7 @@ - + @@ -94838,7 +94940,7 @@ - + @@ -94846,7 +94948,7 @@ - + @@ -94854,6 +94956,23 @@ + + + + + + + + + + + + + + + + + @@ -94873,6 +94992,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -94900,7 +95105,7 @@ - + @@ -94908,7 +95113,7 @@ - + @@ -94916,7 +95121,7 @@ - + @@ -94924,7 +95129,7 @@ - + @@ -94932,54 +95137,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -95638,10 +95795,10 @@ - + - + @@ -95649,13 +95806,13 @@ - + - + - + @@ -95695,7 +95852,7 @@ - + @@ -95706,7 +95863,7 @@ - + @@ -95777,10 +95934,10 @@ - + - + @@ -96163,7 +96320,7 @@ - + @@ -96287,7 +96444,132 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -96295,6 +96577,23 @@ + + + + + + + + + + + + + + + + + @@ -96347,10 +96646,10 @@ - + - + @@ -96677,7 +96976,7 @@ - + @@ -96735,7 +97034,7 @@ - + @@ -96770,10 +97069,10 @@ - + - + @@ -96781,7 +97080,7 @@ - + @@ -96792,6 +97091,14 @@ + + + + + + + + @@ -97013,7 +97320,7 @@ - + @@ -97023,21 +97330,21 @@ - + - + - + - + @@ -97059,7 +97366,7 @@ - + @@ -97093,7 +97400,7 @@ - + @@ -97102,24 +97409,24 @@ - + - + - + - + - + - + @@ -97127,7 +97434,7 @@ - + @@ -97135,7 +97442,7 @@ - + @@ -97143,7 +97450,7 @@ - + @@ -97244,13 +97551,13 @@ - + - + @@ -97551,7 +97858,7 @@ - + @@ -97725,7 +98032,7 @@ - + @@ -98399,7 +98706,7 @@ - + @@ -98516,10 +98823,10 @@ - + - + @@ -98626,10 +98933,10 @@ - + - + @@ -99836,7 +100143,7 @@ - + @@ -100793,7 +101100,7 @@ - + @@ -101039,7 +101346,7 @@ - + @@ -101434,7 +101741,7 @@ - + @@ -101495,9 +101802,9 @@ - + - + diff --git a/arch/arm/include/asm/percpu.h b/arch/arm/include/asm/percpu.h index f44f448537f2..1a3eedbac4a2 100644 --- a/arch/arm/include/asm/percpu.h +++ b/arch/arm/include/asm/percpu.h @@ -5,6 +5,8 @@ #ifndef _ASM_ARM_PERCPU_H_ #define _ASM_ARM_PERCPU_H_ +#include + /* * Same as asm-generic/percpu.h, except that we store the per cpu offset * in the TPIDRPRW. TPIDRPRW only exists on V6K and V7 diff --git a/arch/arm64/include/asm/pointer_auth.h b/arch/arm64/include/asm/pointer_auth.h index 7a24bad1a58b..076a4157a74f 100644 --- a/arch/arm64/include/asm/pointer_auth.h +++ b/arch/arm64/include/asm/pointer_auth.h @@ -3,7 +3,6 @@ #define __ASM_POINTER_AUTH_H #include -#include #include #include @@ -30,6 +29,13 @@ struct ptrauth_keys { struct ptrauth_key apga; }; +/* + * Only include random.h once ptrauth_keys_* structures are defined + * to avoid yet another circular include hell (random.h * ends up + * including asm/smp.h, which requires ptrauth_keys_kernel). + */ +#include + static inline void ptrauth_keys_init(struct ptrauth_keys *keys) { if (system_supports_address_auth()) { diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c index b182442b87a3..ce2d19f895a1 100644 --- a/arch/arm64/kernel/module-plts.c +++ b/arch/arm64/kernel/module-plts.c @@ -252,6 +252,40 @@ static unsigned int count_plts(Elf64_Sym *syms, Elf64_Rela *rela, int num, return ret; } +static bool branch_rela_needs_plt(Elf64_Sym *syms, Elf64_Rela *rela, + Elf64_Word dstidx) +{ + + Elf64_Sym *s = syms + ELF64_R_SYM(rela->r_info); + + if (s->st_shndx == dstidx) + return false; + + return ELF64_R_TYPE(rela->r_info) == R_AARCH64_JUMP26 || + ELF64_R_TYPE(rela->r_info) == R_AARCH64_CALL26; +} + +/* Group branch PLT relas at the front end of the array. */ +static int partition_branch_plt_relas(Elf64_Sym *syms, Elf64_Rela *rela, + int numrels, Elf64_Word dstidx) +{ + int i = 0, j = numrels - 1; + + if (!IS_ENABLED(CONFIG_RANDOMIZE_BASE)) + return 0; + + while (i < j) { + if (branch_rela_needs_plt(syms, &rela[i], dstidx)) + i++; + else if (branch_rela_needs_plt(syms, &rela[j], dstidx)) + swap(rela[i], rela[j]); + else + j--; + } + + return i; +} + int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) { @@ -289,7 +323,7 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, for (i = 0; i < ehdr->e_shnum; i++) { Elf64_Rela *rels = (void *)ehdr + sechdrs[i].sh_offset; - int numrels = sechdrs[i].sh_size / sizeof(Elf64_Rela); + int nents, numrels = sechdrs[i].sh_size / sizeof(Elf64_Rela); Elf64_Shdr *dstsec = sechdrs + sechdrs[i].sh_info; if (sechdrs[i].sh_type != SHT_RELA) @@ -299,8 +333,14 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, if (!(dstsec->sh_flags & SHF_EXECINSTR)) continue; - /* sort by type, symbol index and addend */ - sort(rels, numrels, sizeof(Elf64_Rela), cmp_rela, NULL); + /* + * sort branch relocations requiring a PLT by type, symbol index + * and addend + */ + nents = partition_branch_plt_relas(syms, rels, numrels, + sechdrs[i].sh_info); + if (nents) + sort(rels, nents, sizeof(Elf64_Rela), cmp_rela, NULL); if (!str_has_prefix(secstrings + dstsec->sh_name, ".init")) core_plts += count_plts(syms, rels, numrels, diff --git a/block/blk-pm.c b/block/blk-pm.c index 1adc1cd748b4..b85234d758f7 100644 --- a/block/blk-pm.c +++ b/block/blk-pm.c @@ -164,9 +164,8 @@ EXPORT_SYMBOL(blk_pre_runtime_resume); * * Description: * Update the queue's runtime status according to the return value of the - * device's runtime_resume function. If it is successfully resumed, process - * the requests that are queued into the device's queue when it is resuming - * and then mark last busy and initiate autosuspend for it. + * device's runtime_resume function. If the resume was successful, call + * blk_set_runtime_active() to do the real work of restarting the queue. * * This function should be called near the end of the device's * runtime_resume callback. @@ -175,19 +174,13 @@ void blk_post_runtime_resume(struct request_queue *q, int err) { if (!q->dev) return; - - spin_lock_irq(&q->queue_lock); if (!err) { - q->rpm_status = RPM_ACTIVE; - pm_runtime_mark_last_busy(q->dev); - pm_request_autosuspend(q->dev); + blk_set_runtime_active(q); } else { + spin_lock_irq(&q->queue_lock); q->rpm_status = RPM_SUSPENDED; + spin_unlock_irq(&q->queue_lock); } - spin_unlock_irq(&q->queue_lock); - - if (!err) - blk_clear_pm_only(q); } EXPORT_SYMBOL(blk_post_runtime_resume); @@ -204,15 +197,25 @@ EXPORT_SYMBOL(blk_post_runtime_resume); * This function can be used in driver's resume hook to correct queue * runtime PM status and re-enable peeking requests from the queue. It * should be called before first request is added to the queue. + * + * This function is also called by blk_post_runtime_resume() for successful + * runtime resumes. It does everything necessary to restart the queue. */ void blk_set_runtime_active(struct request_queue *q) { - if (q->dev) { - spin_lock_irq(&q->queue_lock); - q->rpm_status = RPM_ACTIVE; - pm_runtime_mark_last_busy(q->dev); - pm_request_autosuspend(q->dev); - spin_unlock_irq(&q->queue_lock); - } + int old_status; + + if (!q->dev) + return; + + spin_lock_irq(&q->queue_lock); + old_status = q->rpm_status; + q->rpm_status = RPM_ACTIVE; + pm_runtime_mark_last_busy(q->dev); + pm_request_autosuspend(q->dev); + spin_unlock_irq(&q->queue_lock); + + if (old_status != RPM_ACTIVE) + blk_clear_pm_only(q); } EXPORT_SYMBOL(blk_set_runtime_active); diff --git a/drivers/base/base.h b/drivers/base/base.h index 2faf767d18dc..0d32544b6f91 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -142,7 +142,6 @@ extern char *make_class_name(const char *name, struct kobject *kobj); extern int devres_release_all(struct device *dev); extern void device_block_probing(void); extern void device_unblock_probing(void); -extern void driver_deferred_probe_force_trigger(void); /* /sys/devices directory */ extern struct kset *devices_kset; diff --git a/drivers/base/core.c b/drivers/base/core.c index 8e4ce59b950a..67e58a4ca3f4 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -50,6 +50,7 @@ static DEFINE_MUTEX(wfs_lock); static LIST_HEAD(deferred_sync); static unsigned int defer_sync_state_count = 1; static unsigned int defer_fw_devlink_count; +static LIST_HEAD(deferred_fw_devlink); static DEFINE_MUTEX(defer_fw_devlink_lock); #ifdef CONFIG_SRCU @@ -234,6 +235,210 @@ void device_pm_move_to_tail(struct device *dev) device_links_read_unlock(idx); } +#define to_devlink(dev) container_of((dev), struct device_link, link_dev) + +static ssize_t status_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + char *status; + + switch (to_devlink(dev)->status) { + case DL_STATE_NONE: + status = "not tracked"; break; + case DL_STATE_DORMANT: + status = "dormant"; break; + case DL_STATE_AVAILABLE: + status = "available"; break; + case DL_STATE_CONSUMER_PROBE: + status = "consumer probing"; break; + case DL_STATE_ACTIVE: + status = "active"; break; + case DL_STATE_SUPPLIER_UNBIND: + status = "supplier unbinding"; break; + default: + status = "unknown"; break; + } + return sprintf(buf, "%s\n", status); +} +static DEVICE_ATTR_RO(status); + +static ssize_t auto_remove_on_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct device_link *link = to_devlink(dev); + char *str; + + if (link->flags & DL_FLAG_AUTOREMOVE_SUPPLIER) + str = "supplier unbind"; + else if (link->flags & DL_FLAG_AUTOREMOVE_CONSUMER) + str = "consumer unbind"; + else + str = "never"; + + return sprintf(buf, "%s\n", str); +} +static DEVICE_ATTR_RO(auto_remove_on); + +static ssize_t runtime_pm_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct device_link *link = to_devlink(dev); + + return sprintf(buf, "%d\n", !!(link->flags & DL_FLAG_PM_RUNTIME)); +} +static DEVICE_ATTR_RO(runtime_pm); + +static ssize_t sync_state_only_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct device_link *link = to_devlink(dev); + + return sprintf(buf, "%d\n", !!(link->flags & DL_FLAG_SYNC_STATE_ONLY)); +} +static DEVICE_ATTR_RO(sync_state_only); + +static struct attribute *devlink_attrs[] = { + &dev_attr_status.attr, + &dev_attr_auto_remove_on.attr, + &dev_attr_runtime_pm.attr, + &dev_attr_sync_state_only.attr, + NULL, +}; +ATTRIBUTE_GROUPS(devlink); + +static void device_link_free(struct device_link *link) +{ + while (refcount_dec_not_one(&link->rpm_active)) + pm_runtime_put(link->supplier); + + put_device(link->consumer); + put_device(link->supplier); + kfree(link); +} + +#ifdef CONFIG_SRCU +static void __device_link_free_srcu(struct rcu_head *rhead) +{ + device_link_free(container_of(rhead, struct device_link, rcu_head)); +} + +static void devlink_dev_release(struct device *dev) +{ + struct device_link *link = to_devlink(dev); + + call_srcu(&device_links_srcu, &link->rcu_head, __device_link_free_srcu); +} +#else +static void devlink_dev_release(struct device *dev) +{ + device_link_free(to_devlink(dev)); +} +#endif + +static struct class devlink_class = { + .name = "devlink", + .owner = THIS_MODULE, + .dev_groups = devlink_groups, + .dev_release = devlink_dev_release, +}; + +static int devlink_add_symlinks(struct device *dev, + struct class_interface *class_intf) +{ + int ret; + size_t len; + struct device_link *link = to_devlink(dev); + struct device *sup = link->supplier; + struct device *con = link->consumer; + char *buf; + + len = max(strlen(dev_name(sup)), strlen(dev_name(con))); + len += strlen("supplier:") + 1; + buf = kzalloc(len, GFP_KERNEL); + if (!buf) + return -ENOMEM; + + ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier"); + if (ret) + goto out; + + ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer"); + if (ret) + goto err_con; + + snprintf(buf, len, "consumer:%s", dev_name(con)); + ret = sysfs_create_link(&sup->kobj, &link->link_dev.kobj, buf); + if (ret) + goto err_con_dev; + + snprintf(buf, len, "supplier:%s", dev_name(sup)); + ret = sysfs_create_link(&con->kobj, &link->link_dev.kobj, buf); + if (ret) + goto err_sup_dev; + + goto out; + +err_sup_dev: + snprintf(buf, len, "consumer:%s", dev_name(con)); + sysfs_remove_link(&sup->kobj, buf); +err_con_dev: + sysfs_remove_link(&link->link_dev.kobj, "consumer"); +err_con: + sysfs_remove_link(&link->link_dev.kobj, "supplier"); +out: + kfree(buf); + return ret; +} + +static void devlink_remove_symlinks(struct device *dev, + struct class_interface *class_intf) +{ + struct device_link *link = to_devlink(dev); + size_t len; + struct device *sup = link->supplier; + struct device *con = link->consumer; + char *buf; + + sysfs_remove_link(&link->link_dev.kobj, "consumer"); + sysfs_remove_link(&link->link_dev.kobj, "supplier"); + + len = max(strlen(dev_name(sup)), strlen(dev_name(con))); + len += strlen("supplier:") + 1; + buf = kzalloc(len, GFP_KERNEL); + if (!buf) { + WARN(1, "Unable to properly free device link symlinks!\n"); + return; + } + + snprintf(buf, len, "supplier:%s", dev_name(sup)); + sysfs_remove_link(&con->kobj, buf); + snprintf(buf, len, "consumer:%s", dev_name(con)); + sysfs_remove_link(&sup->kobj, buf); + kfree(buf); +} + +static struct class_interface devlink_class_intf = { + .class = &devlink_class, + .add_dev = devlink_add_symlinks, + .remove_dev = devlink_remove_symlinks, +}; + +static int __init devlink_class_init(void) +{ + int ret; + + ret = class_register(&devlink_class); + if (ret) + return ret; + + ret = class_interface_register(&devlink_class_intf); + if (ret) + class_unregister(&devlink_class); + + return ret; +} +postcore_initcall(devlink_class_init); + #define DL_MANAGED_LINK_FLAGS (DL_FLAG_AUTOREMOVE_CONSUMER | \ DL_FLAG_AUTOREMOVE_SUPPLIER | \ DL_FLAG_AUTOPROBE_CONSUMER | \ @@ -406,13 +611,6 @@ struct device_link *device_link_add(struct device *consumer, refcount_set(&link->rpm_active, 1); - if (flags & DL_FLAG_PM_RUNTIME) { - if (flags & DL_FLAG_RPM_ACTIVE) - refcount_inc(&link->rpm_active); - - pm_runtime_new_link(consumer); - } - get_device(supplier); link->supplier = supplier; INIT_LIST_HEAD(&link->s_node); @@ -422,6 +620,25 @@ struct device_link *device_link_add(struct device *consumer, link->flags = flags; kref_init(&link->kref); + link->link_dev.class = &devlink_class; + device_set_pm_not_required(&link->link_dev); + dev_set_name(&link->link_dev, "%s--%s", + dev_name(supplier), dev_name(consumer)); + if (device_register(&link->link_dev)) { + put_device(consumer); + put_device(supplier); + kfree(link); + link = NULL; + goto out; + } + + if (flags & DL_FLAG_PM_RUNTIME) { + if (flags & DL_FLAG_RPM_ACTIVE) + refcount_inc(&link->rpm_active); + + pm_runtime_new_link(consumer); + } + /* Determine the initial link state. */ if (flags & DL_FLAG_STATELESS) link->status = DL_STATE_NONE; @@ -537,22 +754,7 @@ static void device_link_add_missing_supplier_links(void) mutex_unlock(&wfs_lock); } -static void device_link_free(struct device_link *link) -{ - while (refcount_dec_not_one(&link->rpm_active)) - pm_runtime_put(link->supplier); - - put_device(link->consumer); - put_device(link->supplier); - kfree(link); -} - #ifdef CONFIG_SRCU -static void __device_link_free_srcu(struct rcu_head *rhead) -{ - device_link_free(container_of(rhead, struct device_link, rcu_head)); -} - static void __device_link_del(struct kref *kref) { struct device_link *link = container_of(kref, struct device_link, kref); @@ -565,7 +767,7 @@ static void __device_link_del(struct kref *kref) list_del_rcu(&link->s_node); list_del_rcu(&link->c_node); - call_srcu(&device_links_srcu, &link->rcu_head, __device_link_free_srcu); + device_unregister(&link->link_dev); } #else /* !CONFIG_SRCU */ static void __device_link_del(struct kref *kref) @@ -580,7 +782,7 @@ static void __device_link_del(struct kref *kref) list_del(&link->s_node); list_del(&link->c_node); - device_link_free(link); + device_unregister(&link->link_dev); } #endif /* !CONFIG_SRCU */ @@ -753,11 +955,11 @@ static void __device_links_queue_sync_state(struct device *dev, */ dev->state_synced = true; - if (WARN_ON(!list_empty(&dev->links.defer_sync))) + if (WARN_ON(!list_empty(&dev->links.defer_hook))) return; get_device(dev); - list_add_tail(&dev->links.defer_sync, list); + list_add_tail(&dev->links.defer_hook, list); } /** @@ -775,8 +977,8 @@ static void device_links_flush_sync_list(struct list_head *list, { struct device *dev, *tmp; - list_for_each_entry_safe(dev, tmp, list, links.defer_sync) { - list_del_init(&dev->links.defer_sync); + list_for_each_entry_safe(dev, tmp, list, links.defer_hook) { + list_del_init(&dev->links.defer_hook); if (dev != dont_lock_dev) device_lock(dev); @@ -814,12 +1016,12 @@ void device_links_supplier_sync_state_resume(void) if (defer_sync_state_count) goto out; - list_for_each_entry_safe(dev, tmp, &deferred_sync, links.defer_sync) { + list_for_each_entry_safe(dev, tmp, &deferred_sync, links.defer_hook) { /* * Delete from deferred_sync list before queuing it to - * sync_list because defer_sync is used for both lists. + * sync_list because defer_hook is used for both lists. */ - list_del_init(&dev->links.defer_sync); + list_del_init(&dev->links.defer_hook); __device_links_queue_sync_state(dev, &sync_list); } out: @@ -837,8 +1039,8 @@ late_initcall(sync_state_resume_initcall); static void __device_links_supplier_defer_sync(struct device *sup) { - if (list_empty(&sup->links.defer_sync) && dev_has_sync_state(sup)) - list_add_tail(&sup->links.defer_sync, &deferred_sync); + if (list_empty(&sup->links.defer_hook) && dev_has_sync_state(sup)) + list_add_tail(&sup->links.defer_hook, &deferred_sync); } static void device_link_drop_managed(struct device_link *link) @@ -848,6 +1050,22 @@ static void device_link_drop_managed(struct device_link *link) kref_put(&link->kref, __device_link_del); } +static ssize_t waiting_for_supplier_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + bool val; + + device_lock(dev); + mutex_lock(&wfs_lock); + val = !list_empty(&dev->links.needs_suppliers) + && dev->links.need_for_probe; + mutex_unlock(&wfs_lock); + device_unlock(dev); + return sprintf(buf, "%u\n", val); +} +static DEVICE_ATTR_RO(waiting_for_supplier); + /** * device_links_driver_bound - Update device links after probing its driver. * @dev: Device to update the links for. @@ -872,6 +1090,7 @@ void device_links_driver_bound(struct device *dev) mutex_lock(&wfs_lock); list_del_init(&dev->links.needs_suppliers); mutex_unlock(&wfs_lock); + device_remove_file(dev, &dev_attr_waiting_for_supplier); device_links_write_lock(); @@ -1051,7 +1270,7 @@ void device_links_driver_cleanup(struct device *dev) WRITE_ONCE(link->status, DL_STATE_DORMANT); } - list_del_init(&dev->links.defer_sync); + list_del_init(&dev->links.defer_hook); __device_links_no_driver(dev); device_links_write_unlock(); @@ -1158,6 +1377,9 @@ static void device_links_purge(struct device *dev) { struct device_link *link, *ln; + if (dev->class == &devlink_class) + return; + mutex_lock(&wfs_lock); list_del(&dev->links.needs_suppliers); mutex_unlock(&wfs_lock); @@ -1208,6 +1430,12 @@ static void fw_devlink_link_device(struct device *dev) fw_ret = fwnode_call_int_op(dev->fwnode, add_links, dev); } else { fw_ret = -ENODEV; + /* + * defer_hook is not used to add device to deferred_sync list + * until device is bound. Since deferred fw devlink also blocks + * probing, same list hook can be used for deferred_fw_devlink. + */ + list_add_tail(&dev->links.defer_hook, &deferred_fw_devlink); } if (fw_ret == -ENODEV) @@ -1276,6 +1504,9 @@ void fw_devlink_pause(void) */ void fw_devlink_resume(void) { + struct device *dev, *tmp; + LIST_HEAD(probe_list); + mutex_lock(&defer_fw_devlink_lock); if (!defer_fw_devlink_count) { WARN(true, "Unmatched fw_devlink pause/resume!"); @@ -1287,9 +1518,19 @@ void fw_devlink_resume(void) goto out; device_link_add_missing_supplier_links(); - driver_deferred_probe_force_trigger(); + list_splice_tail_init(&deferred_fw_devlink, &probe_list); out: mutex_unlock(&defer_fw_devlink_lock); + + /* + * bus_probe_device() can cause new devices to get added and they'll + * try to grab defer_fw_devlink_lock. So, this needs to be done outside + * the defer_fw_devlink_lock. + */ + list_for_each_entry_safe(dev, tmp, &probe_list, links.defer_hook) { + list_del_init(&dev->links.defer_hook); + bus_probe_device(dev); + } } /* Device links support end. */ @@ -1925,8 +2166,14 @@ static int device_add_attrs(struct device *dev) goto err_remove_dev_groups; } + error = device_create_file(dev, &dev_attr_waiting_for_supplier); + if (error) + goto err_remove_dev_online; + return 0; + err_remove_dev_online: + device_remove_file(dev, &dev_attr_online); err_remove_dev_groups: device_remove_groups(dev, dev->groups); err_remove_type_groups: @@ -1944,6 +2191,7 @@ static void device_remove_attrs(struct device *dev) struct class *class = dev->class; const struct device_type *type = dev->type; + device_remove_file(dev, &dev_attr_waiting_for_supplier); device_remove_file(dev, &dev_attr_online); device_remove_groups(dev, dev->groups); @@ -2148,7 +2396,7 @@ void device_initialize(struct device *dev) INIT_LIST_HEAD(&dev->links.consumers); INIT_LIST_HEAD(&dev->links.suppliers); INIT_LIST_HEAD(&dev->links.needs_suppliers); - INIT_LIST_HEAD(&dev->links.defer_sync); + INIT_LIST_HEAD(&dev->links.defer_hook); dev->links.status = DL_DEV_NO_DRIVER; } EXPORT_SYMBOL_GPL(device_initialize); diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 802f03eb3c37..6b69abab08f8 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -164,11 +164,6 @@ static void driver_deferred_probe_trigger(void) if (!driver_deferred_probe_enable) return; - driver_deferred_probe_force_trigger(); -} - -void driver_deferred_probe_force_trigger(void) -{ /* * A successful probe means that all the devices in the pending list * should be triggered to be reprobed. Move all the deferred devices @@ -494,6 +489,18 @@ static void driver_deferred_probe_add_trigger(struct device *dev, driver_deferred_probe_trigger(); } +static ssize_t state_synced_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + bool val; + + device_lock(dev); + val = dev->state_synced; + device_unlock(dev); + return sprintf(buf, "%u\n", val); +} +static DEVICE_ATTR_RO(state_synced); + static int really_probe(struct device *dev, struct device_driver *drv) { int ret = -EPROBE_DEFER; @@ -567,9 +574,16 @@ re_probe: goto dev_groups_failed; } + if (dev_has_sync_state(dev) && + device_create_file(dev, &dev_attr_state_synced)) { + dev_err(dev, "state_synced sysfs add failed\n"); + goto dev_sysfs_state_synced_failed; + } + if (test_remove) { test_remove = false; + device_remove_file(dev, &dev_attr_state_synced); device_remove_groups(dev, drv->dev_groups); if (dev->bus->remove) @@ -599,6 +613,8 @@ re_probe: drv->bus->name, __func__, dev_name(dev), drv->name); goto done; +dev_sysfs_state_synced_failed: + device_remove_groups(dev, drv->dev_groups); dev_groups_failed: if (dev->bus->remove) dev->bus->remove(dev); @@ -1134,6 +1150,7 @@ static void __device_release_driver(struct device *dev, struct device *parent) pm_runtime_put_sync(dev); + device_remove_file(dev, &dev_attr_state_synced); device_remove_groups(dev, drv->dev_groups); if (dev->bus && dev->bus->remove) diff --git a/drivers/char/random.c b/drivers/char/random.c index 40b1c7cffdf6..249d9100ac3c 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1249,6 +1249,7 @@ void add_interrupt_randomness(int irq, int irq_flags) fast_mix(fast_pool); add_interrupt_bench(cycles); + this_cpu_add(net_rand_state.s1, fast_pool->pool[cycles & 3]); if (unlikely(crng_init == 0)) { if ((fast_pool->count >= 64) && diff --git a/drivers/of/property.c b/drivers/of/property.c index 933294195ec3..277d2d854ad5 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1192,6 +1192,21 @@ DEFINE_SIMPLE_PROP(interrupt_parent, "interrupt-parent", NULL) DEFINE_SIMPLE_PROP(dmas, "dmas", "#dma-cells") DEFINE_SIMPLE_PROP(power_domains, "power-domains", "#power-domain-cells") DEFINE_SIMPLE_PROP(hwlocks, "hwlocks", "#hwlock-cells") +DEFINE_SIMPLE_PROP(extcon, "extcon", NULL) +DEFINE_SIMPLE_PROP(interrupts_extended, "interrupts-extended", + "#interrupt-cells") +DEFINE_SIMPLE_PROP(nvmem_cells, "nvmem-cells", NULL) +DEFINE_SIMPLE_PROP(phys, "phys", "#phy-cells") +DEFINE_SIMPLE_PROP(wakeup_parent, "wakeup-parent", NULL) +DEFINE_SIMPLE_PROP(pinctrl0, "pinctrl-0", NULL) +DEFINE_SIMPLE_PROP(pinctrl1, "pinctrl-1", NULL) +DEFINE_SIMPLE_PROP(pinctrl2, "pinctrl-2", NULL) +DEFINE_SIMPLE_PROP(pinctrl3, "pinctrl-3", NULL) +DEFINE_SIMPLE_PROP(pinctrl4, "pinctrl-4", NULL) +DEFINE_SIMPLE_PROP(pinctrl5, "pinctrl-5", NULL) +DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL) +DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL) +DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL) DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells") @@ -1216,6 +1231,20 @@ static const struct supplier_bindings of_supplier_bindings[] = { { .parse_prop = parse_dmas, }, { .parse_prop = parse_power_domains, }, { .parse_prop = parse_hwlocks, }, + { .parse_prop = parse_extcon, }, + { .parse_prop = parse_interrupts_extended, }, + { .parse_prop = parse_nvmem_cells, }, + { .parse_prop = parse_phys, }, + { .parse_prop = parse_wakeup_parent, }, + { .parse_prop = parse_pinctrl0, }, + { .parse_prop = parse_pinctrl1, }, + { .parse_prop = parse_pinctrl2, }, + { .parse_prop = parse_pinctrl3, }, + { .parse_prop = parse_pinctrl4, }, + { .parse_prop = parse_pinctrl5, }, + { .parse_prop = parse_pinctrl6, }, + { .parse_prop = parse_pinctrl7, }, + { .parse_prop = parse_pinctrl8, }, { .parse_prop = parse_regulators, }, { .parse_prop = parse_gpio, }, { .parse_prop = parse_gpios, }, diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c index 5f0ad8b32e3a..3717eea37ecb 100644 --- a/drivers/scsi/scsi_pm.c +++ b/drivers/scsi/scsi_pm.c @@ -80,10 +80,6 @@ static int scsi_dev_type_resume(struct device *dev, dev_dbg(dev, "scsi resume: %d\n", err); if (err == 0) { - bool was_runtime_suspended; - - was_runtime_suspended = pm_runtime_suspended(dev); - pm_runtime_disable(dev); err = pm_runtime_set_active(dev); pm_runtime_enable(dev); @@ -97,10 +93,8 @@ static int scsi_dev_type_resume(struct device *dev, */ if (!err && scsi_is_sdev_device(dev)) { struct scsi_device *sdev = to_scsi_device(dev); - if (was_runtime_suspended) - blk_post_runtime_resume(sdev->request_queue, 0); - else - blk_set_runtime_active(sdev->request_queue); + + blk_set_runtime_active(sdev->request_queue); } } diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 74481d0538d9..6ef1c64fe38f 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3860,6 +3860,11 @@ static ssize_t ext4_direct_IO_read(struct kiocb *iocb, struct iov_iter *iter) struct inode *inode = mapping->host; size_t count = iov_iter_count(iter); ssize_t ret; + loff_t offset = iocb->ki_pos; + loff_t size = i_size_read(inode); + + if (offset >= size) + return 0; /* * Shared inode_lock is enough for us - it protects against concurrent diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 3bf3835d0e86..7aa0d8b5aaf0 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -956,11 +956,14 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map) #endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */ #if defined(CONFIG_BPF_STREAM_PARSER) -int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog, u32 which); +int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog, + struct bpf_prog *old, u32 which); int sock_map_get_from_fd(const union bpf_attr *attr, struct bpf_prog *prog); +int sock_map_prog_detach(const union bpf_attr *attr, enum bpf_prog_type ptype); #else static inline int sock_map_prog_update(struct bpf_map *map, - struct bpf_prog *prog, u32 which) + struct bpf_prog *prog, + struct bpf_prog *old, u32 which) { return -EOPNOTSUPP; } @@ -970,6 +973,12 @@ static inline int sock_map_get_from_fd(const union bpf_attr *attr, { return -EINVAL; } + +static inline int sock_map_prog_detach(const union bpf_attr *attr, + enum bpf_prog_type ptype) +{ + return -EOPNOTSUPP; +} #endif #if defined(CONFIG_XDP_SOCKETS) diff --git a/include/linux/device.h b/include/linux/device.h index e75a6a4c7e81..914d8137903e 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1123,34 +1123,6 @@ enum device_link_state { #define DL_FLAG_MANAGED BIT(6) #define DL_FLAG_SYNC_STATE_ONLY BIT(7) -/** - * struct device_link - Device link representation. - * @supplier: The device on the supplier end of the link. - * @s_node: Hook to the supplier device's list of links to consumers. - * @consumer: The device on the consumer end of the link. - * @c_node: Hook to the consumer device's list of links to suppliers. - * @status: The state of the link (with respect to the presence of drivers). - * @flags: Link flags. - * @rpm_active: Whether or not the consumer device is runtime-PM-active. - * @kref: Count repeated addition of the same link. - * @rcu_head: An RCU head to use for deferred execution of SRCU callbacks. - * @supplier_preactivated: Supplier has been made active before consumer probe. - */ -struct device_link { - struct device *supplier; - struct list_head s_node; - struct device *consumer; - struct list_head c_node; - enum device_link_state status; - u32 flags; - refcount_t rpm_active; - struct kref kref; -#ifdef CONFIG_SRCU - struct rcu_head rcu_head; -#endif - bool supplier_preactivated; /* Owned by consumer probe. */ -}; - /** * enum dl_dev_state - Device driver presence tracking information. * @DL_DEV_NO_DRIVER: There is no driver attached to the device. @@ -1170,7 +1142,8 @@ enum dl_dev_state { * @suppliers: List of links to supplier devices. * @consumers: List of links to consumer devices. * @needs_suppliers: Hook to global list of devices waiting for suppliers. - * @defer_sync: Hook to global list of devices that have deferred sync_state. + * @defer_hook: Hook to global list of devices that have deferred sync_state or + * deferred fw_devlink. * @need_for_probe: If needs_suppliers is on a list, this indicates if the * suppliers are needed for probe or not. * @status: Driver status information. @@ -1179,7 +1152,7 @@ struct dev_links_info { struct list_head suppliers; struct list_head consumers; struct list_head needs_suppliers; - struct list_head defer_sync; + struct list_head defer_hook; bool need_for_probe; enum dl_dev_state status; }; @@ -1377,6 +1350,36 @@ struct device { ANDROID_KABI_RESERVE(8); }; +/** + * struct device_link - Device link representation. + * @supplier: The device on the supplier end of the link. + * @s_node: Hook to the supplier device's list of links to consumers. + * @consumer: The device on the consumer end of the link. + * @c_node: Hook to the consumer device's list of links to suppliers. + * @link_dev: device used to expose link details in sysfs + * @status: The state of the link (with respect to the presence of drivers). + * @flags: Link flags. + * @rpm_active: Whether or not the consumer device is runtime-PM-active. + * @kref: Count repeated addition of the same link. + * @rcu_head: An RCU head to use for deferred execution of SRCU callbacks. + * @supplier_preactivated: Supplier has been made active before consumer probe. + */ +struct device_link { + struct device *supplier; + struct list_head s_node; + struct device *consumer; + struct list_head c_node; + struct device link_dev; + enum device_link_state status; + u32 flags; + refcount_t rpm_active; + struct kref kref; +#ifdef CONFIG_SRCU + struct rcu_head rcu_head; +#endif + bool supplier_preactivated; /* Owned by consumer probe. */ +}; + static inline struct device *kobj_to_dev(struct kobject *kobj) { return container_of(kobj, struct device, kobj); diff --git a/include/linux/prandom.h b/include/linux/prandom.h new file mode 100644 index 000000000000..aa16e6468f91 --- /dev/null +++ b/include/linux/prandom.h @@ -0,0 +1,78 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * include/linux/prandom.h + * + * Include file for the fast pseudo-random 32-bit + * generation. + */ +#ifndef _LINUX_PRANDOM_H +#define _LINUX_PRANDOM_H + +#include +#include + +u32 prandom_u32(void); +void prandom_bytes(void *buf, size_t nbytes); +void prandom_seed(u32 seed); +void prandom_reseed_late(void); + +struct rnd_state { + __u32 s1, s2, s3, s4; +}; + +DECLARE_PER_CPU(struct rnd_state, net_rand_state); + +u32 prandom_u32_state(struct rnd_state *state); +void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes); +void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state); + +#define prandom_init_once(pcpu_state) \ + DO_ONCE(prandom_seed_full_state, (pcpu_state)) + +/** + * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro) + * @ep_ro: right open interval endpoint + * + * Returns a pseudo-random number that is in interval [0, ep_ro). Note + * that the result depends on PRNG being well distributed in [0, ~0U] + * u32 space. Here we use maximally equidistributed combined Tausworthe + * generator, that is, prandom_u32(). This is useful when requesting a + * random index of an array containing ep_ro elements, for example. + * + * Returns: pseudo-random number in interval [0, ep_ro) + */ +static inline u32 prandom_u32_max(u32 ep_ro) +{ + return (u32)(((u64) prandom_u32() * ep_ro) >> 32); +} + +/* + * Handle minimum values for seeds + */ +static inline u32 __seed(u32 x, u32 m) +{ + return (x < m) ? x + m : x; +} + +/** + * prandom_seed_state - set seed for prandom_u32_state(). + * @state: pointer to state structure to receive the seed. + * @seed: arbitrary 64-bit value to use as a seed. + */ +static inline void prandom_seed_state(struct rnd_state *state, u64 seed) +{ + u32 i = (seed >> 32) ^ (seed << 10) ^ seed; + + state->s1 = __seed(i, 2U); + state->s2 = __seed(i, 8U); + state->s3 = __seed(i, 16U); + state->s4 = __seed(i, 128U); +} + +/* Pseudo random number generator from numerical recipes. */ +static inline u32 next_pseudo_random32(u32 seed) +{ + return seed * 1664525 + 1013904223; +} + +#endif diff --git a/include/linux/random.h b/include/linux/random.h index d319f9a1e429..0efabaaf1eb6 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -108,61 +108,12 @@ declare_get_random_var_wait(long) unsigned long randomize_page(unsigned long start, unsigned long range); -u32 prandom_u32(void); -void prandom_bytes(void *buf, size_t nbytes); -void prandom_seed(u32 seed); -void prandom_reseed_late(void); - -struct rnd_state { - __u32 s1, s2, s3, s4; -}; - -u32 prandom_u32_state(struct rnd_state *state); -void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes); -void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state); - -#define prandom_init_once(pcpu_state) \ - DO_ONCE(prandom_seed_full_state, (pcpu_state)) - -/** - * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro) - * @ep_ro: right open interval endpoint - * - * Returns a pseudo-random number that is in interval [0, ep_ro). Note - * that the result depends on PRNG being well distributed in [0, ~0U] - * u32 space. Here we use maximally equidistributed combined Tausworthe - * generator, that is, prandom_u32(). This is useful when requesting a - * random index of an array containing ep_ro elements, for example. - * - * Returns: pseudo-random number in interval [0, ep_ro) - */ -static inline u32 prandom_u32_max(u32 ep_ro) -{ - return (u32)(((u64) prandom_u32() * ep_ro) >> 32); -} - /* - * Handle minimum values for seeds + * This is designed to be standalone for just prandom + * users, but for now we include it from + * for legacy reasons. */ -static inline u32 __seed(u32 x, u32 m) -{ - return (x < m) ? x + m : x; -} - -/** - * prandom_seed_state - set seed for prandom_u32_state(). - * @state: pointer to state structure to receive the seed. - * @seed: arbitrary 64-bit value to use as a seed. - */ -static inline void prandom_seed_state(struct rnd_state *state, u64 seed) -{ - u32 i = (seed >> 32) ^ (seed << 10) ^ seed; - - state->s1 = __seed(i, 2U); - state->s2 = __seed(i, 8U); - state->s3 = __seed(i, 16U); - state->s4 = __seed(i, 128U); -} +#include #ifdef CONFIG_ARCH_RANDOM # include @@ -185,10 +136,4 @@ static inline bool __must_check arch_get_random_seed_int(unsigned int *v) } #endif -/* Pseudo random number generator from numerical recipes. */ -static inline u32 next_pseudo_random32(u32 seed) -{ - return seed * 1664525 + 1013904223; -} - #endif /* _LINUX_RANDOM_H */ diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index 4bdb5e4bbd6a..20f3550b0b11 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -450,6 +450,19 @@ static inline void psock_set_prog(struct bpf_prog **pprog, bpf_prog_put(prog); } +static inline int psock_replace_prog(struct bpf_prog **pprog, + struct bpf_prog *prog, + struct bpf_prog *old) +{ + if (cmpxchg(pprog, old, prog) != old) + return -ENOENT; + + if (old) + bpf_prog_put(old); + + return 0; +} + static inline void psock_progs_drop(struct sk_psock_progs *progs) { psock_set_prog(&progs->msg_parser, NULL); diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 8bc904f9badb..bf03d04a9e2f 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -2029,10 +2029,10 @@ static int bpf_prog_detach(const union bpf_attr *attr) ptype = BPF_PROG_TYPE_CGROUP_DEVICE; break; case BPF_SK_MSG_VERDICT: - return sock_map_get_from_fd(attr, NULL); + return sock_map_prog_detach(attr, BPF_PROG_TYPE_SK_MSG); case BPF_SK_SKB_STREAM_PARSER: case BPF_SK_SKB_STREAM_VERDICT: - return sock_map_get_from_fd(attr, NULL); + return sock_map_prog_detach(attr, BPF_PROG_TYPE_SK_SKB); case BPF_LIRC_MODE2: return lirc_prog_detach(attr); case BPF_FLOW_DISSECTOR: diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 57722f670bf0..e02ac3cbeb55 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -1775,6 +1776,13 @@ void update_process_times(int user_tick) scheduler_tick(); if (IS_ENABLED(CONFIG_POSIX_TIMERS)) run_posix_cpu_timers(); + + /* The current CPU might make use of net randoms without receiving IRQs + * to renew them often enough. Let's update the net_rand_state from a + * non-constant value that's not affine to the number of calls to make + * sure it's updated when there's some activity (we don't care in idle). + */ + this_cpu_add(net_rand_state.s1, rol32(jiffies, 24) + user_tick); } /** diff --git a/lib/random32.c b/lib/random32.c index 763b920a6206..3d749abb9e80 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -48,7 +48,7 @@ static inline void prandom_state_selftest(void) } #endif -static DEFINE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy; +DEFINE_PER_CPU(struct rnd_state, net_rand_state); /** * prandom_u32_state - seeded pseudo-random number generator. diff --git a/net/core/sock_map.c b/net/core/sock_map.c index 6bbc118bf00e..df52061f99f7 100644 --- a/net/core/sock_map.c +++ b/net/core/sock_map.c @@ -71,7 +71,42 @@ int sock_map_get_from_fd(const union bpf_attr *attr, struct bpf_prog *prog) map = __bpf_map_get(f); if (IS_ERR(map)) return PTR_ERR(map); - ret = sock_map_prog_update(map, prog, attr->attach_type); + ret = sock_map_prog_update(map, prog, NULL, attr->attach_type); + fdput(f); + return ret; +} + +int sock_map_prog_detach(const union bpf_attr *attr, enum bpf_prog_type ptype) +{ + u32 ufd = attr->target_fd; + struct bpf_prog *prog; + struct bpf_map *map; + struct fd f; + int ret; + + if (attr->attach_flags) + return -EINVAL; + + f = fdget(ufd); + map = __bpf_map_get(f); + if (IS_ERR(map)) + return PTR_ERR(map); + + prog = bpf_prog_get(attr->attach_bpf_fd); + if (IS_ERR(prog)) { + ret = PTR_ERR(prog); + goto put_map; + } + + if (prog->type != ptype) { + ret = -EINVAL; + goto put_prog; + } + + ret = sock_map_prog_update(map, NULL, prog, attr->attach_type); +put_prog: + bpf_prog_put(prog); +put_map: fdput(f); return ret; } @@ -1015,27 +1050,32 @@ static struct sk_psock_progs *sock_map_progs(struct bpf_map *map) } int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog, - u32 which) + struct bpf_prog *old, u32 which) { struct sk_psock_progs *progs = sock_map_progs(map); + struct bpf_prog **pprog; if (!progs) return -EOPNOTSUPP; switch (which) { case BPF_SK_MSG_VERDICT: - psock_set_prog(&progs->msg_parser, prog); + pprog = &progs->msg_parser; break; case BPF_SK_SKB_STREAM_PARSER: - psock_set_prog(&progs->skb_parser, prog); + pprog = &progs->skb_parser; break; case BPF_SK_SKB_STREAM_VERDICT: - psock_set_prog(&progs->skb_verdict, prog); + pprog = &progs->skb_verdict; break; default: return -EOPNOTSUPP; } + if (old) + return psock_replace_prog(pprog, prog, old); + + psock_set_prog(pprog, prog); return 0; } diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c index e1f1becda529..c812f0178b64 100644 --- a/tools/testing/selftests/bpf/test_maps.c +++ b/tools/testing/selftests/bpf/test_maps.c @@ -793,19 +793,19 @@ static void test_sockmap(unsigned int tasks, void *data) } err = bpf_prog_detach(fd, BPF_SK_SKB_STREAM_PARSER); - if (err) { + if (!err) { printf("Failed empty parser prog detach\n"); goto out_sockmap; } err = bpf_prog_detach(fd, BPF_SK_SKB_STREAM_VERDICT); - if (err) { + if (!err) { printf("Failed empty verdict prog detach\n"); goto out_sockmap; } err = bpf_prog_detach(fd, BPF_SK_MSG_VERDICT); - if (err) { + if (!err) { printf("Failed empty msg verdict prog detach\n"); goto out_sockmap; } @@ -1094,19 +1094,19 @@ static void test_sockmap(unsigned int tasks, void *data) assert(status == 0); } - err = bpf_prog_detach(map_fd_rx, __MAX_BPF_ATTACH_TYPE); + err = bpf_prog_detach2(parse_prog, map_fd_rx, __MAX_BPF_ATTACH_TYPE); if (!err) { printf("Detached an invalid prog type.\n"); goto out_sockmap; } - err = bpf_prog_detach(map_fd_rx, BPF_SK_SKB_STREAM_PARSER); + err = bpf_prog_detach2(parse_prog, map_fd_rx, BPF_SK_SKB_STREAM_PARSER); if (err) { printf("Failed parser prog detach\n"); goto out_sockmap; } - err = bpf_prog_detach(map_fd_rx, BPF_SK_SKB_STREAM_VERDICT); + err = bpf_prog_detach2(verdict_prog, map_fd_rx, BPF_SK_SKB_STREAM_VERDICT); if (err) { printf("Failed parser prog detach\n"); goto out_sockmap;