ANDROID: Clang LTO: Only set -fvisibility=hidden for x86

Otherwise this upsets ABI monitoring.

Leaf changes summary: 2689 artifacts changed
Changed leaf types summary: 16 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 2472 Changed, 136 Added functions
Removed/Changed/Added variables summary: 0 Removed, 47 Changed, 18 Added variables

136 Added functions:

  [A] 'function int ___pskb_trim(sk_buff*, unsigned int)'
  [A] 'function void __cfi_slowpath(uint64_t, void*, void*)'
  [A] 'function void __dynamic_dev_dbg(_ddebug*, const device*, const char*, ...)'
  [A] 'function void __dynamic_pr_debug(_ddebug*, const char*, ...)'
  [A] 'function ktime_t __hrtimer_get_remaining(const hrtimer*, bool)'
  [A] 'function zoneref* __next_zones_zonelist(zoneref*, zone_type, nodemask_t*)'
  [A] 'function int __nla_validate(const nlattr*, int, int, const nla_policy*, unsigned int, netlink_ext_ack*)'
  [A] 'function void __skb_get_hash(sk_buff*)'
  [A] 'function sk_buff* __skb_gso_segment(sk_buff*, netdev_features_t, bool)'
  [A] 'function int __trace_bputs(unsigned long int, const char*)'
  [A] 'function int __trace_printk(unsigned long int, const char*, ...)'
  [A] 'function int _raw_spin_trylock_bh(raw_spinlock_t*)'
  [A] 'function int add_memory_subsection(int, u64, u64)'
  [A] 'function int alarm_cancel(alarm*)'
  [A] 'function void alarm_init(alarm*, alarmtimer_type, enum alarmtimer_restart (alarm*, typedef ktime_t)*)'
  [A] 'function void alarm_start_relative(alarm*, ktime_t)'
  [A] 'function int bgpio_init(gpio_chip*, device*, unsigned long int, void*, void*, void*, void*, void*, unsigned long int)'
  [A] 'function int bitmap_parselist(const char*, unsigned long int*, int)'
  [A] 'function int bitmap_parselist_user(const char*, unsigned int, unsigned long int*, int)'
  [A] 'function void bt_err(const char*, ...)'
  [A] 'function int cgroup_path_ns(cgroup*, char*, size_t, cgroup_namespace*)'
  [A] 'function void clk_hw_set_rate_range(clk_hw*, unsigned long int, unsigned long int)'
  [A] 'function unsigned int cpufreq_quick_get(unsigned int)'
  [A] 'function s64 cpuidle_governor_latency_req(unsigned int)'
  [A] 'function int cpuidle_register_governor(cpuidle_governor*)'
  [A] 'function int cpupri_find_fitness(cpupri*, task_struct*, cpumask*, typedef bool (task_struct*, int)*)'
  [A] 'function __sum16 csum_ipv6_magic(const in6_addr*, const in6_addr*, __u32, __u8, __wsum)'
  [A] 'function __wsum csum_partial(void*, int, __wsum)'
  [A] 'function dentry* debugfs_create_blob(const char*, umode_t, dentry*, debugfs_blob_wrapper*)'
  [A] 'function dentry* debugfs_create_symlink(const char*, dentry*, const char*)'
  [A] 'function int dev_pm_genpd_remove_notifier(device*)'
  [A] 'function int dev_pm_genpd_set_next_wakeup(device*, ktime_t)'
  [A] 'function int dev_pm_opp_register_notifier(device*, notifier_block*)'
  [A] 'function int dev_pm_opp_unregister_notifier(device*, notifier_block*)'
  [A] 'function int devfreq_add_governor(devfreq_governor*)'
  [A] 'function int devfreq_remove_governor(devfreq_governor*)'
  [A] 'function void device_remove_groups(device*, const attribute_group**)'
  [A] 'function ssize_t device_show_int(device*, device_attribute*, char*)'
  [A] 'function ssize_t device_store_int(device*, device_attribute*, const char*, size_t)'
  [A] 'function backlight_device* devm_backlight_device_register(device*, const char*, device*, void*, const backlight_ops*, const backlight_properties*)'
  [A] 'function int devm_blk_ksm_init(device*, blk_keyslot_manager*, unsigned int)'
  [A] 'function void devm_extcon_dev_unregister(device*, extcon_dev*)'
  [A] 'function usb_phy* devm_usb_get_phy_by_node(device*, device_node*, notifier_block*)'
  [A] 'function bool drm_edid_is_valid(edid*)'
  [A] 'function bool drm_mode_is_420_only(const drm_display_info*, const drm_display_mode*)'
  [A] 'function pid* find_get_pid(pid_t)'
  [A] 'function task_struct* find_task_by_vpid(pid_t)'
  [A] 'function const char* fwnode_get_name(const fwnode_handle*)'
  [A] 'function fwnode_handle* fwnode_get_named_child_node(const fwnode_handle*, const char*)'
  [A] 'function pid* get_task_pid(task_struct*, pid_type)'
  [A] 'function unsigned long int get_unmapped_area(file*, unsigned long int, unsigned long int, unsigned long int, unsigned long int)'
  [A] 'function void getboottime64(timespec64*)'
  [A] 'function zone_type gfp_zone(gfp_t)'
  [A] 'function void gro_cells_destroy(gro_cells*)'
  [A] 'function int gro_cells_init(gro_cells*, net_device*)'
  [A] 'function int gro_cells_receive(gro_cells*, sk_buff*)'
  [A] 'function hci_dev* hci_alloc_dev()'
  [A] 'function void hci_free_dev(hci_dev*)'
  [A] 'function int hci_recv_frame(hci_dev*, sk_buff*)'
  [A] 'function int hci_register_dev(hci_dev*)'
  [A] 'function void hci_unregister_dev(hci_dev*)'
  [A] 'function bool hrtimer_active(const hrtimer*)'
  [A] 'function i2c_client* i2c_new_scanned_device(i2c_adapter*, i2c_board_info*, const unsigned short int*, int (i2c_adapter*, unsigned short int)*)'
  [A] 'function i2c_adapter* i2c_verify_adapter(device*)'
  [A] 'function int input_mt_assign_slots(input_dev*, int*, const input_mt_pos*, int, int)'
  [A] 'function void input_mt_drop_unused(input_dev*)'
  [A] 'function void input_mt_report_finger_count(input_dev*, int)'
  [A] 'function void input_mt_sync_frame(input_dev*)'
  [A] 'function unsigned long int int_sqrt(unsigned long int)'
  [A] 'function int iommu_attach_group(iommu_domain*, iommu_group*)'
  [A] 'function void iommu_detach_group(iommu_domain*, iommu_group*)'
  [A] 'function int iommu_get_msi_cookie(iommu_domain*, dma_addr_t)'
  [A] 'function phys_addr_t iommu_iova_to_phys(iommu_domain*, dma_addr_t)'
  [A] 'function __sum16 ip_compute_csum(void*, int)'
  [A] 'function bool ipv6_ext_hdr(u8)'
  [A] 'function int ipv6_skip_exthdr(const sk_buff*, int, u8*, __be16*)'
  [A] 'function int kstrtoull_from_user(const char*, size_t, unsigned int, long long unsigned int*)'
  [A] 'function llist_node* llist_reverse_order(llist_node*)'
  [A] 'function nlattr* nla_find(const nlattr*, int, int)'
  [A] 'function nlattr* nla_reserve(sk_buff*, int, int)'
  [A] 'function nlattr* nla_reserve_64bit(sk_buff*, int, int, int)'
  [A] 'function int nvmem_cell_read_u32(device*, const char*, u32*)'
  [A] 'function thermal_cooling_device* of_devfreq_cooling_register(device_node*, devfreq*)'
  [A] 'function device_node* of_find_node_by_phandle(phandle)'
  [A] 'function bool of_graph_is_present(const device_node*)'
  [A] 'function int of_platform_device_destroy(device*, void*)'
  [A] 'function int of_property_read_variable_u16_array(const device_node*, const char*, u16*, size_t, size_t)'
  [A] 'function int param_get_ullong(char*, const kernel_param*)'
  [A] 'function task_struct* pick_highest_pushable_task(rq*, int)'
  [A] 'function pid_t pid_nr_ns(pid*, pid_namespace*)'
  [A] 'function void proc_remove(proc_dir_entry*)'
  [A] 'function void proc_set_user(proc_dir_entry*, kuid_t, kgid_t)'
  [A] 'function void ps2_begin_command(ps2dev*)'
  [A] 'function void ps2_cmd_aborted(ps2dev*)'
  [A] 'function int ps2_command(ps2dev*, u8*, unsigned int)'
  [A] 'function void ps2_drain(ps2dev*, size_t, unsigned int)'
  [A] 'function void ps2_end_command(ps2dev*)'
  [A] 'function bool ps2_handle_ack(ps2dev*, u8)'
  [A] 'function bool ps2_handle_response(ps2dev*, u8)'
  [A] 'function void ps2_init(ps2dev*, serio*)'
  [A] 'function int ps2_sendbyte(ps2dev*, u8, unsigned int)'
  [A] 'function int ps2_sliced_command(ps2dev*, u8)'
  [A] 'function void qdisc_reset(Qdisc*)'
  [A] 'function rb_node* rb_last(const rb_root*)'
  [A] 'function int remove_memory_subsection(int, u64, u64)'
  [A] 'function int scsi_device_quiesce(scsi_device*)'
  [A] 'function void scsi_remove_device(scsi_device*)'
  [A] 'function void serio_rescan(serio*)'
  [A] 'function void serio_unregister_child_port(serio*)'
  [A] 'function void show_regs(pt_regs*)'
  [A] 'function void si_meminfo(sysinfo*)'
  [A] 'function void si_swapinfo(sysinfo*)'
  [A] 'function int skb_append_pagefrags(sk_buff*, page*, int, size_t)'
  [A] 'function __wsum skb_checksum(const sk_buff*, int, int, __wsum)'
  [A] 'function void snd_pcm_stream_lock(snd_pcm_substream*)'
  [A] 'function void snd_pcm_stream_unlock(snd_pcm_substream*)'
  [A] 'function void static_key_disable(static_key*)'
  [A] 'function long int strncpy_from_user(char*, const char*, long int)'
  [A] 'function int sysfs_create_bin_file(kobject*, const bin_attribute*)'
  [A] 'function void sysfs_remove_bin_file(kobject*, const bin_attribute*)'
  [A] 'function bool task_may_not_preempt(task_struct*, int)'
  [A] 'function int thermal_zone_get_slope(thermal_zone_device*)'
  [A] 'function ktime_t tick_nohz_get_sleep_length(ktime_t*)'
  [A] 'function unsigned long int total_swapcache_pages()'
  [A] 'function const char* trace_print_flags_seq(trace_seq*, const char*, unsigned long int, const trace_print_flags*)'
  [A] 'function const char* trace_print_hex_seq(trace_seq*, const unsigned char*, int, bool)'
  [A] 'function int tracepoint_probe_register_prio(tracepoint*, void*, void*, int)'
  [A] 'function int ufshcd_shutdown(ufs_hba*)'
  [A] 'function int update_devfreq(devfreq*)'
  [A] 'function void usb_phy_set_charger_current(usb_phy*, unsigned int)'
  [A] 'function void usb_put_dev(usb_device*)'
  [A] 'function usb_role_switch* usb_role_switch_find_by_fwnode(const fwnode_handle*)'
  [A] 'function int vm_insert_page(vm_area_struct*, unsigned long int, page*)'
  [A] 'function unsigned long int vmalloc_nr_pages()'
  [A] 'function bool zone_watermark_ok(zone*, unsigned int, unsigned long int, int, unsigned int)'
  [A] 'function bool zone_watermark_ok_safe(zone*, unsigned int, unsigned long int, int)'

2472 functions with some sub-type change:

  [C] 'function void* PDE_DATA(const inode*)' at generic.c:799:1 has some sub-type changes:
    CRC (modversions) changed from 0x7aae1df7 to 0x9d4e937a

  [C] 'function void __ClearPageMovable(page*)' at compaction.c:138:1 has some sub-type changes:
    CRC (modversions) changed from 0x10923ef0 to 0xbca697b6

  [C] 'function void __SetPageMovable(page*, address_space*)' at compaction.c:130:1 has some sub-type changes:
    CRC (modversions) changed from 0x78273bab to 0xbae6e38b

  ... 2469 omitted; 2472 symbols have only CRC changes

18 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_check_preempt_wakeup'
  [A] 'tracepoint __tracepoint_android_rvh_cpufreq_transition'
  [A] 'tracepoint __tracepoint_android_rvh_pick_next_entity'
  [A] 'tracepoint __tracepoint_android_rvh_sched_balance_rt'
  [A] 'tracepoint __tracepoint_android_rvh_select_task_rq_rt'
  [A] 'tracepoint __tracepoint_android_vh_allow_domain_state'
  [A] 'tracepoint __tracepoint_android_vh_ipi_stop'
  [A] 'tracepoint __tracepoint_android_vh_printk_hotplug'
  [A] 'tracepoint __tracepoint_android_vh_timer_calc_index'
  [A] 'tracepoint __tracepoint_cpu_frequency_limits'
  [A] 'tracepoint __tracepoint_ipi_entry'
  [A] 'tracepoint __tracepoint_ipi_raise'
  [A] 'tracepoint __tracepoint_irq_handler_entry'
  [A] 'tracepoint __tracepoint_sched_switch'
  [A] 'device_type i2c_client_type'
  [A] 'int overflowuid'
  [A] 'atomic_long_t vm_node_stat[38]'
  [A] 'atomic_long_t vm_zone_stat[12]'

47 Changed variables:

  [C] 'pglist_data contig_page_data' was changed at memblock.c:96:1:
    CRC (modversions) changed from 0xdeb74410 to 0x17ba9562
    type of variable changed:
      type size hasn't changed
      1 data member insertion:
        'deferred_split pglist_data::deferred_split_queue', at offset 54336 (in bits) at mmzone.h:828:1
      there are data member changes:
        2 ('lruvec pglist_data::__lruvec' .. 'unsigned long int pglist_data::flags') offsets changed (by +256 bits)
      2529 impacted interfaces

  [C] 'rq runqueues' was changed at core.c:51:1:
    CRC (modversions) changed from 0x7d8ddb7c to 0xa7379acd
    type of variable changed:
      type size hasn't changed
      1 data member insertion:
        'ktime_t rq::hrtick_time', at offset 25344 (in bits) at sched.h:1029:1
      there are data member changes:
        11 ('sched_info rq::rq_sched_info' .. 'u64 rq::android_vendor_data1[96]') offsets changed (by +64 bits)
      2529 impacted interfaces

  [C] 'bus_type amba_bustype' was changed at bus.c:215:1:
    CRC (modversions) changed from 0xa38da620 to 0xca23025

  [C] 'const clk_ops clk_fixed_factor_ops' was changed at clk-fixed-factor.c:60:1:
    CRC (modversions) changed from 0x6d350258 to 0x96009648

  [C] 'const clk_ops clk_fixed_rate_ops' was changed at clk-fixed-rate.c:46:1:
    CRC (modversions) changed from 0x6a810889 to 0xda835cdb

  ... 42 omitted; 45 symbols have only CRC changes

'enum cpuhp_state at cpuhotplug.h:25:1' changed:
  type size hasn't changed
  1 enumerator insertion:
    'cpuhp_state::CPUHP_AP_DTPM_CPU_ONLINE' value '215'
  2 enumerator changes:
    'cpuhp_state::CPUHP_AP_ACTIVE' from value '215' to '216' at cpuhotplug.h:25:1
    'cpuhp_state::CPUHP_ONLINE' from value '216' to '217' at cpuhotplug.h:25:1
  5 impacted interfaces
'struct address_space at fs.h:451:1' changed:
  type size changed from 1344 to 1408 (in bits)
  1 data member insertion:
    'atomic_t address_space::nr_thps', at offset 256 (in bits) at fs.h:458:1
  there are data member changes:
    11 ('rb_root_cached address_space::i_mmap' .. 'void* address_space::private_data') offsets changed (by +64 bits)
  2529 impacted interfaces

'struct amba_driver at bus.h:76:1' changed:
  type size hasn't changed
  there are data member changes:
    type 'int (amba_device*)*' of 'amba_driver::remove' changed:
      pointer type changed from: 'int (amba_device*)*' to: 'void (amba_device*)*'
  2 impacted interfaces

'struct block_device at blk_types.h:22:1' changed:
  type size changed from 1472 to 1536 (in bits)
  1 data member insertion:
    'super_block* block_device::bd_fsfreeze_sb', at offset 1472 (in bits) at blk_types.h:49:1
  2529 impacted interfaces

'struct drm_crtc_helper_funcs at drm_modeset_helper_vtables.h:61:1' changed (indirectly):
  type size hasn't changed
  there are data member changes:
    type 'int (drm_crtc*, drm_framebuffer*, int, int, enum mode_set_atomic)*' of 'drm_crtc_helper_funcs::mode_set_base_atomic' changed:
      pointer type changed from: 'int (drm_crtc*, drm_framebuffer*, int, int, enum mode_set_atomic)*' to: 'int (drm_crtc*, drm_framebuffer*, int, int, enum mode_set_atomic)*'
  246 impacted interfaces

'struct em_perf_domain at energy_model.h:43:1' changed:
  type size hasn't changed
  1 data member insertion:
    'int em_perf_domain::milliwatts', at offset 96 (in bits) at energy_model.h:48:1
  2529 impacted interfaces

'struct inode at fs.h:610:1' changed (indirectly):
  type size changed from 4800 to 4864 (in bits)
  there are data member changes:
    type 'struct address_space' of 'inode::i_data' changed, as reported earlier
    'list_head inode::i_devices' offset changed (by +64 bits)
    while looking at anonymous data member 'union {pipe_inode_info* i_pipe; block_device* i_bdev; cdev* i_cdev; char* i_link; unsigned int i_dir_seq;}':
    the internal name of that anonymous data member changed from:
     __anonymous_union__51
    to:
     __anonymous_union__27
     This is usually due to an anonymous member type being added or removed from the containing type
    and offset changed from 4416 to 4480 (in bits) (by +64 bits)
    6 ('__u32 inode::i_generation' .. 'void* inode::i_private') offsets changed (by +64 bits)
  2529 impacted interfaces

'struct module at module.h:366:1' changed:
  type size hasn't changed
  1 data member insertion:
    'cfi_check_fn module::cfi_check', at offset 1920 (in bits) at module.h:389:1
  there are data member changes:
    15 ('mutex module::param_lock' .. 'int ()* module::init') offsets changed (by +64 bits)
  2529 impacted interfaces

'struct pglist_data at mmzone.h:728:1' changed:
  details were reported earlier

'struct regulator_desc at driver.h:313:1' changed:
  type size changed from 2240 to 2304 (in bits)
  1 data member insertion:
    'bool regulator_desc::of_match_full_name', at offset 192 (in bits) at driver.h:319:1
  there are data member changes:
    52 ('const char* regulator_desc::regulators_node' .. 'unsigned int (unsigned int)* regulator_desc::of_map_mode') offsets changed (by +64 bits)
  32 impacted interfaces

'struct rq at sched.h:897:1' changed:
  details were reported earlier

'struct tty_ldisc_ops at tty_ldisc.h:175:1' changed:
  type size hasn't changed
  there are data member changes:
    type 'typedef ssize_t (tty_struct*, file*, unsigned char*, typedef size_t)*' of 'tty_ldisc_ops::read' changed:
      pointer type changed from: 'typedef ssize_t (tty_struct*, file*, unsigned char*, typedef size_t)*' to: 'typedef ssize_t (tty_struct*, file*, unsigned char*, typedef size_t, void**, unsigned long int)*'
  27 impacted interfaces

'struct ufs_hba_variant_ops at ufshcd.h:301:1' changed:
  type size changed from 1728 to 1408 (in bits)
  5 data member deletions:
    'int (ufs_hba*, ufshcd_lrb*, unsigned int)* ufs_hba_variant_ops::fill_prdt', at offset 1408 (in bits) at ufshcd.h:335:1
    'int (ufs_hba*, request*, ufshcd_lrb*)* ufs_hba_variant_ops::prepare_command', at offset 1472 (in bits) at ufshcd.h:337:1
    'int (ufs_hba*)* ufs_hba_variant_ops::update_sysfs', at offset 1536 (in bits) at ufshcd.h:339:1
    'void (ufs_hba*, ufshcd_lrb*)* ufs_hba_variant_ops::send_command', at offset 1600 (in bits) at ufshcd.h:340:1
    'void (ufs_hba*, ufshcd_lrb*)* ufs_hba_variant_ops::compl_command', at offset 1664 (in bits) at ufshcd.h:341:1
  15 impacted interfaces

'struct vm_area_struct at mm_types.h:306:1' changed (indirectly):
  type size changed from 1536 to 1600 (in bits)
  there are data member changes:
    'seqcount_t vm_area_struct::vm_sequence' offset changed (by +64 bits)
    type 'struct vm_userfaultfd_ctx' of 'vm_area_struct::vm_userfaultfd_ctx' changed:
      type size changed from 0 to 64 (in bits)
      1 data member insertion:
        'userfaultfd_ctx* vm_userfaultfd_ctx::ctx', at offset 0 (in bits) at mm_types.h:293:1
      2529 impacted interfaces
    'atomic_t vm_area_struct::vm_ref_count' offset changed (by +64 bits)
  2529 impacted interfaces

'struct vm_userfaultfd_ctx at mm_types.h:297:1' changed:
  details were reported earlier

'struct zone at mmzone.h:450:1' changed:
  type size hasn't changed
  1 data member insertion:
    'unsigned long int zone::cma_pages', at offset 960 (in bits) at mmzone.h:529:1
  there are data member changes:
    4 ('const char* zone::name' .. 'int zone::initialized') offsets changed (by +64 bits)
  2529 impacted interfaces

Bug: 182194803
Fixes: ba01e93b417a58 ("FROMLIST: kbuild: add support for Clang LTO")
Change-Id: If6011ad739ecccd23a92cfa2f9fd43084f9a0b4f
Signed-off-by: Giuliano Procida <gprocida@google.com>
2 files changed
tree: c8f3ab2ca83cbfc5c251a81dde9acb4ec5db84cf
  1. android/
  2. arch/
  3. block/
  4. certs/
  5. crypto/
  6. Documentation/
  7. drivers/
  8. fs/
  9. include/
  10. init/
  11. ipc/
  12. kernel/
  13. lib/
  14. LICENSES/
  15. mm/
  16. net/
  17. samples/
  18. scripts/
  19. security/
  20. sound/
  21. tools/
  22. usr/
  23. virt/
  24. .clang-format
  25. .cocciconfig
  26. .get_maintainer.ignore
  27. .gitattributes
  28. .gitignore
  29. .mailmap
  30. build.config.aarch64
  31. build.config.allmodconfig
  32. build.config.allmodconfig.aarch64
  33. build.config.allmodconfig.arm
  34. build.config.allmodconfig.x86_64
  35. build.config.amlogic
  36. build.config.arm
  37. build.config.common
  38. build.config.db845c
  39. build.config.gki
  40. build.config.gki-debug.aarch64
  41. build.config.gki-debug.x86_64
  42. build.config.gki.aarch64
  43. build.config.gki.x86_64
  44. build.config.gki_kasan
  45. build.config.gki_kasan.aarch64
  46. build.config.gki_kasan.x86_64
  47. build.config.gki_kprobes
  48. build.config.gki_kprobes.aarch64
  49. build.config.gki_kprobes.x86_64
  50. build.config.hikey960
  51. build.config.x86_64
  52. COPYING
  53. CREDITS
  54. Kbuild
  55. Kconfig
  56. MAINTAINERS
  57. Makefile
  58. README
  59. README.md
README.md

How do I submit patches to Android Common Kernels

  1. BEST: Make all of your changes to upstream Linux. If appropriate, backport to the stable releases. These patches will be merged automatically in the corresponding common kernels. If the patch is already in upstream Linux, post a backport of the patch that conforms to the patch requirements below.

    • Do not send patches upstream that contain only symbol exports. To be considered for upstream Linux, additions of EXPORT_SYMBOL_GPL() require an in-tree modular driver that uses the symbol -- so include the new driver or changes to an existing driver in the same patchset as the export.
    • When sending patches upstream, the commit message must contain a clear case for why the patch is needed and beneficial to the community. Enabling out-of-tree drivers or functionality is not not a persuasive case.
  2. LESS GOOD: Develop your patches out-of-tree (from an upstream Linux point-of-view). Unless these are fixing an Android-specific bug, these are very unlikely to be accepted unless they have been coordinated with kernel-team@android.com. If you want to proceed, post a patch that conforms to the patch requirements below.

Common Kernel patch requirements

  • All patches must conform to the Linux kernel coding standards and pass script/checkpatch.pl
  • Patches shall not break gki_defconfig or allmodconfig builds for arm, arm64, x86, x86_64 architectures (see https://source.android.com/setup/build/building-kernels)
  • If the patch is not merged from an upstream branch, the subject must be tagged with the type of patch: UPSTREAM:, BACKPORT:, FROMGIT:, FROMLIST:, or ANDROID:.
  • All patches must have a Change-Id: tag (see https://gerrit-review.googlesource.com/Documentation/user-changeid.html)
  • If an Android bug has been assigned, there must be a Bug: tag.
  • All patches must have a Signed-off-by: tag by the author and the submitter

Additional requirements are listed below based on patch type

Requirements for backports from mainline Linux: UPSTREAM:, BACKPORT:

  • If the patch is a cherry-pick from Linux mainline with no changes at all
    • tag the patch subject with UPSTREAM:.
    • add upstream commit information with a (cherry picked from commit ...) line
    • Example:
      • if the upstream commit message is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>
  • then Joe Smith would upload the patch for the common kernel as
        UPSTREAM: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry picked from commit c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch requires any changes from the upstream version, tag the patch with BACKPORT: instead of UPSTREAM:.
    • use the same tags as UPSTREAM:
    • add comments about the changes under the (cherry picked from commit ...) line
    • Example:
        BACKPORT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry picked from commit c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        [joe: Resolved minor conflict in drivers/foo/bar.c ]
        Signed-off-by: Joe Smith <joe.smith@foo.org>

Requirements for other backports: FROMGIT:, FROMLIST:,

  • If the patch has been merged into an upstream maintainer tree, but has not yet been merged into Linux mainline
    • tag the patch subject with FROMGIT:
    • add info on where the patch came from as (cherry picked from commit <sha1> <repo> <branch>). This must be a stable maintainer branch (not rebased, so don't use linux-next for example).
    • if changes were required, use BACKPORT: FROMGIT:
    • Example:
      • if the commit message in the maintainer tree is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>
  • then Joe Smith would upload the patch for the common kernel as
        FROMGIT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        (cherry picked from commit 878a2fd9de10b03d11d2f622250285c7e63deace
         https://git.kernel.org/pub/scm/linux/kernel/git/foo/bar.git test-branch)
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch has been submitted to LKML, but not accepted into any maintainer tree
    • tag the patch subject with FROMLIST:
    • add a Link: tag with a link to the submittal on lore.kernel.org
    • add a Bug: tag with the Android bug (required for patches not accepted into a maintainer tree)
    • if changes were required, use BACKPORT: FROMLIST:
    • Example:
        FROMLIST: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Link: https://lore.kernel.org/lkml/20190619171517.GA17557@someone.com/
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>

Requirements for Android-specific patches: ANDROID:

  • If the patch is fixing a bug to Android-specific code
    • tag the patch subject with ANDROID:
    • add a Fixes: tag that cites the patch with the bug
    • Example:
        ANDROID: fix android-specific bug in foobar.c

        This is the detailed description of the important fix

        Fixes: 1234abcd2468 ("foobar: add cool feature")
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch is a new feature
    • tag the patch subject with ANDROID:
    • add a Bug: tag with the Android bug (required for android-specific features)