Commit Graph

976335 Commits

Author SHA1 Message Date
Badhri Jagan Sridharan
b248dd37db FROMGIT: usb: typec: tcpm: Honour pSnkStdby requirement during negotiation
>From PD Spec:
The Sink Shall transition to Sink Standby before a positive or
negative voltage transition of VBUS. During Sink Standby
the Sink Shall reduce its power draw to pSnkStdby. This allows
the Source to manage the voltage transition as well as
supply sufficient operating current to the Sink to maintain PD
operation during the transition. The Sink Shall
complete this transition to Sink Standby within tSnkStdby
after evaluating the Accept Message from the Source. The
transition when returning to Sink operation from Sink Standby
Shall be completed within tSnkNewPower. The
pSnkStdby requirement Shall only apply if the Sink power draw
is higher than this level.

The above requirement needs to be met to prevent hard resets
from port partner.

Without the patch: (5V/3A during SNK_DISCOVERY all the way through
explicit contract)
[   95.711984] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected]
[   95.712007] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[   95.712017] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
[   95.837190] VBUS on
[   95.882075] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms]
[   95.882082] state change SNK_DEBOUNCED -> SNK_ATTACHED [rev3 NONE_AMS]
[   95.882086] polarity 1
[   95.883151] set_auto_vbus_discharge_threshold mode:0 pps_active:n vbus:5000 ret:0
[   95.883441] enable vbus discharge ret:0
[   95.883445] Requesting mux state 1, usb-role 2, orientation 2
[   95.883776] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS]
[   95.883879] pending state change SNK_STARTUP -> SNK_DISCOVERY @ 500 ms [rev3 NONE_AMS]
[   96.038960] VBUS on
[   96.383939] state change SNK_STARTUP -> SNK_DISCOVERY [delayed 500 ms]
[   96.383946] Setting voltage/current limit 5000 mV 3000 mA
[   96.383961] vbus=0 charge:=1
[   96.386044] state change SNK_DISCOVERY -> SNK_WAIT_CAPABILITIES [rev3 NONE_AMS]
[   96.386309] pending state change SNK_WAIT_CAPABILITIES -> HARD_RESET_SEND @ 450 ms [rev3 NONE_AMS]
[   96.394404] PD RX, header: 0x2161 [1]
[   96.394408]  PDO 0: type 0, 5000 mV, 3000 mA [E]
[   96.394410]  PDO 1: type 0, 9000 mV, 2000 mA []
[   96.394412] state change SNK_WAIT_CAPABILITIES -> SNK_NEGOTIATE_CAPABILITIES [rev2 POWER_NEGOTIATION]
[   96.394416] Setting usb_comm capable false
[   96.395083] cc=0 cc1=0 cc2=5 vbus=0 vconn=sink polarity=1
[   96.395089] Requesting PDO 1: 9000 mV, 2000 mA
[   96.395093] PD TX, header: 0x1042
[   96.397404] PD TX complete, status: 0
[   96.397424] pending state change SNK_NEGOTIATE_CAPABILITIES -> HARD_RESET_SEND @ 60 ms [rev2 POWER_NEGOTIATION]
[   96.400826] PD RX, header: 0x363 [1]
[   96.400829] state change SNK_NEGOTIATE_CAPABILITIES -> SNK_TRANSITION_SINK [rev2 POWER_NEGOTIATION]
[   96.400832] pending state change SNK_TRANSITION_SINK -> HARD_RESET_SEND @ 500 ms [rev2 POWER_NEGOTIATION]
[   96.577315] PD RX, header: 0x566 [1]
[   96.577321] Setting voltage/current limit 9000 mV 2000 mA
[   96.578363] set_auto_vbus_discharge_threshold mode:3 pps_active:n vbus:9000 ret:0
[   96.578370] state change SNK_TRANSITION_SINK -> SNK_READY [rev2 POWER_NEGOTIATION]

With the patch:
[  168.398573] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected]
[  168.398605] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[  168.398619] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
[  168.522348] VBUS on
[  168.568676] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms]
[  168.568684] state change SNK_DEBOUNCED -> SNK_ATTACHED [rev3 NONE_AMS]
[  168.568688] polarity 1
[  168.569867] set_auto_vbus_discharge_threshold mode:0 pps_active:n vbus:5000 ret:0
[  168.570158] enable vbus discharge ret:0
[  168.570161] Requesting mux state 1, usb-role 2, orientation 2
[  168.570504] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS]
[  168.570634] pending state change SNK_STARTUP -> SNK_DISCOVERY @ 500 ms [rev3 NONE_AMS]
[  169.070689] state change SNK_STARTUP -> SNK_DISCOVERY [delayed 500 ms]
[  169.070695] Setting voltage/current limit 5000 mV 3000 mA
[  169.070702] vbus=0 charge:=1
[  169.072719] state change SNK_DISCOVERY -> SNK_WAIT_CAPABILITIES [rev3 NONE_AMS]
[  169.073145] pending state change SNK_WAIT_CAPABILITIES -> HARD_RESET_SEND @ 450 ms [rev3 NONE_AMS]
[  169.077162] PD RX, header: 0x2161 [1]
[  169.077172]  PDO 0: type 0, 5000 mV, 3000 mA [E]
[  169.077178]  PDO 1: type 0, 9000 mV, 2000 mA []
[  169.077183] state change SNK_WAIT_CAPABILITIES -> SNK_NEGOTIATE_CAPABILITIES [rev2 POWER_NEGOTIATION]
[  169.077191] Setting usb_comm capable false
[  169.077753] cc=0 cc1=0 cc2=5 vbus=0 vconn=sink polarity=1
[  169.077759] Requesting PDO 1: 9000 mV, 2000 mA
[  169.077762] PD TX, header: 0x1042
[  169.079990] PD TX complete, status: 0
[  169.080013] pending state change SNK_NEGOTIATE_CAPABILITIES -> HARD_RESET_SEND @ 60 ms [rev2 POWER_NEGOTIATION]
[  169.083183] VBUS on
[  169.084195] PD RX, header: 0x363 [1]
[  169.084200] state change SNK_NEGOTIATE_CAPABILITIES -> SNK_TRANSITION_SINK [rev2 POWER_NEGOTIATION]
[  169.084206] Setting standby current 5000 mV @ 500 mA
[  169.084209] Setting voltage/current limit 5000 mV 500 mA
[  169.084220] pending state change SNK_TRANSITION_SINK -> HARD_RESET_SEND @ 500 ms [rev2 POWER_NEGOTIATION]
[  169.260222] PD RX, header: 0x566 [1]
[  169.260227] Setting voltage/current limit 9000 mV 2000 mA
[  169.261315] set_auto_vbus_discharge_threshold mode:3 pps_active:n vbus:9000 ret:0
[  169.261321] state change SNK_TRANSITION_SINK -> SNK_READY [rev2 POWER_NEGOTIATION]
[  169.261570] AMS POWER_NEGOTIATION finished

Fixes: f0690a25a1 ("staging: typec: USB Type-C Port Manager (tcpm)")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20210414024000.4175263-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1230868433
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I54edfc601d28c8b67b4cdb7b8cb313dbd239021a
2021-04-15 06:43:10 +00:00
Jaegeuk Kim
eed5187d41 FROMGIT: dm verity fec: fix misaligned RS roots IO
commit df7b59ba92 ("dm verity: fix FEC for RS roots unaligned to
block size") introduced the possibility for misaligned roots IO
relative to the underlying device's logical block size. E.g. Android's
default RS roots=2 results in dm_bufio->block_size=1024, which causes
the following EIO if the logical block size of the device is 4096,
given v->data_dev_block_bits=12:

E sd 0    : 0:0:0: [sda] tag#30 request not aligned to the logical block size
E blk_update_request: I/O error, dev sda, sector 10368424 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
E device-mapper: verity-fec: 254:8: FEC 9244672: parity read failed (block 18056): -5

Fix this by onlu using f->roots for dm_bufio blocksize IFF it is
aligned to v->data_dev_block_bits.

Bug: 184927119
Fixes: df7b59ba92 ("dm verity: fix FEC for RS roots unaligned to block size")
Cc: stable@vger.kernel.org
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
(cherry picked from commit 8ca7cab82b
     https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git dm-5.12)
Change-Id: I98f98e398a303b05ac93435ae244f4e6fd7a38b9
2021-04-14 21:51:07 +00:00
Jaegeuk Kim
5ef36bda8f Revert "Revert "dm verity: fix FEC for RS roots unaligned to blo..."
Revert submission 1672946

Reason for revert: getting back to mainline with a proper fix
Reverted Changes:
I96ee9a0a8:Revert "dm bufio: subtract the number of initial s...
I23d4da47b:Revert "dm verity: fix FEC for RS roots unaligned ...

Change-Id: I976307e4f85fc6e13286f4305ef0eb945d9467ce
2021-04-14 21:50:48 +00:00
Jaegeuk Kim
fc503912fd Revert "Revert "dm bufio: subtract the number of initial sectors..."
Revert submission 1672946

Reason for revert: getting back to mainline with a proper fix
Reverted Changes:
I96ee9a0a8:Revert "dm bufio: subtract the number of initial s...
I23d4da47b:Revert "dm verity: fix FEC for RS roots unaligned ...

Change-Id: Ie37a318c2a2fd61969f1102452b47b4e376071d9
2021-04-14 21:50:42 +00:00
Carlos Llamas
2feb4789b7 ANDROID: smp: fix preprocessor conditional warning
This fixes the following warning:
kernel/smp.c: In function ‘wake_up_all_idle_cpus’:
kernel/smp.c:961:5: warning: "CONFIG_SUSPEND" is not defined, evaluates to 0 [-Wundef]
 #if CONFIG_SUSPEND
     ^~~~~~~~~~~~~~

Bug: 183339614
Fixes: fc005b3ced (ANDROID: fix 0-day build-break for non-GKI)
Reported-by: kernelci.org bot <bot@kernelci.org>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Ieeff7c0a49237e117e93e653b8f1a3e2d63f3f65
2021-04-14 18:33:17 +00:00
Carlos Llamas
f226790096 ANDROID: mm/memory_hotplug: fix minor printk format warnings
Use the correct printk length specifier [%llx] for u64 variables.
This fixes several warnings of the following type:

mm/memory_hotplug.c: In function ‘add_memory_subsection’:
./include/linux/kern_levels.h:5:18: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ {aka ‘long long unsigned int’} [-Wformat=]
mm/memory_hotplug.c:1144:25: note: format string is defined here
   pr_err("%s: start 0x%lx size 0x%lx not aligned to subsection size\n",
                       ~~^
                       %llx

Bug: 183339614
Fixes: 417ac617ea (ANDROID: mm/memory_hotplug: implement {add/remove}_memory_subsection)
Reported-by: kernelci.org bot <bot@kernelci.org>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Iee89be07cb40513661e336dd0671f65b1161e830
2021-04-14 17:36:16 +00:00
Carlos Llamas
615edf1635 ANDROID: power_supply: inline empty power_supply_get_by_phandle_array()
The static empty definition of power_supply_get_by_phandle_array(), used
when CONFIG_OF is not set, is missing an inline keyword. This generates
multiple compiler warnings and adds function-call overhead. This patch
inlines the definition to address such issues.

Fixes:
./include/linux/power_supply.h:405:12: warning: ‘power_supply_get_by_phandle_array’ defined but not used [-Wunused-function]
  405 | static int power_supply_get_by_phandle_array(struct device_node *np,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bug: 183339614
Fixes: dea1a925f6 (ANDROID: power_supply: Add a helper function to retrieve psy array from phandle)
Reported-by: kernelci.org bot <bot@kernelci.org>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I6ad919673d0f649d7701c573196c11795663182d
(cherry picked from commit 1dccea76da)
2021-04-14 17:36:16 +00:00
Sandeep Maheswaram
3ab775d150 FROMGIT: usb: dwc3: core: Add shutdown callback for dwc3
This patch adds a shutdown callback to USB DWC core driver to ensure that
it is properly shutdown in reboot/shutdown path. This is required
where SMMU address translation is enabled like on SC7180
SoC and few others. If the hardware is still accessing memory after
SMMU translation is disabled as part of SMMU shutdown callback in
system reboot or shutdown path, then IOVAs(I/O virtual address)
which it was using will go on the bus as the physical addresses which
might result in unknown crashes (NoC/interconnect errors).

Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
Link: https://lore.kernel.org/r/1618380209-20114-1-git-send-email-sanm@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 568262bf54
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8c2251b23542273ad388163618fb114b17c92e6d
2021-04-14 16:56:32 +00:00
Thinh Nguyen
fbb0ff48a7 FROMGIT: usb: dwc3: gadget: Ignore Packet Pending bit
Currently the controller handles single stream only. So, Ignore Packet
Pending bit for stream selection and don't search for another stream if
the host sends Data Packet with PP=0 (for OUT direction) or ACK with
NumP=0 and PP=0 (for IN direction). This slightly improves the stream
performance.

Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/097ba9e104c143f7ba0195ebff29390ec3043692.1618282705.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e66bbfb0fb
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifbc02709ac53b1f26b3afc00eae25aba9b9b42e2
2021-04-14 16:56:18 +00:00
Badhri Jagan Sridharan
8d92227969 ANDROID: usb: typec: tcpm: Update tcpm_update_sink_capabilities
https://lore.kernel.org/r/20210114145053.1952756-2-kyletso@google.com
introduced AMS. Update tcpm_update_sink_capabilities to use AMS
as well.

Bug: 169695061
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I2578d404a067e1b76b1697b02ded7ab83d81ab9e
2021-04-14 01:49:13 +00:00
Will McVicker
c50ebbb88d ANDROID: GKI: Update the ABI xml
Leaf changes summary: 424 artifacts changed (25 filtered out)
Changed leaf types summary: 0 (25 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 376 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 48 Added variables

376 Added functions:

  [A] 'function void* __alloc_percpu_gfp(size_t, size_t, gfp_t)'
  [A] 'function int __clocksource_register_scale(clocksource*, u32, u32)'
  [A] 'function void* __devm_alloc_percpu(device*, size_t, size_t)'
  [A] 'function void* __devm_drm_dev_alloc(device*, drm_driver*, size_t, size_t)'
  [A] 'function regmap* __devm_regmap_init_spi(spi_device*, const regmap_config*, lock_class_key*, const char*)'
  [A] 'function int __irq_alloc_descs(int, unsigned int, unsigned int, int, module*, const irq_affinity_desc*)'
  [A] 'function int __kfifo_init(__kfifo*, void*, unsigned int, size_t)'
  [A] 'function void* __seq_open_private(file*, const seq_operations*, int)'
  [A] 'function int __traceiter_clock_set_rate(void*, const char*, unsigned int, unsigned int)'
  [A] 'function int __traceiter_dwc3_readl(void*, void*, u32, u32)'
  [A] 'function int __traceiter_dwc3_writel(void*, void*, u32, u32)'
  [A] 'function int __traceiter_sched_util_est_se_tp(void*, sched_entity*)'
  [A] 'function int __update_load_avg_blocked_se(u64, sched_entity*)'
  [A] 'function void __wake_up_sync(wait_queue_head*, unsigned int)'
  [A] 'function void __xfrm_state_destroy(xfrm_state*, bool)'
  [A] 'function size_t _copy_from_iter(void*, size_t, iov_iter*)'
  [A] 'function int alarm_try_to_cancel(alarm*)'
  [A] 'function rtc_device* alarmtimer_get_rtcdev()'
  [A] 'function void* alloc_pages_exact(size_t, gfp_t)'
  [A] 'function async_cookie_t async_schedule_node_domain(async_func_t, void*, int, async_domain*)'
  [A] 'function void async_synchronize_full_domain(async_domain*)'
  [A] 'function void bitmap_from_arr32(unsigned long int*, const u32*, unsigned int)'
  [A] 'function int bitmap_parse(const char*, unsigned int, unsigned long int*, int)'
  [A] 'function void bitmap_to_arr32(u32*, const unsigned long int*, unsigned int)'
  [A] 'function int bus_for_each_drv(bus_type*, device_driver*, void*, int (device_driver*, void*)*)'
  [A] 'function void cfg80211_ibss_joined(net_device*, const u8*, ieee80211_channel*, gfp_t)'
  [A] 'function void cfg80211_port_authorized(net_device*, const u8*, gfp_t)'
  [A] 'function void cfg80211_sched_scan_stopped(wiphy*, u64)'
  [A] 'function void cfg80211_sched_scan_stopped_rtnl(wiphy*, u64)'
  [A] 'function void cfg80211_unregister_wdev(wireless_dev*)'
  [A] 'function int clk_register_clkdev(clk*, const char*, const char*)'
  [A] 'function clk* clk_register_fixed_factor(device*, const char*, const char*, unsigned long int, unsigned int, unsigned int)'
  [A] 'function clk* clk_register_fixed_rate(device*, const char*, const char*, unsigned long int, unsigned long int)'
  [A] 'function clk* clk_register_gate(device*, const char*, const char*, unsigned long int, void*, u8, u8, spinlock_t*)'
  [A] 'function void clockevents_config_and_register(clock_event_device*, u32, unsigned long int, unsigned long int)'
  [A] 'function void clocks_calc_mult_shift(u32*, u32*, u32, u32, u32)'
  [A] 'function int cma_for_each_area(int (cma*, void*)*, void*)'
  [A] 'function int console_trylock()'
  [A] 'function void console_unlock()'
  [A] 'function void cpufreq_add_update_util_hook(int, update_util_data*, void (update_util_data*, typedef u64, unsigned int)*)'
  [A] 'function void cpufreq_freq_transition_begin(cpufreq_policy*, cpufreq_freqs*)'
  [A] 'function void cpufreq_freq_transition_end(cpufreq_policy*, cpufreq_freqs*, int)'
  [A] 'function int cpufreq_frequency_table_verify(cpufreq_policy_data*, cpufreq_frequency_table*)'
  [A] 'function unsigned int cpufreq_policy_transition_delay_us(cpufreq_policy*)'
  [A] 'function void cpufreq_remove_update_util_hook(int)'
  [A] 'function int cpufreq_table_index_unsorted(cpufreq_policy*, unsigned int, unsigned int)'
  [A] 'function bool cpufreq_this_cpu_can_update(cpufreq_policy*)'
  [A] 'function int cpumask_any_but(const cpumask*, unsigned int)'
  [A] 'function int crypto_shash_digest(shash_desc*, const u8*, unsigned int, u8*)'
  [A] 'function int dev_printk_emit(int, const device*, const char*, ...)'
  [A] 'function dev_dma_attr device_get_dma_attr(device*)'
  [A] 'function void devm_backlight_device_unregister(device*, backlight_device*)'
  [A] 'function int devm_clk_hw_register_clkdev(device*, clk_hw*, const char*, const char*)'
  [A] 'function drm_bridge* devm_drm_panel_bridge_add_typed(device*, drm_panel*, u32)'
  [A] 'function void devm_free_percpu(device*, void*)'
  [A] 'function gen_pool* devm_gen_pool_create(device*, int, int, const char*)'
  [A] 'function void devm_gpio_free(device*, unsigned int)'
  [A] 'function gpio_descs* devm_gpiod_get_array(device*, const char*, gpiod_flags)'
  [A] 'function void devm_gpiod_put_array(device*, gpio_descs*)'
  [A] 'function i2c_client* devm_i2c_new_dummy_device(device*, i2c_adapter*, u16)'
  [A] 'function const char* devm_kstrdup_const(device*, const char*, gfp_t)'
  [A] 'function void devm_phy_put(device*, phy*)'
  [A] 'function int devm_pinctrl_register_and_init(device*, pinctrl_desc*, void*, pinctrl_dev**)'
  [A] 'function void devm_thermal_zone_of_sensor_unregister(device*, thermal_zone_device*)'
  [A] 'function int dma_get_slave_caps(dma_chan*, dma_slave_caps*)'
  [A] 'function void dma_heap_put(dma_heap*)'
  [A] 'function void dmaengine_unmap_put(dmaengine_unmap_data*)'
  [A] 'function int down_interruptible(semaphore*)'
  [A] 'function int down_timeout(semaphore*, long int)'
  [A] 'function int driver_create_file(device_driver*, const driver_attribute*)'
  [A] 'function void driver_remove_file(device_driver*, const driver_attribute*)'
  [A] 'function int drm_atomic_add_affected_connectors(drm_atomic_state*, drm_crtc*)'
  [A] 'function int drm_atomic_add_affected_planes(drm_atomic_state*, drm_crtc*)'
  [A] 'function drm_connector* drm_atomic_get_new_connector_for_encoder(drm_atomic_state*, drm_encoder*)'
  [A] 'function void drm_atomic_helper_bridge_destroy_state(drm_bridge*, drm_bridge_state*)'
  [A] 'function drm_bridge_state* drm_atomic_helper_bridge_duplicate_state(drm_bridge*)'
  [A] 'function drm_bridge_state* drm_atomic_helper_bridge_reset(drm_bridge*)'
  [A] 'function int drm_atomic_helper_check_modeset(drm_device*, drm_atomic_state*)'
  [A] 'function int drm_atomic_helper_check_planes(drm_device*, drm_atomic_state*)'
  [A] 'function void drm_atomic_helper_commit_cleanup_done(drm_atomic_state*)'
  [A] 'function void drm_atomic_helper_commit_tail(drm_atomic_state*)'
  [A] 'function void drm_atomic_helper_fake_vblank(drm_atomic_state*)'
  [A] 'function int drm_atomic_helper_setup_commit(drm_atomic_state*, bool)'
  [A] 'function void drm_atomic_helper_wait_for_dependencies(drm_atomic_state*)'
  [A] 'function void drm_atomic_helper_wait_for_flip_done(drm_device*, drm_atomic_state*)'
  [A] 'function int drm_atomic_normalize_zpos(drm_device*, drm_atomic_state*)'
  [A] 'function int drm_atomic_set_crtc_for_plane(drm_plane_state*, drm_crtc*)'
  [A] 'function void drm_atomic_set_fb_for_plane(drm_plane_state*, drm_framebuffer*)'
  [A] 'function u64 drm_crtc_vblank_count_and_time(drm_crtc*, ktime_t*)'
  [A] 'function void drm_display_mode_to_videomode(const drm_display_mode*, videomode*)'
  [A] 'function void drm_event_cancel_free(drm_device*, drm_pending_event*)'
  [A] 'function int drm_event_reserve_init(drm_device*, drm_file*, drm_pending_event*, drm_event*)'
  [A] 'function drm_gem_object* drm_gem_prime_import_dev(drm_device*, dma_buf*, device*)'
  [A] 'function void drm_mode_convert_to_umode(drm_mode_modeinfo*, const drm_display_mode*)'
  [A] 'function bool drm_mode_equal_no_clocks(const drm_display_mode*, const drm_display_mode*)'
  [A] 'function int drm_plane_create_alpha_property(drm_plane*)'
  [A] 'function int drm_plane_create_blend_mode_property(drm_plane*, unsigned int)'
  [A] 'function drm_property* drm_property_create_bool(drm_device*, u32, const char*)'
  [A] 'function bool drm_property_replace_blob(drm_property_blob**, drm_property_blob*)'
  [A] 'function bool drm_rect_clip_scaled(drm_rect*, drm_rect*, const drm_rect*)'
  [A] 'function void drm_send_event(drm_device*, drm_pending_event*)'
  [A] 'function int drm_writeback_connector_init(drm_device*, drm_writeback_connector*, const drm_connector_funcs*, const drm_encoder_helper_funcs*, const u32*, int)'
  [A] 'function void drm_writeback_queue_job(drm_writeback_connector*, drm_connector_state*)'
  [A] 'function void drm_writeback_signal_completion(drm_writeback_connector*, int)'
  [A] 'function void* drmm_kmalloc(drm_device*, size_t, gfp_t)'
  [A] 'function void dump_backtrace(pt_regs*, task_struct*, const char*)'
  [A] 'function irqreturn_t dw_handle_msi_irq(pcie_port*)'
  [A] 'function int dw_pcie_host_init(pcie_port*)'
  [A] 'function void dw_pcie_msi_init(pcie_port*)'
  [A] 'function int dw_pcie_read(void*, int, u32*)'
  [A] 'function void dw_pcie_setup_rc(pcie_port*)'
  [A] 'function int dw_pcie_write(void*, int, u32)'
  [A] 'function int dwc3_send_gadget_ep_cmd(dwc3_ep*, unsigned int, dwc3_gadget_ep_cmd_params*)'
  [A] 'function void dwc3_stop_active_transfer(dwc3_ep*, bool, bool)'
  [A] 'function void emergency_restart()'
  [A] 'function int extcon_set_property(extcon_dev*, unsigned int, unsigned int, extcon_property_value)'
  [A] 'function int extcon_set_property_capability(extcon_dev*, unsigned int, unsigned int)'
  [A] 'function int filp_close(file*, fl_owner_t)'
  [A] 'function file* filp_open_block(const char*, int, umode_t)'
  [A] 'function frame_vector* frame_vector_create(unsigned int)'
  [A] 'function void frame_vector_destroy(frame_vector*)'
  [A] 'function int frame_vector_to_pages(frame_vector*)'
  [A] 'function unsigned int full_name_hash(void*, const char*, unsigned int)'
  [A] 'function gpio_desc* fwnode_gpiod_get_index(fwnode_handle*, const char*, int, gpiod_flags, const char*)'
  [A] 'function unsigned long int gen_pool_first_fit_align(unsigned long int*, unsigned long int, unsigned long int, unsigned int, void*, gen_pool*, unsigned long int)'
  [A] 'function u64 get_cpu_idle_time(unsigned int, u64*, int)'
  [A] 'function u64 get_cpu_idle_time_us(int, u64*)'
  [A] 'function u64 get_cpu_iowait_time_us(int, u64*)'
  [A] 'function int get_random_bytes_arch(void*, int)'
  [A] 'function thermal_instance* get_thermal_instance(thermal_zone_device*, thermal_cooling_device*, int)'
  [A] 'function int get_vaddr_frames(unsigned long int, unsigned int, unsigned int, frame_vector*)'
  [A] 'function bool glob_match(const char*, const char*)'
  [A] 'function void gov_attr_set_get(gov_attr_set*, list_head*)'
  [A] 'function int gpiochip_generic_config(gpio_chip*, unsigned int, unsigned long int)'
  [A] 'function int gserial_alloc_line(unsigned char*)'
  [A] 'function int gserial_connect(gserial*, u8)'
  [A] 'function void gserial_disconnect(gserial*)'
  [A] 'function bool have_governor_per_policy()'
  [A] 'function void hrtimer_init_sleeper(hrtimer_sleeper*, clockid_t, hrtimer_mode)'
  [A] 'function void hrtimer_sleeper_start_expires(hrtimer_sleeper*, hrtimer_mode)'
  [A] 'function const i2c_device_id* i2c_match_id(const i2c_device_id*, const i2c_client*)'
  [A] 'function i2c_client* i2c_new_client_device(i2c_adapter*, const i2c_board_info*)'
  [A] 'function i2c_client* i2c_new_dummy_device(i2c_adapter*, u16)'
  [A] 'function s32 i2c_smbus_read_byte_data(const i2c_client*, u8)'
  [A] 'function s32 i2c_smbus_write_byte_data(const i2c_client*, u8, u8)'
  [A] 'function void iio_device_unregister(iio_dev*)'
  [A] 'function __be32 in_aton(const char*)'
  [A] 'function void input_mt_destroy_slots(input_dev*)'
  [A] 'function void input_set_timestamp(input_dev*, ktime_t)'
  [A] 'function long int io_schedule_timeout(long int)'
  [A] 'function int iommu_aux_attach_device(iommu_domain*, device*)'
  [A] 'function void iommu_aux_detach_device(iommu_domain*, device*)'
  [A] 'function int iommu_aux_get_pasid(iommu_domain*, device*)'
  [A] 'function int iommu_dev_enable_feature(device*, iommu_dev_features)'
  [A] 'function bool iommu_dev_feature_enabled(device*, iommu_dev_features)'
  [A] 'function void iommu_device_unlink(iommu_device*, device*)'
  [A] 'function iommu_group* iommu_group_alloc()'
  [A] 'function int iommu_group_set_name(iommu_group*, const char*)'
  [A] 'function int iommu_register_device_fault_handler(device*, iommu_dev_fault_handler_t, void*)'
  [A] 'function int iommu_report_device_fault(device*, iommu_fault_event*)'
  [A] 'function int iommu_unregister_device_fault_handler(device*)'
  [A] 'function void ip_send_check(iphdr*)'
  [A] 'function unsigned int irq_create_of_mapping(of_phandle_args*)'
  [A] 'function u64 jiffies64_to_msecs(const u64)'
  [A] 'function ssize_t kernel_read(file*, void*, size_t, loff_t*)'
  [A] 'function void* kmalloc_order(size_t, gfp_t, unsigned int)'
  [A] 'function int kstrtol_from_user(const char*, size_t, unsigned int, long int*)'
  [A] 'function ktime_t ktime_get_raw()'
  [A] 'function int led_classdev_register_ext(device*, led_classdev*, led_init_data*)'
  [A] 'function void log_abnormal_wakeup_reason(const char*, ...)'
  [A] 'function void log_threaded_irq_wakeup_reason(int, int)'
  [A] 'function ssize_t mipi_dsi_compression_mode(mipi_dsi_device*, bool)'
  [A] 'function ssize_t mipi_dsi_dcs_read(mipi_dsi_device*, u8, void*, size_t)'
  [A] 'function int mipi_dsi_dcs_set_column_address(mipi_dsi_device*, u16, u16)'
  [A] 'function int mipi_dsi_dcs_set_page_address(mipi_dsi_device*, u16, u16)'
  [A] 'function ssize_t mipi_dsi_dcs_write_buffer(mipi_dsi_device*, void*, size_t)'
  [A] 'function ssize_t mipi_dsi_picture_parameter_set(mipi_dsi_device*, const drm_dsc_picture_parameter_set*)'
  [A] 'function time64_t mktime64(const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int)'
  [A] 'function void netdev_state_change(net_device*)'
  [A] 'function int nla_append(sk_buff*, int, void*)'
  [A] 'function int nla_put_nohdr(sk_buff*, int, void*)'
  [A] 'function size_t nla_strlcpy(char*, const nlattr*, size_t)'
  [A] 'function u64 nsec_to_clock_t(u64)'
  [A] 'function void nvmem_device_put(nvmem_device*)'
  [A] 'function i2c_adapter* of_find_i2c_adapter_by_node(device_node*)'
  [A] 'function device_node* of_find_node_by_type(device_node*, const char*)'
  [A] 'function int of_get_dma_window(device_node*, const char*, int, unsigned long int*, dma_addr_t*, size_t*)'
  [A] 'function nvmem_device* of_nvmem_device_get(device_node*, const char*)'
  [A] 'function int of_property_read_variable_u64_array(const device_node*, const char*, u64*, size_t, size_t)'
  [A] 'function int pci_enable_wake(pci_dev*, pci_power_t, bool)'
  [A] 'function pci_bus* pci_find_bus(int, int)'
  [A] 'function unsigned int pci_rescan_bus(pci_bus*)'
  [A] 'function void pci_restore_msi_state(pci_dev*)'
  [A] 'function int pci_wake_from_d3(pci_dev*, bool)'
  [A] 'function u64 perf_event_pause(perf_event*, bool)'
  [A] 'function void perf_event_update_userpage(perf_event*)'
  [A] 'function void perf_pmu_migrate_context(pmu*, int, int)'
  [A] 'function const char* pin_get_name(pinctrl_dev*, const unsigned int)'
  [A] 'function int pin_user_pages_fast(unsigned long int, int, unsigned int, page**)'
  [A] 'function long int pin_user_pages_remote(mm_struct*, unsigned long int, unsigned long int, unsigned int, page**, vm_area_struct**, int*)'
  [A] 'function void pinconf_generic_dt_free_map(pinctrl_dev*, pinctrl_map*, unsigned int)'
  [A] 'function void pinctrl_add_gpio_range(pinctrl_dev*, pinctrl_gpio_range*)'
  [A] 'function int pinctrl_enable(pinctrl_dev*)'
  [A] 'function void pinctrl_remove_gpio_range(pinctrl_dev*, pinctrl_gpio_range*)'
  [A] 'function int pktgen_xfrm_outer_mode_output(xfrm_state*, sk_buff*)'
  [A] 'function device* platform_find_device_by_driver(device*, const device_driver*)'
  [A] 'function int power_supply_get_by_phandle_array(device_node*, const char*, power_supply**, ssize_t)'
  [A] 'function void prandom_bytes(void*, size_t)'
  [A] 'function proc_dir_entry* proc_mkdir_data(const char*, umode_t, proc_dir_entry*, void*)'
  [A] 'function void put_vaddr_frames(frame_vector*)'
  [A] 'function int rdev_get_id(regulator_dev*)'
  [A] 'function int regcache_drop_region(regmap*, unsigned int, unsigned int)'
  [A] 'function void register_kernel_break_hook(break_hook*)'
  [A] 'function int register_pernet_subsys(pernet_operations*)'
  [A] 'function int regmap_async_complete(regmap*)'
  [A] 'function device* regmap_get_device(regmap*)'
  [A] 'function int regmap_multi_reg_write_bypassed(regmap*, const reg_sequence*, int)'
  [A] 'function int regmap_raw_write_async(regmap*, unsigned int, void*, size_t)'
  [A] 'function int regulator_map_voltage_linear(regulator_dev*, int, int)'
  [A] 'function regulator_dev* regulator_register(const regulator_desc*, const regulator_config*)'
  [A] 'function void regulator_unregister(regulator_dev*)'
  [A] 'function void rtc_class_close(rtc_device*)'
  [A] 'function rtc_device* rtc_class_open(const char*)'
  [A] 'function int rtc_read_time(rtc_device*, rtc_time*)'
  [A] 'function int sched_setattr_nocheck(task_struct*, const sched_attr*)'
  [A] 'function const sched_avg* sched_trace_cfs_rq_avg(cfs_rq*)'
  [A] 'function int sched_trace_cfs_rq_cpu(cfs_rq*)'
  [A] 'function char* sched_trace_cfs_rq_path(cfs_rq*, char*, int)'
  [A] 'function const cpumask* sched_trace_rd_span(root_domain*)'
  [A] 'function const sched_avg* sched_trace_rq_avg_dl(rq*)'
  [A] 'function const sched_avg* sched_trace_rq_avg_irq(rq*)'
  [A] 'function const sched_avg* sched_trace_rq_avg_rt(rq*)'
  [A] 'function int sched_trace_rq_cpu(rq*)'
  [A] 'function void scsi_block_requests(Scsi_Host*)'
  [A] 'function void scsi_unblock_requests(Scsi_Host*)'
  [A] 'function int seq_release_private(inode*, file*)'
  [A] 'function int set_blocksize(block_device*, int)'
  [A] 'function bool set_freezable()'
  [A] 'function long int simple_strtol(const char*, char**, unsigned int)'
  [A] 'function long long int simple_strtoll(const char*, char**, unsigned int)'
  [A] 'function long long unsigned int simple_strtoull(const char*, char**, unsigned int)'
  [A] 'function int single_open_size(file*, int (seq_file*, void*)*, void*, size_t)'
  [A] 'function int smp_call_on_cpu(unsigned int, int (void*)*, void*, bool)'
  [A] 'function int snd_compr_stop_error(snd_compr_stream*, snd_pcm_state_t)'
  [A] 'function void snd_ctl_notify(snd_card*, unsigned int, snd_ctl_elem_id*)'
  [A] 'function int snd_pcm_format_physical_width(snd_pcm_format_t)'
  [A] 'function int snd_pcm_lib_free_pages(snd_pcm_substream*)'
  [A] 'function int snd_pcm_lib_ioctl(snd_pcm_substream*, unsigned int, void*)'
  [A] 'function int snd_pcm_lib_malloc_pages(snd_pcm_substream*, size_t)'
  [A] 'function void snd_pcm_lib_preallocate_pages(snd_pcm_substream*, int, device*, size_t, size_t)'
  [A] 'function int snd_soc_add_dai_controls(snd_soc_dai*, const snd_kcontrol_new*, int)'
  [A] 'function int snd_soc_bytes_tlv_callback(snd_kcontrol*, int, unsigned int, unsigned int*)'
  [A] 'function int snd_soc_component_disable_pin(snd_soc_component*, const char*)'
  [A] 'function int snd_soc_component_force_enable_pin(snd_soc_component*, const char*)'
  [A] 'function int snd_soc_component_set_pll(snd_soc_component*, int, int, unsigned int, unsigned int)'
  [A] 'function int snd_soc_component_set_sysclk(snd_soc_component*, int, int, unsigned int, int)'
  [A] 'function int snd_soc_dai_set_pll(snd_soc_dai*, int, int, unsigned int, unsigned int)'
  [A] 'function int snd_soc_dapm_disable_pin_unlocked(snd_soc_dapm_context*, const char*)'
  [A] 'function int snd_soc_dapm_force_enable_pin_unlocked(snd_soc_dapm_context*, const char*)'
  [A] 'function int snd_soc_dapm_get_pin_status(snd_soc_dapm_context*, const char*)'
  [A] 'function int snd_soc_dapm_sync_unlocked(snd_soc_dapm_context*)'
  [A] 'function int snd_soc_get_volsw_range(snd_kcontrol*, snd_ctl_elem_value*)'
  [A] 'function int snd_soc_info_volsw_range(snd_kcontrol*, snd_ctl_elem_info*)'
  [A] 'function int snd_soc_params_to_frame_size(snd_pcm_hw_params*)'
  [A] 'function int snd_soc_put_volsw_range(snd_kcontrol*, snd_ctl_elem_value*)'
  [A] 'function int snd_soc_register_card(snd_soc_card*)'
  [A] 'function int snd_soc_runtime_set_dai_fmt(snd_soc_pcm_runtime*, unsigned int)'
  [A] 'function void sock_wfree(sk_buff*)'
  [A] 'function void static_key_slow_dec(static_key*)'
  [A] 'function void static_key_slow_inc(static_key*)'
  [A] 'function char* strndup_user(const char*, long int)'
  [A] 'function __kernel_size_t strspn(const char*, const char*)'
  [A] 'function int subsys_system_register(bus_type*, const attribute_group**)'
  [A] 'function int sysfs_emit_at(char*, int, const char*, ...)'
  [A] 'function int sysfs_update_group(kobject*, const attribute_group*)'
  [A] 'function tcpm_port* tcpci_get_tcpm_port(tcpci*)'
  [A] 'function void tcpm_cc_change(tcpm_port*)'
  [A] 'function bool tcpm_is_toggling(tcpm_port*)'
  [A] 'function void tcpm_pd_hard_reset(tcpm_port*)'
  [A] 'function void tcpm_pd_receive(tcpm_port*, const pd_message*)'
  [A] 'function void tcpm_pd_transmit_complete(tcpm_port*, tcpm_transmit_status)'
  [A] 'function void tcpm_sink_frs(tcpm_port*)'
  [A] 'function void tcpm_sourcing_vbus(tcpm_port*)'
  [A] 'function int tcpm_update_sink_capabilities(tcpm_port*, const u32*, unsigned int, unsigned int)'
  [A] 'function void tcpm_vbus_change(tcpm_port*)'
  [A] 'function void thermal_cdev_update(thermal_cooling_device*)'
  [A] 'function int thermal_zone_device_is_enabled(thermal_zone_device*)'
  [A] 'function void thermal_zone_device_unregister(thermal_zone_device*)'
  [A] 'function void thread_group_cputime_adjusted(task_struct*, u64*, u64*)'
  [A] 'function unsigned long int tick_nohz_get_idle_calls_cpu(int)'
  [A] 'function int trace_output_call(trace_iterator*, char*, char*, ...)'
  [A] 'function int try_to_del_timer_sync(timer_list*)'
  [A] 'function void tty_kref_put(tty_struct*)'
  [A] 'function tty_struct* tty_port_tty_get(tty_port*)'
  [A] 'function void* typec_switch_get_drvdata(typec_switch*)'
  [A] 'function typec_switch* typec_switch_register(device*, const typec_switch_desc*)'
  [A] 'function void typec_switch_unregister(typec_switch*)'
  [A] 'function void udp4_hwcsum(sk_buff*, __be32, __be32)'
  [A] 'function int ufshcd_bkops_ctrl(ufs_hba*, bkops_status)'
  [A] 'function int ufshcd_query_attr_retry(ufs_hba*, query_opcode, attr_idn, u8, u8, u32*)'
  [A] 'function int ufshcd_query_flag_retry(ufs_hba*, query_opcode, flag_idn, u8, bool*)'
  [A] 'function int ufshcd_read_desc_param(ufs_hba*, desc_idn, int, u8, u8*, u8)'
  [A] 'function int ufshcd_system_resume(ufs_hba*)'
  [A] 'function int ufshcd_system_suspend(ufs_hba*)'
  [A] 'function void unpin_user_page(page*)'
  [A] 'function void unregister_pernet_subsys(pernet_operations*)'
  [A] 'function int usb_add_function(usb_configuration*, usb_function*)'
  [A] 'function usb_descriptor_header** usb_copy_descriptors(usb_descriptor_header**)'
  [A] 'function int usb_hcd_is_primary_hcd(usb_hcd*)'
  [A] 'function const char* usb_otg_state_string(usb_otg_state)'
  [A] 'function int v4l2_ctrl_log_status(file*, void*)'
  [A] 'function void v4l2_m2m_buf_queue(v4l2_m2m_ctx*, vb2_v4l2_buffer*)'
  [A] 'function vb2_v4l2_buffer* v4l2_m2m_buf_remove(v4l2_m2m_queue_ctx*)'
  [A] 'function v4l2_m2m_ctx* v4l2_m2m_ctx_init(v4l2_m2m_dev*, void*, int (void*, vb2_queue*, vb2_queue*)*)'
  [A] 'function void v4l2_m2m_ctx_release(v4l2_m2m_ctx*)'
  [A] 'function int v4l2_m2m_fop_mmap(file*, vm_area_struct*)'
  [A] 'function __poll_t v4l2_m2m_fop_poll(file*, poll_table*)'
  [A] 'function void* v4l2_m2m_get_curr_priv(v4l2_m2m_dev*)'
  [A] 'function vb2_queue* v4l2_m2m_get_vq(v4l2_m2m_ctx*, v4l2_buf_type)'
  [A] 'function v4l2_m2m_dev* v4l2_m2m_init(const v4l2_m2m_ops*)'
  [A] 'function int v4l2_m2m_ioctl_dqbuf(file*, void*, v4l2_buffer*)'
  [A] 'function int v4l2_m2m_ioctl_querybuf(file*, void*, v4l2_buffer*)'
  [A] 'function int v4l2_m2m_ioctl_reqbufs(file*, void*, v4l2_requestbuffers*)'
  [A] 'function int v4l2_m2m_ioctl_streamoff(file*, void*, v4l2_buf_type)'
  [A] 'function int v4l2_m2m_ioctl_streamon(file*, void*, v4l2_buf_type)'
  [A] 'function void v4l2_m2m_job_finish(v4l2_m2m_dev*, v4l2_m2m_ctx*)'
  [A] 'function vb2_v4l2_buffer* v4l2_m2m_next_buf(v4l2_m2m_queue_ctx*)'
  [A] 'function int v4l2_m2m_qbuf(file*, v4l2_m2m_ctx*, v4l2_buffer*)'
  [A] 'function void v4l2_m2m_release(v4l2_m2m_dev*)'
  [A] 'function frame_vector* vb2_create_framevec(unsigned long int, unsigned long int)'
  [A] 'function void vb2_destroy_framevec(frame_vector*)'
  [A] 'function int vb2_fop_mmap(file*, vm_area_struct*)'
  [A] 'function __poll_t vb2_fop_poll(file*, poll_table*)'
  [A] 'function ssize_t vb2_fop_read(file*, char*, size_t, loff_t*)'
  [A] 'function int vb2_fop_release(file*)'
  [A] 'function int vb2_ioctl_create_bufs(file*, void*, v4l2_create_buffers*)'
  [A] 'function int vb2_ioctl_dqbuf(file*, void*, v4l2_buffer*)'
  [A] 'function int vb2_ioctl_expbuf(file*, void*, v4l2_exportbuffer*)'
  [A] 'function int vb2_ioctl_qbuf(file*, void*, v4l2_buffer*)'
  [A] 'function int vb2_ioctl_querybuf(file*, void*, v4l2_buffer*)'
  [A] 'function int vb2_ioctl_reqbufs(file*, void*, v4l2_requestbuffers*)'
  [A] 'function int vb2_ioctl_streamoff(file*, void*, v4l2_buf_type)'
  [A] 'function int vb2_ioctl_streamon(file*, void*, v4l2_buf_type)'
  [A] 'function int vb2_mmap(vb2_queue*, vm_area_struct*)'
  [A] 'function void vb2_ops_wait_finish(vb2_queue*)'
  [A] 'function void vb2_ops_wait_prepare(vb2_queue*)'
  [A] 'function void* vb2_plane_cookie(vb2_buffer*, unsigned int)'
  [A] 'function void* vb2_plane_vaddr(vb2_buffer*, unsigned int)'
  [A] 'function __poll_t vb2_poll(vb2_queue*, file*, poll_table*)'
  [A] 'function int vb2_querybuf(vb2_queue*, v4l2_buffer*)'
  [A] 'function int vb2_wait_for_all_buffers(vb2_queue*)'
  [A] 'function void* vm_map_ram(page**, unsigned int, int)'
  [A] 'function void vm_unmap_ram(void*, unsigned int)'
  [A] 'function vm_fault_t vmf_insert_pfn_prot(vm_area_struct*, unsigned long int, unsigned long int, pgprot_t)'
  [A] 'function virtqueue* vring_new_virtqueue(unsigned int, unsigned int, unsigned int, virtio_device*, bool, bool, void*, typedef bool (virtqueue*)*, void (virtqueue*)*, const char*)'
  [A] 'function void* vzalloc_node(unsigned long int, int)'
  [A] 'function long int wait_for_completion_killable_timeout(completion*, unsigned long int)'
  [A] 'function void wakeup_source_add(wakeup_source*)'
  [A] 'function wakeup_source* wakeup_source_create(const char*)'
  [A] 'function void wakeup_source_destroy(wakeup_source*)'
  [A] 'function void wakeup_source_remove(wakeup_source*)'
  [A] 'function int watchdog_register_device(watchdog_device*)'
  [A] 'function void watchdog_set_restart_priority(watchdog_device*, int)'
  [A] 'function void watchdog_unregister_device(watchdog_device*)'
  [A] 'function xfrm_state* xfrm_state_lookup_byspi(net*, __be32, unsigned short int)'
  [A] 'function xfrm_state* xfrm_stateonly_find(net*, u32, u32, xfrm_address_t*, xfrm_address_t*, unsigned short int, u8, u8, u32)'
  [A] 'function int xhci_gen_setup(usb_hcd*, xhci_get_quirks_t)'
  [A] 'function xhci_ep_ctx* xhci_get_ep_ctx(xhci_hcd*, xhci_container_ctx*, unsigned int)'
  [A] 'function xhci_slot_ctx* xhci_get_slot_ctx(xhci_hcd*, xhci_container_ctx*)'
  [A] 'function int xhci_handle_event(xhci_hcd*)'
  [A] 'function void xhci_init_driver(hc_driver*, const xhci_driver_overrides*)'
  [A] 'function int xhci_resume(xhci_hcd*, bool)'
  [A] 'function int xhci_run(usb_hcd*)'
  [A] 'function int xhci_suspend(xhci_hcd*, bool)'
  [A] 'function void xhci_update_erst_dequeue(xhci_hcd*, xhci_trb*)'
  [A] 'function xhci_vendor_ops* xhci_vendor_get_ops(xhci_hcd*)'

48 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_cpu_overutilized'
  [A] 'tracepoint __tracepoint_android_rvh_find_energy_efficient_cpu'
  [A] 'tracepoint __tracepoint_android_rvh_set_iowait'
  [A] 'tracepoint __tracepoint_android_rvh_typec_tcpci_chk_contaminant'
  [A] 'tracepoint __tracepoint_android_rvh_typec_tcpci_get_vbus'
  [A] 'tracepoint __tracepoint_android_rvh_uclamp_eff_get'
  [A] 'tracepoint __tracepoint_android_rvh_util_est_update'
  [A] 'tracepoint __tracepoint_android_vh_arch_set_freq_scale'
  [A] 'tracepoint __tracepoint_android_vh_cma_alloc_finish'
  [A] 'tracepoint __tracepoint_android_vh_cma_alloc_start'
  [A] 'tracepoint __tracepoint_android_vh_enable_thermal_genl_check'
  [A] 'tracepoint __tracepoint_android_vh_ep_create_wakeup_source'
  [A] 'tracepoint __tracepoint_android_vh_pagecache_get_page'
  [A] 'tracepoint __tracepoint_android_vh_rmqueue'
  [A] 'tracepoint __tracepoint_android_vh_timerfd_create'
  [A] 'tracepoint __tracepoint_android_vh_typec_store_partner_src_caps'
  [A] 'tracepoint __tracepoint_android_vh_typec_tcpci_override_toggling'
  [A] 'tracepoint __tracepoint_android_vh_typec_tcpm_adj_current_limit'
  [A] 'tracepoint __tracepoint_android_vh_typec_tcpm_get_timer'
  [A] 'tracepoint __tracepoint_android_vh_ufs_check_int_errors'
  [A] 'tracepoint __tracepoint_android_vh_ufs_compl_command'
  [A] 'tracepoint __tracepoint_android_vh_ufs_fill_prdt'
  [A] 'tracepoint __tracepoint_android_vh_ufs_prepare_command'
  [A] 'tracepoint __tracepoint_android_vh_ufs_send_command'
  [A] 'tracepoint __tracepoint_android_vh_ufs_send_tm_command'
  [A] 'tracepoint __tracepoint_android_vh_ufs_send_uic_command'
  [A] 'tracepoint __tracepoint_android_vh_ufs_update_sysfs'
  [A] 'tracepoint __tracepoint_clock_set_rate'
  [A] 'tracepoint __tracepoint_device_pm_callback_end'
  [A] 'tracepoint __tracepoint_device_pm_callback_start'
  [A] 'tracepoint __tracepoint_dwc3_readl'
  [A] 'tracepoint __tracepoint_dwc3_writel'
  [A] 'tracepoint __tracepoint_pelt_cfs_tp'
  [A] 'tracepoint __tracepoint_pelt_dl_tp'
  [A] 'tracepoint __tracepoint_pelt_irq_tp'
  [A] 'tracepoint __tracepoint_pelt_rt_tp'
  [A] 'tracepoint __tracepoint_pelt_se_tp'
  [A] 'tracepoint __tracepoint_sched_cpu_capacity_tp'
  [A] 'tracepoint __tracepoint_sched_overutilized_tp'
  [A] 'tracepoint __tracepoint_sched_util_est_cfs_tp'
  [A] 'tracepoint __tracepoint_sched_util_est_se_tp'
  [A] 'const unsigned long int cpu_all_bits[1]'
  [A] 'bool cpuhp_tasks_frozen'
  [A] 'kernel_cpustat kernel_cpustat'
  [A] 'const kernel_param_ops param_ops_short'
  [A] 'static_key_false rps_needed'
  [A] 'const vm_operations_struct vb2_common_vm_ops'
  [A] 'const vb2_mem_ops vb2_vmalloc_memops'

Bug: 182844240
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: Ifd8109f54da3a57b09645692a30e34ef01b9815c
2021-04-13 23:28:09 +00:00
Will McVicker
750af2afbe ANDROID: GKI: Add generic aarch64 symbol list
Useful set of generic aarch64 symbols for GKI.

Bug: 182844240
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I9fcefdb83e2fc1c65d0f768146e859286140a5ce
2021-04-13 23:27:58 +00:00
J. Avila
01a0d1ea31 ANDROID: usb: host: Use old init scheme when hook unavailable
In cases where the new xhci hooks are unimplemented, ctx->bytes may
never be initialized, leading to null pointer crashes. Fix this by only
calling xhci_vendor_alloc/free_container_ctx when the corresponding hook
is present.

Bug: 185191548
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Ia77b0815ddc8bc340a286731558c754c779e883a
2021-04-13 23:22:23 +00:00
David Anderson
6aee238019 Revert "dm bufio: subtract the number of initial sectors in dm_bufio_get_device_size"
This reverts commit 7bda53f463.

Bug: 184927119
Test: OTA works
Change-Id: I96ee9a0a81659fccebdd6f6cb3edd8c8de1f15f1
Signed-off-by: David Anderson <dvander@google.com>
2021-04-13 19:03:53 +00:00
David Anderson
59977fca5c Revert "dm verity: fix FEC for RS roots unaligned to block size"
This reverts commit ce1cca1738.

Bug: 184927119
Test: OTA works
Change-Id: I23d4da47ba620085ea12ec38a80c106fa24d756f
Signed-off-by: David Anderson <dvander@google.com>
2021-04-13 19:03:44 +00:00
Alistair Delva
ea2cf4bea8 Revert "ANDROID: AVB error handler to invalidate vbmeta partition."
This driver is not used and can cause problems if used on modern
devices. Remove it.

This reverts commit 6115619831.

Bug: 185178770
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I1d5acb96dda765a1e3ea0cf62a3bf4b2a78892ea
2021-04-13 18:00:02 +00:00
Alexander Potapenko
d2521bc897 ANDROID: gki_defconfig: reduce KFENCE pool size
CONFIG_KFENCE_NUM_OBJECTS controls the constant memory overhead that
KFENCE introduces for its memory pool. By default it is 255 objects
(2Mb extra memory), but since concerns have been raised that low-memory
devices may not afford that, we are lowering the number of objects
to 63 (512Kb extra memory).

So far we haven't seen Android devices allocate more than 50 KFENCE
objects. Should the kernel exhaust the pool, KFENCE will stop allocating
new objects and fall back to SLAB/SLUB until one of the objects is
freed.

An immediate consequence of reducing the pool size is that a freed
KFENCE object will be reused 4x times faster, effectively reducing the
probability of detecting a use-after-free. Since KFENCE is a best-effort
error detection tool, not a use-after-free mitigation mechanism, we
believe this should not be problematic.

Bug: 181822795
Test: run KFENCE on an Android device
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I88fca80eea8b382115de03dbb104fd305b35476f
2021-04-13 15:06:47 +00:00
A. Cody Schuffelen
c70d90263c FROMGIT: virt_wifi: Return micros for BSS TSF values
cfg80211_inform_bss expects to receive a TSF value, but is given the
time since boot in nanoseconds. TSF values are expected to be at
microsecond scale rather than nanosecond scale.

Bug: 181840234
Test: atest CtsWifiTestCases:android.net.wifi.cts.ScanResultTest#testScanResultTimeStamp -- --abi x86_64
Signed-off-by: A. Cody Schuffelen <schuffelen@google.com>
Link: https://lore.kernel.org/r/20210318200419.1421034-1-schuffelen@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit b57aa17f07
https: //git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git master)
Change-Id: Icafc24ad303357926cbe955ffa12e28e0bf31e6f
2021-04-13 14:55:05 +00:00
Sangmoon Kim
09eafb2817 ANDROID: stacktrace: export stack_trace_save_tsk/regs
Export stack_trace_save_tsk and stack_trace_save_regs so that modules
can use it to get the stacktrace of specific tasks or pt_regs.

Bug: 184317765

Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: Ice4ede172b5ef2f1cf311a28414db0d8bf929ced
2021-04-13 13:18:04 +00:00
Park Bumgyu
6f6d8bb444 ANDROID: arm64: declare system_32bit_el0_cpumask as export
To know whether CPU supports 32bit el0 or not at module, declare
system_32bit_el0_cpumask as EXPORT_SYMBOL_GPL.

Bug: 184233663

Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
Change-Id: Ia329a5cf35c0f2a40b8088b0c1facad2532b5a0b
2021-04-13 12:28:44 +00:00
Isaac J. Manjarres
b492fa8a50 ANDROID: Fix compilation warning in __iommu_map_pages()
Commit 08d46858c7 ("FROMLIST: iommu: Add support for the map_pages()
callback") used the wrong format specifier for the count variable in
__iommu_map_pages(), and introduced the following compilation warning:

   drivers/iommu/iommu.c: In function '__iommu_map_pages':
>> drivers/iommu/iommu.c:7:24: warning: format '%ld' expects argument of
>> type 'long int', but argument 6 has type 'size_t' {aka 'unsigned
>> int'} [-Wformat=]
       7 | #define pr_fmt(fmt)    "iommu: " fmt
         |                        ^~~~~~~~~
   include/linux/dynamic_debug.h:129:15: note: in expansion of macro
'pr_fmt'
     129 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:147:2: note: in expansion of macro
'__dynamic_func_call'
     147 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func,
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:157:2: note: in expansion of macro
'_dynamic_func_call'
     157 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:424:2: note: in expansion of macro
'dynamic_pr_debug'
     424 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~
   drivers/iommu/iommu.c:2398:2: note: in expansion of macro 'pr_debug'
    2398 |  pr_debug("mapping: iova 0x%lx pa %pa pgsize 0x%zx count
%ld\n",
         |  ^~~~~~~~
   drivers/iommu/iommu.c:2398:60: note: format string is defined here
    2398 |  pr_debug("mapping: iova 0x%lx pa %pa pgsize 0x%zx count
%ld\n",

Fix by using the correct format specifier for the count variable.

Bug: 178537788
Fixes: 08d46858c7 ("FROMLIST: iommu: Add support for the map_pages() callback")
Reported-by: kernel test robot <lkp@intel.com>
Change-Id: Idc116f559c89e7da8a2b7ae5d8ce173923424588
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-04-13 11:27:32 +00:00
Isaac J. Manjarres
947f7639b3 ANDROID: iommu/io-pgtable-arm: Fix arguments for __arm_lpae_map()
arm_lpae_map_pages() is currently passing NULL to __arm_lpae_map()
for its mapped argument, instead of the mapped argument that it is
supposed to pass, which can lead to memory that has been mapped
not being counted as mapped.

Fix this by passing the mapped argument from arm_lpae_map_pages()
to __arm_lpae_map().

Bug: 178537788
Reported-by: John Stultz <john.stultz@linaro.org>
Fixes: ac3994447c ("FROMLIST: iommu/io-pgtable-arm: Implement arm_lpae_map_pages()")
Change-Id: Ic97df34fc2e9e0404d193eff2024d334e3e75a24
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-04-12 17:13:52 -07:00
Alistair Delva
40537e85f7 ANDROID: GKI: Bump KMI_GENERATION, ABI representation
KMI_GENERATION is bumped to 1.

Leaf changes summary: 10 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 7 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 3 Added variables

7 Added functions:

  [A] 'function void all_vm_events(unsigned long int*)'
  [A] 'function page* balloon_page_alloc()'
  [A] 'function page* balloon_page_dequeue(balloon_dev_info*)'
  [A] 'function void balloon_page_enqueue(balloon_dev_info*, page*)'
  [A] 'function int page_reporting_register(page_reporting_dev_info*)'
  [A] 'function void page_reporting_unregister(page_reporting_dev_info*)'
  [A] 'function long int si_mem_available()'

3 Added variables:

  [A] 'const address_space_operations balloon_aops'
  [A] 'static_key_false init_on_free'
  [A] 'vm_event_state vm_event_states'

Bug: 184983567
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I28114e1d3d264cbd8bd2007df37fc35dfa91f84b
2021-04-12 15:14:11 +00:00
Alistair Delva
af0bfc5b9d ANDROID: GKI: Update virtual device symbol list
For MEMORY_BALLOON symbols.

Bug: 183227346
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I7e050d7a680c3f967b7cf2eb880f85995d46054d
2021-04-12 15:14:05 +00:00
Howard Yen
216fe64b61 ANDROID: usb: host: free the offload TR by vendor hook
Free vendor specific transfer ring through vendor hook
when the offload is enabled.

Bug: 175850224
Test: boot pass and headset works
Change-Id: I1ee112f41dae56bf6e0b8cc5575d8f4e893071f5
Signed-off-by: Howard Yen <howardyen@google.com>
Signed-off-by: Puma Hsu <pumahsu@google.com>
2021-04-12 08:52:39 +00:00
Greg Kroah-Hartman
c62f09151d Merge 5.10.29 into android12-5.10
Changes in 5.10.29
	ARM: dts: am33xx: add aliases for mmc interfaces
	bus: ti-sysc: Fix warning on unbind if reset is not deasserted
	platform/x86: intel-hid: Support Lenovo ThinkPad X1 Tablet Gen 2
	bpf, x86: Use kvmalloc_array instead kmalloc_array in bpf_jit_comp
	net/mlx5e: Enforce minimum value check for ICOSQ size
	net: pxa168_eth: Fix a potential data race in pxa168_eth_remove
	kunit: tool: Fix a python tuple typing error
	mISDN: fix crash in fritzpci
	mac80211: Check crypto_aead_encrypt for errors
	mac80211: choose first enabled channel for monitor
	drm/msm/dsi_pll_7nm: Fix variable usage for pll_lockdet_rate
	drm/msm/adreno: a5xx_power: Don't apply A540 lm_setup to other GPUs
	drm/msm: Ratelimit invalid-fence message
	netfilter: conntrack: Fix gre tunneling over ipv6
	netfilter: nftables: skip hook overlap logic if flowtable is stale
	net: ipa: fix init header command validation
	platform/x86: thinkpad_acpi: Allow the FnLock LED to change state
	kselftest/arm64: sve: Do not use non-canonical FFR register value
	drm/msm/disp/dpu1: icc path needs to be set before dpu runtime resume
	x86/build: Turn off -fcf-protection for realmode targets
	block: clear GD_NEED_PART_SCAN later in bdev_disk_changed
	platform/x86: intel_pmc_core: Ignore GBE LTR on Tiger Lake platforms
	ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation
	scsi: target: pscsi: Clean up after failure in pscsi_map_sg()
	selftests/vm: fix out-of-tree build
	ia64: mca: allocate early mca with GFP_ATOMIC
	ia64: fix format strings for err_inject
	cifs: revalidate mapping when we open files for SMB1 POSIX
	cifs: Silently ignore unknown oplock break handle
	io_uring: fix timeout cancel return code
	math: Export mul_u64_u64_div_u64
	tools/resolve_btfids: Build libbpf and libsubcmd in separate directories
	tools/resolve_btfids: Check objects before removing
	tools/resolve_btfids: Set srctree variable unconditionally
	kbuild: Add resolve_btfids clean to root clean target
	kbuild: Do not clean resolve_btfids if the output does not exist
	tools/resolve_btfids: Add /libbpf to .gitignore
	bpf, x86: Validate computation of branch displacements for x86-64
	bpf, x86: Validate computation of branch displacements for x86-32
	init/Kconfig: make COMPILE_TEST depend on !S390
	init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
	Linux 5.10.29

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib3f9484150747de48eca46c69d690830b790418e
2021-04-11 09:11:53 +02:00
Michael Hoyle
1d3b80670f ANDROID: Add GKI_HIDDEN_MM_CONFIGS to support ballooning.
Bug: 183227346
Signed-off-by: Michael Hoyle <mikehoyle@google.com>
Change-Id: I67ab3cd12ee5925a941af2509ec1eef1fac07b86
2021-04-10 13:53:31 -07:00
Ray Chi
92de566762 ANDROID: usb: dwc3: gadget: don't cancel the started requests
Currently, there is an application on Mac that it will send
ClearFeature(halt_ep) request before transfering USB data.

If the device receives the ClearFeature(halt_ep) request, the
started requests would be removed and restart the transfer.
However, userspace services don't know this behavior. The services
will free the requests instead of retry and resend the requests.

It will cause the USB host can't get response so that it will try
to recover by issuing a reset signal.

Finally, it will take the infinite loop.
send reqeust > reset > re-enumeration > send request > reset > ...

To avoid this symptom, this patch will keep the started requests
so that userspace services didn't free the requests.

Bug: 178904115
Bug: 177879761
Signed-off-by: Ray Chi <raychi@google.com>
Change-Id: I52acf48871fd7f86cfcc51fb41c67d21ea895d69
Signed-off-by: Saravana Kannan <saravanak@google.com>
2021-04-10 10:03:50 -07:00
Greg Kroah-Hartman
d8cf82b410 Linux 5.10.29
Tested-by: A. Rabusov <a.rabusov@tum.de>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Tested-by: Hulk Robot <hulkrobot@huawei.com>
Tested-by: Jason Self <jason@bluehome.net>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Link: https://lore.kernel.org/r/20210409095304.818847860@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10 13:36:11 +02:00
Masahiro Yamada
cef13a0437 init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
commit ea29b20a82 upstream.

I read the commit log of the following two:

- bc083a64b6 ("init/Kconfig: make COMPILE_TEST depend on !UML")
- 334ef6ed06 ("init/Kconfig: make COMPILE_TEST depend on !S390")

Both are talking about HAS_IOMEM dependency missing in many drivers.

So, 'depends on HAS_IOMEM' seems the direct, sensible solution to me.

This does not change the behavior of UML. UML still cannot enable
COMPILE_TEST because it does not provide HAS_IOMEM.

The current dependency for S390 is too strong. Under the condition of
CONFIG_PCI=y, S390 provides HAS_IOMEM, hence can enable COMPILE_TEST.

I also removed the meaningless 'default n'.

Link: https://lkml.kernel.org/r/20210224140809.1067582-1-masahiroy@kernel.org
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KP Singh <kpsingh@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Quentin Perret <qperret@google.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10 13:36:11 +02:00
Heiko Carstens
ba02635769 init/Kconfig: make COMPILE_TEST depend on !S390
commit 334ef6ed06 upstream.

While allmodconfig and allyesconfig build for s390 there are also
various bots running compile tests with randconfig, where PCI is
disabled. This reveals that a lot of drivers should actually depend on
HAS_IOMEM.
Adding this to each device driver would be a never ending story,
therefore just disable COMPILE_TEST for s390.

The reasoning is more or less the same as described in
commit bc083a64b6 ("init/Kconfig: make COMPILE_TEST depend on !UML").

Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10 13:36:11 +02:00
Piotr Krysiuk
faa30969f6 bpf, x86: Validate computation of branch displacements for x86-32
commit 26f55a59dc upstream.

The branch displacement logic in the BPF JIT compilers for x86 assumes
that, for any generated branch instruction, the distance cannot
increase between optimization passes.

But this assumption can be violated due to how the distances are
computed. Specifically, whenever a backward branch is processed in
do_jit(), the distance is computed by subtracting the positions in the
machine code from different optimization passes. This is because part
of addrs[] is already updated for the current optimization pass, before
the branch instruction is visited.

And so the optimizer can expand blocks of machine code in some cases.

This can confuse the optimizer logic, where it assumes that a fixed
point has been reached for all machine code blocks once the total
program size stops changing. And then the JIT compiler can output
abnormal machine code containing incorrect branch displacements.

To mitigate this issue, we assert that a fixed point is reached while
populating the output image. This rejects any problematic programs.
The issue affects both x86-32 and x86-64. We mitigate separately to
ease backporting.

Signed-off-by: Piotr Krysiuk <piotras@gmail.com>
Reviewed-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10 13:36:11 +02:00
Piotr Krysiuk
3edb8967d9 bpf, x86: Validate computation of branch displacements for x86-64
commit e4d4d45643 upstream.

The branch displacement logic in the BPF JIT compilers for x86 assumes
that, for any generated branch instruction, the distance cannot
increase between optimization passes.

But this assumption can be violated due to how the distances are
computed. Specifically, whenever a backward branch is processed in
do_jit(), the distance is computed by subtracting the positions in the
machine code from different optimization passes. This is because part
of addrs[] is already updated for the current optimization pass, before
the branch instruction is visited.

And so the optimizer can expand blocks of machine code in some cases.

This can confuse the optimizer logic, where it assumes that a fixed
point has been reached for all machine code blocks once the total
program size stops changing. And then the JIT compiler can output
abnormal machine code containing incorrect branch displacements.

To mitigate this issue, we assert that a fixed point is reached while
populating the output image. This rejects any problematic programs.
The issue affects both x86-32 and x86-64. We mitigate separately to
ease backporting.

Signed-off-by: Piotr Krysiuk <piotras@gmail.com>
Reviewed-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10 13:36:11 +02:00
Stanislav Fomichev
f890246ae7 tools/resolve_btfids: Add /libbpf to .gitignore
[ Upstream commit 90a82b1fa4 ]

This is what I see after compiling the kernel:

 # bpf-next...bpf-next/master
 ?? tools/bpf/resolve_btfids/libbpf/

Fixes: fc6b48f692 ("tools/resolve_btfids: Build libbpf and libsubcmd in separate directories")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210212010053.668700-1-sdf@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Jiri Olsa
76983e2449 kbuild: Do not clean resolve_btfids if the output does not exist
[ Upstream commit 0e1aa629f1 ]

Nathan reported issue with cleaning empty build directory:

  $ make -s O=build distclean
  ../../scripts/Makefile.include:4: *** \
  O=/ho...build/tools/bpf/resolve_btfids does not exist.  Stop.

The problem that tools scripts require existing output
directory, otherwise it fails.

Adding check around the resolve_btfids clean target to
ensure the output directory is in place.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/bpf/20210211124004.1144344-1-jolsa@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Jiri Olsa
0945d67e5d kbuild: Add resolve_btfids clean to root clean target
[ Upstream commit 50d3a3f816 ]

The resolve_btfids tool is used during the kernel build,
so we should clean it on kernel's make clean.

Invoking the the resolve_btfids clean as part of root
'make clean'.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210205124020.683286-5-jolsa@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Jiri Olsa
eff1e04657 tools/resolve_btfids: Set srctree variable unconditionally
[ Upstream commit 7962cb9b64 ]

We want this clean to be called from tree's root Makefile,
which defines same srctree variable and that will screw
the make setup.

We actually do not use srctree being passed from outside,
so we can solve this by setting current srctree value
directly.

Also changing the way how srctree is initialized as suggested
by Andrri.

Also root Makefile does not define the implicit RM variable,
so adding RM initialization.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210205124020.683286-4-jolsa@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Jiri Olsa
f60c918b07 tools/resolve_btfids: Check objects before removing
[ Upstream commit f23130979c ]

We want this clean to be called from tree's root clean
and that one is silent if there's nothing to clean.

Adding check for all object to clean and display CLEAN
messages only if there are objects to remove.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210205124020.683286-3-jolsa@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Jiri Olsa
2497190924 tools/resolve_btfids: Build libbpf and libsubcmd in separate directories
[ Upstream commit fc6b48f692 ]

Setting up separate build directories for libbpf and libpsubcmd,
so it's separated from other objects and we don't get them mixed
in the future.

It also simplifies cleaning, which is now simple rm -rf.

Also there's no need for FEATURE-DUMP.libbpf and bpf_helper_defs.h
files in .gitignore anymore.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210205124020.683286-2-jolsa@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
David S. Miller
2934985086 math: Export mul_u64_u64_div_u64
[ Upstream commit bf45947864 ]

Fixes: f51d7bf1db ("ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Pavel Begunkov
7345d4b2d4 io_uring: fix timeout cancel return code
[ Upstream commit 1ee4160c73 ]

When we cancel a timeout we should emit a sensible return code, like
-ECANCELED but not 0, otherwise it may trick users.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/7b0ad1065e3bd1994722702bd0ba9e7bc9b0683b.1616696997.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Vincent Whitchurch
8f9049e70c cifs: Silently ignore unknown oplock break handle
[ Upstream commit 219481a8f9 ]

Make SMB2 not print out an error when an oplock break is received for an
unknown handle, similar to SMB1.  The debug message which is printed for
these unknown handles may also be misleading, so fix that too.

The SMB2 lease break path is not affected by this patch.

Without this, a program which writes to a file from one thread, and
opens, reads, and writes the same file from another thread triggers the
below errors several times a minute when run against a Samba server
configured with "smb2 leases = no".

 CIFS: VFS: \\192.168.0.1 No task to wake, unknown frame received! NumMids 2
 00000000: 424d53fe 00000040 00000000 00000012  .SMB@...........
 00000010: 00000001 00000000 ffffffff ffffffff  ................
 00000020: 00000000 00000000 00000000 00000000  ................
 00000030: 00000000 00000000 00000000 00000000  ................

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Reviewed-by: Tom Talpey <tom@talpey.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Ronnie Sahlberg
fee111089c cifs: revalidate mapping when we open files for SMB1 POSIX
[ Upstream commit cee8f4f6fc ]

RHBZ: 1933527

Under SMB1 + POSIX, if an inode is reused on a server after we have read and
cached a part of a file, when we then open the new file with the
re-cycled inode there is a chance that we may serve the old data out of cache
to the application.
This only happens for SMB1 (deprecated) and when posix are used.
The simplest solution to avoid this race is to force a revalidate
on smb1-posix open.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Sergei Trofimovich
42498ee672 ia64: fix format strings for err_inject
[ Upstream commit 95d44a470a ]

Fix warning with %lx / u64 mismatch:

  arch/ia64/kernel/err_inject.c: In function 'show_resources':
  arch/ia64/kernel/err_inject.c:62:22: warning:
    format '%lx' expects argument of type 'long unsigned int',
    but argument 3 has type 'u64' {aka 'long long unsigned int'}
     62 |  return sprintf(buf, "%lx", name[cpu]);   \
        |                      ^~~~~~~

Link: https://lkml.kernel.org/r/20210313104312.1548232-1-slyfox@gentoo.org
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:10 +02:00
Sergei Trofimovich
bc30fdd598 ia64: mca: allocate early mca with GFP_ATOMIC
[ Upstream commit f2a419cf49 ]

The sleep warning happens at early boot right at secondary CPU
activation bootup:

    smp: Bringing up secondary CPUs ...
    BUG: sleeping function called from invalid context at mm/page_alloc.c:4942
    in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1
    CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.12.0-rc2-00007-g79e228d0b611-dirty #99
    ..
    Call Trace:
      show_stack+0x90/0xc0
      dump_stack+0x150/0x1c0
      ___might_sleep+0x1c0/0x2a0
      __might_sleep+0xa0/0x160
      __alloc_pages_nodemask+0x1a0/0x600
      alloc_page_interleave+0x30/0x1c0
      alloc_pages_current+0x2c0/0x340
      __get_free_pages+0x30/0xa0
      ia64_mca_cpu_init+0x2d0/0x3a0
      cpu_init+0x8b0/0x1440
      start_secondary+0x60/0x700
      start_ap+0x750/0x780
    Fixed BSP b0 value from CPU 1

As I understand interrupts are not enabled yet and system has a lot of
memory.  There is little chance to sleep and switch to GFP_ATOMIC should
be a no-op.

Link: https://lkml.kernel.org/r/20210315085045.204414-1-slyfox@gentoo.org
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:09 +02:00
Rong Chen
b008489d8b selftests/vm: fix out-of-tree build
[ Upstream commit 19ec368cbc ]

When building out-of-tree, attempting to make target from $(OUTPUT) directory:

  make[1]: *** No rule to make target '$(OUTPUT)/protection_keys.c', needed by '$(OUTPUT)/protection_keys_32'.

Link: https://lkml.kernel.org/r/20210315094700.522753-1-rong.a.chen@intel.com
Signed-off-by: Rong Chen <rong.a.chen@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:09 +02:00
Martin Wilck
47f8bc68ae scsi: target: pscsi: Clean up after failure in pscsi_map_sg()
[ Upstream commit 36fa766faa ]

If pscsi_map_sg() fails, make sure to drop references to already allocated
bios.

Link: https://lore.kernel.org/r/20210323212431.15306-2-mwilck@suse.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:09 +02:00
Yangbo Lu
266d3106ef ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation
[ Upstream commit f51d7bf1db ]

Current calculation for diff of TMR_ADD register value may have
64-bit overflow in this code line, when long type scaled_ppm is
large.

adj *= scaled_ppm;

This patch is to resolve it by using mul_u64_u64_div_u64().

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:09 +02:00
David E. Box
f135b89e28 platform/x86: intel_pmc_core: Ignore GBE LTR on Tiger Lake platforms
[ Upstream commit d1635448f1 ]

Due to a HW limitation, the Latency Tolerance Reporting (LTR) value
programmed in the Tiger Lake GBE controller is not large enough to allow
the platform to enter Package C10, which in turn prevents the platform from
achieving its low power target during suspend-to-idle.  Ignore the GBE LTR
value on Tiger Lake. LTR ignore functionality is currently performed solely
by a debugfs write call. Split out the LTR code into its own function that
can be called by both the debugfs writer and by this work around.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Sasha Neftin <sasha.neftin@intel.com>
Cc: intel-wired-lan@lists.osuosl.org
Reviewed-by: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
Link: https://lore.kernel.org/r/20210319201844.3305399-2-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:09 +02:00
Chris Chiu
037950869b block: clear GD_NEED_PART_SCAN later in bdev_disk_changed
[ Upstream commit 5116784039 ]

The GD_NEED_PART_SCAN is set by bdev_check_media_change to initiate
a partition scan while removing a block device. It should be cleared
after blk_drop_paritions because blk_drop_paritions could return
-EBUSY and then the consequence __blkdev_get has no chance to do
delete_partition if GD_NEED_PART_SCAN already cleared.

It causes some problems on some card readers. Ex. Realtek card
reader 0bda:0328 and 0bda:0158. The device node of the partition
will not disappear after the memory card removed. Thus the user
applications can not update the device mapping correctly.

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1920874
Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210323085219.24428-1-chris.chiu@canonical.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:09 +02:00