Merge branch 'android12-5.10' into `android12-5.10-lts`

Sync up with android12-5.10 for the following commits:

2c152aa32942 UPSTREAM: f2fs: reduce the scope of setting fsck tag when de->name_len is zero
c29dd368efc6 ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus
428d0bb76207 ANDROID: Add initial ASUS symbol list
87a74496ed4a ANDROID: configfs: add proper module namespace marking
b7a6c15a6f06 ANDROID: Configure out the macros in android_kabi and android_vendor
bdc772adbd2d ANDROID: kernel: fix debug_kinfo set twice crash issue
d483eed85ffb ANDROID: GKI: set vfs-only exports into their own namespace
27fc5a7c6972 UPSTREAM: net/packet: rx_owner_map depends on pg_vec
f70ea63f3be1 ANDROID: GKI: Update symbols to symbol list
a593acdae897 FROMLIST: module.h: allow #define strings to work with MODULE_IMPORT_NS
eb171b4cbe4e FROMLIST: export: fix string handling of namespace in EXPORT_SYMBOL_NS
05c23b7a5038 ANDROID: vendor_hooks: Add hooks for binder
e99926fdfa95 ANDROID: mm/oom_kill: allow process_mrelease reclaim memory in parallel with exit_mmap
f4f2c619d5fd FROMLIST: mm/oom_kill: allow process_mrelease to run under mmap_lock protection
2452622293ff FROMLIST: mm: protect free_pgtables with mmap_lock write lock in exit_mmap
fd7af95538eb UPSTREAM: mm/oom_kill.c: prevent a race between process_mrelease and exit_mmap
fe50dcab7ae2 UPSTREAM: mm: wire up syscall process_mrelease
7fc3ac49686b UPSTREAM: mm: introduce process_mrelease system call
ac4488815518 Revert "FROMGIT: mm: improve mprotect(R|W) efficiency on pages referenced once"
3a624c9ccdd7 ANDROID: fips140: add show_invalid_inputs command to fips140_lab_util
a481d4352121 ANDROID: fips140: refactor and rename fips140_lab_test
d4b5ca56b54f ANDROID: GKI: add lenovo symbol list
47874cc690dc ANDROID: abi_gki_aarch64_qcom: Add rproc_set_firmware
c41767a8ec8c UPSTREAM: remoteproc: Add a rproc_set_firmware() API
28d62c68d1de FROMGIT: iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure
99ad26127317 UPSTREAM: sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
282a4de8f00f UPSTREAM: sctp: validate chunk size in __rcv_asconf_lookup
fef7dba3a703 UPSTREAM: bpf: Fix integer overflow in prealloc_elems_and_freelist()
893425f54561 ANDROID: GKI: Update symbol list
cef0df221871 ANDROID: ABI: update allowed list for galaxy
a7ab784f601a ANDROID: vendor_hooks: Add hooks for futex
84fc3abca0ae ANDROID: dma-contiguous: Add tracehook to allow subpage allocations in dma_alloc_contiguous
d94655c43e7c ANDROID: Update the ABI xml and symbol list
414c32d38e90 UPSTREAM: ALSA: memalloc: Align buffer allocations in page size
75617df5b35d ANDROID: Fix mmu_notifier_trylock definition for !CONFIG_MMU_NOTIFIER config
7531e636614d FROMGIT: USB: gadget: bRequestType is a bitfield, not a enum
70c9301d9c4b ANDROID: qcom: Add flush_delayed_fput to ABI
5d8520b5572a ANDROID: fix ABI breakage caused by mm_struct->mmu_notifier_lock addition
a4d26b9a4b57 ANDROID: fix ABI breakage caused by percpu_rw_semaphore changes
6971350406a3 ANDROID: fix mmu_notifier race caused by not taking mmap_lock during SPF
2fc2c66b9ce4 ANDROID: percpu-rwsem: enable percpu_sem destruction in atomic context
f3f87608d8d4 FROMLIST: virtio_mmio: pm: Add notification handlers for restore and freeze
9180348b91c0 FROMLIST: virtio: do not reset stateful devices on resume
392cb940f6a9 FROMGIT: f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
ddd9e0150453 UPSTREAM: mm, slub: fix incorrect memcg slab count for bulk free
82ac5b0b1da4 UPSTREAM: mm, slub: fix potential use-after-free in slab_debugfs_fops
e07a663f5db2 UPSTREAM: mm, slub: fix potential memoryleak in kmem_cache_open()
cd02f347abe7 UPSTREAM: mm, slub: fix mismatch between reconstructed freelist depth and cnt
6b6725f77d50 UPSTREAM: mm, slub: fix two bugs in slab_debug_trace_open()
791f85d16ddd UPSTREAM: mm, slub: allocate private object map for debugfs listings
1260b47d4fbb FROMGIT: dma-buf: remove restriction of IOCTL:DMA_BUF_SET_NAME
e80be54e4b60 UPSTREAM: usb: dwc3: core: balance phy init and exit
89137e0047fe UPSTREAM: xhci: Fix failure to give back some cached cancelled URBs.
f37b6d79f8d8 ANDROID: mm/memory_hotplug: Don't special case memory_block_size_bytes
8b7ffd60a56f UPSTREAM: usb: gadget: uvc: fix multiple opens
ae22ebebbbf0 UPSTREAM: aio: fix use-after-free due to missing POLLFREE handling
b9c8788830ab UPSTREAM: aio: keep poll requests on waitqueue until completed
f9651768846a UPSTREAM: signalfd: use wake_up_pollfree()
49744a390d51 UPSTREAM: binder: use wake_up_pollfree()
e50fe1de2f33 UPSTREAM: wait: add wake_up_pollfree()
53afb231f54a UPSTREAM: USB: gadget: zero allocate endpoint 0 buffers
593309a37781 BACKPORT: scsi: ufs: Improve SCSI abort handling further
21949c429ab2 FROMGIT: scsi: ufs: Introduce ufshcd_release_scsi_cmd()
d600bdedac4c FROMGIT: scsi: ufs: Remove the 'update_scaling' local variable
5f9614157c2d UPSTREAM: scsi: ufs: core: Fix another task management completion race
76760a995c26 BACKPORT: scsi: ufs: core: Fix task management completion timeout race
dab2a8a28842 ANDROID: qcom: Add android_rvh_do_ptrauth_fault to ABI
b4604acd52a6 UPSTREAM: USB: gadget: detect too-big endpoint 0 requests
2d6a43c0364d ANDROID: ABI: Add symbols used by frame buffer driver
183905923f62 UPSTREAM: xhci: Add bus number to some debug messages
5b15c955a64d UPSTREAM: xhci: Add additional dynamic debug to follow URBs in cancel and error cases.
f4cbe349566c UPSTREAM: Revert "USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set"
c23b0e7c47f5 UPSTREAM: xhci: Fix failure to give back some cached cancelled URBs.
7320fb1abd44 UPSTREAM: HID: check for valid USB device for many HID drivers
e98c96b8b8a5 UPSTREAM: HID: wacom: fix problems when device is not a valid USB device
5a72ef56c876 UPSTREAM: HID: bigbenff: prevent null pointer dereference
7b8a19b91787 UPSTREAM: HID: add USB_HID dependancy on some USB HID drivers
8219b106a380 UPSTREAM: HID: add USB_HID dependancy to hid-chicony
a4909c90b75d UPSTREAM: HID: add USB_HID dependancy to hid-prodikeys
ddea17081f80 UPSTREAM: HID: add hid_is_usb() function to make it simpler for USB detection
81b6ea435ee8 FROMGIT: clk: Don't parent clks until the parent is fully registered
78ea29e5703b UPSTREAM: mm/gup: remove the vma allocation from gup_longterm_locked()
709fde7c612f BACKPORT: usb: typec: tcpm: Wait in SNK_DEBOUNCED until disconnect
ea4a92c6af78 ANDROID: ABI: Add iio_write_channel_raw symbol
f803f248dde6 ANDROID: GKI: Update symbols to symbol list
672d51b2a7fa UPSTREAM: ASoC: dapm: use component prefix when checking widget names
686cd3b2d83f ANDROID: ABI: Add symbols used by clocksource driver
80c1cef2d150 ANDROID: GKI: Export clocksource_mmio_init
84881c68b172 ANDROID: GKI: Export sched_clock_register
9e5446d7de86 FROMGIT: f2fs: show number of pending discard commands
28de74186185 ANDROID: workqueue: export symbol of the function wq_worker_comm()
71f00d64c165 ANDROID: GKI: Update symbols to symbol list
05aa93d251c2 ANDROID: vendor_hooks: Add hooks for binder proc transaction

Also update the .xml file for the following new symbols that are now
being tracked:

Leaf changes summary: 165 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 154 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 11 Added variables

154 Added functions:

  [A] 'function void __bforget(buffer_head*)'
  [A] 'function ssize_t __blockdev_direct_IO(kiocb*, inode*, block_device*, iov_iter*, get_block_t*, dio_iodone_t*, dio_submit_t*, int)'
  [A] 'function buffer_head* __bread_gfp(block_device*, sector_t, unsigned int, gfp_t)'
  [A] 'function void __breadahead(block_device*, sector_t, unsigned int)'
  [A] 'function void __brelse(buffer_head*)'
  [A] 'function void __cancel_dirty_page(page*)'
  [A] 'function void __cleancache_invalidate_inode(address_space*)'
  [A] 'function void __filemap_set_wb_err(address_space*, int)'
  [A] 'function void __insert_inode_hash(inode*, unsigned long int)'
  [A] 'function void __mark_inode_dirty(inode*, int)'
  [A] 'function void __pagevec_release(pagevec*)'
  [A] 'function void __remove_inode_hash(inode*)'
  [A] 'function int __set_page_dirty_buffers(page*)'
  [A] 'function int __set_page_dirty_nobuffers(page*)'
  [A] 'function int __test_set_page_writeback(page*, bool)'
  [A] 'function int __traceiter_android_vh_binder_free_proc(void*, binder_proc*)'
  [A] 'function int __traceiter_android_vh_binder_has_work_ilocked(void*, binder_thread*, bool, int*)'
  [A] 'function int __traceiter_android_vh_binder_looper_state_registered(void*, binder_thread*, binder_proc*)'
  [A] 'function int __traceiter_android_vh_binder_proc_transaction_end(void*, task_struct*, task_struct*, task_struct*, unsigned int, bool, bool)'
  [A] 'function int __traceiter_android_vh_binder_read_done(void*, binder_proc*, binder_thread*)'
  [A] 'function int __traceiter_android_vh_binder_thread_read(void*, list_head**, binder_proc*, binder_thread*)'
  [A] 'function int __traceiter_android_vh_binder_thread_release(void*, binder_proc*, binder_thread*)'
  [A] 'function int __traceiter_android_vh_futex_sleep_start(void*, task_struct*)'
  [A] 'function int __traceiter_block_bio_remap(void*, request_queue*, bio*, dev_t, sector_t)'
  [A] 'function int add_to_page_cache_locked(page*, address_space*, unsigned long int, gfp_t)'
  [A] 'function bio* bio_split(bio*, int, gfp_t, bio_set*)'
  [A] 'function wait_queue_head* bit_waitqueue(void*, int)'
  [A] 'function blk_plug_cb* blk_check_plugged(blk_plug_cb_fn, void*, int)'
  [A] 'function void blk_queue_max_write_same_sectors(request_queue*, unsigned int)'
  [A] 'function int blkdev_issue_discard(block_device*, sector_t, sector_t, gfp_t, unsigned long int)'
  [A] 'function void block_invalidatepage(page*, unsigned int, unsigned int)'
  [A] 'function int block_is_partially_uptodate(page*, unsigned long int, unsigned long int)'
  [A] 'function int buffer_migrate_page(address_space*, page*, page*, migrate_mode)'
  [A] 'function bool capable_wrt_inode_uidgid(const inode*, int)'
  [A] 'function void clean_bdev_aliases(block_device*, sector_t, sector_t)'
  [A] 'function void clear_inode(inode*)'
  [A] 'function int clear_page_dirty_for_io(page*)'
  [A] 'function int clk_set_duty_cycle(clk*, unsigned int, unsigned int)'
  [A] 'function int clocksource_mmio_init(void*, const char*, unsigned long int, int, unsigned int, typedef u64 (clocksource*)*)'
  [A] 'function u64 clocksource_mmio_readl_up(clocksource*)'
  [A] 'function void create_empty_buffers(page*, unsigned long int, unsigned long int)'
  [A] 'function int current_umask()'
  [A] 'function dentry* d_add_ci(dentry*, inode*, qstr*)'
  [A] 'function void d_instantiate(dentry*, inode*)'
  [A] 'function dentry* d_obtain_alias(inode*)'
  [A] 'function dentry* d_splice_alias(inode*, dentry*)'
  [A] 'function void delete_from_page_cache(page*)'
  [A] 'function void disk_stack_limits(gendisk*, block_device*, sector_t)'
  [A] 'function void drop_nlink(inode*)'
  [A] 'function void end_buffer_write_sync(buffer_head*, int)'
  [A] 'function void end_page_writeback(page*)'
  [A] 'function errseq_t errseq_set(errseq_t*, int)'
  [A] 'function int fb_get_options(const char*, char**)'
  [A] 'function int fiemap_fill_next_extent(fiemap_extent_info*, u64, u64, u64, u32)'
  [A] 'function int fiemap_prep(inode*, fiemap_extent_info*, u64, u64*, u32)'
  [A] 'function int file_remove_privs(file*)'
  [A] 'function int file_update_time(file*)'
  [A] 'function int file_write_and_wait_range(file*, loff_t, loff_t)'
  [A] 'function vm_fault_t filemap_fault(vm_fault*)'
  [A] 'function int filemap_fdatawait_range(address_space*, loff_t, loff_t)'
  [A] 'function int filemap_fdatawrite(address_space*)'
  [A] 'function int filemap_flush(address_space*)'
  [A] 'function int filemap_write_and_wait_range(address_space*, loff_t, loff_t)'
  [A] 'function file* filp_open(const char*, int, umode_t)'
  [A] 'function void flush_delayed_fput()'
  [A] 'function int freq_qos_remove_notifier(freq_constraints*, freq_qos_req_type, notifier_block*)'
  [A] 'function int generic_error_remove_page(address_space*, page*)'
  [A] 'function ssize_t generic_file_direct_write(kiocb*, iov_iter*)'
  [A] 'function int generic_file_mmap(file*, vm_area_struct*)'
  [A] 'function int generic_file_open(inode*, file*)'
  [A] 'function ssize_t generic_file_splice_read(file*, loff_t*, pipe_inode_info*, size_t, unsigned int)'
  [A] 'function void generic_fillattr(inode*, kstat*)'
  [A] 'function ssize_t generic_read_dir(file*, char*, size_t, loff_t*)'
  [A] 'function page* grab_cache_page_write_begin(address_space*, unsigned long int, unsigned int)'
  [A] 'function inode* iget5_locked(super_block*, unsigned long int, int (inode*, void*)*, int (inode*, void*)*, void*)'
  [A] 'function inode* igrab(inode*)'
  [A] 'function void ihold(inode*)'
  [A] 'function int iio_write_channel_raw(iio_channel*, int)'
  [A] 'function inode* ilookup5(super_block*, unsigned long int, int (inode*, void*)*, void*)'
  [A] 'function int in_group_p(kgid_t)'
  [A] 'function void inc_nlink(inode*)'
  [A] 'function void init_special_inode(inode*, umode_t, dev_t)'
  [A] 'function void inode_dio_wait(inode*)'
  [A] 'function void inode_init_once(inode*)'
  [A] 'function void inode_init_owner(inode*, const inode*, umode_t)'
  [A] 'function int inode_newsize_ok(const inode*, loff_t)'
  [A] 'function void inode_set_flags(inode*, unsigned int, unsigned int)'
  [A] 'function void io_schedule()'
  [A] 'function void iov_iter_advance(iov_iter*, size_t)'
  [A] 'function unsigned long int iov_iter_alignment(const iov_iter*)'
  [A] 'function size_t iov_iter_copy_from_user_atomic(page*, iov_iter*, unsigned long int, size_t)'
  [A] 'function int iov_iter_fault_in_readable(iov_iter*, size_t)'
  [A] 'function ssize_t iov_iter_get_pages(iov_iter*, page**, size_t, unsigned int, size_t*)'
  [A] 'function size_t iov_iter_single_seg_count(const iov_iter*)'
  [A] 'function bool is_bad_inode(inode*)'
  [A] 'function ssize_t iter_file_splice_write(pipe_inode_info*, file*, loff_t*, size_t, unsigned int)'
  [A] 'function ino_t iunique(super_block*, ino_t)'
  [A] 'function void kill_block_super(super_block*)'
  [A] 'function void ll_rw_block(int, int, int, buffer_head**)'
  [A] 'function nls_table* load_nls(char*)'
  [A] 'function nls_table* load_nls_default()'
  [A] 'function void lru_cache_add(page*)'
  [A] 'function void make_bad_inode(inode*)'
  [A] 'function void mark_buffer_async_write(buffer_head*)'
  [A] 'function void mark_buffer_dirty(buffer_head*)'
  [A] 'function void mark_buffer_write_io_error(buffer_head*)'
  [A] 'function void mark_page_accessed(page*)'
  [A] 'function void mnt_drop_write_file(file*)'
  [A] 'function int mnt_want_write_file(file*)'
  [A] 'function dentry* mount_bdev(file_system_type*, int, const char*, void*, int (super_block*, void*, int)*)'
  [A] 'function void mpage_readahead(readahead_control*, get_block_t*)'
  [A] 'function int mpage_readpage(page*, get_block_t*)'
  [A] 'function int notify_change(dentry*, iattr*, inode**)'
  [A] 'function unsigned long int page_cache_next_miss(address_space*, unsigned long int, unsigned long int)'
  [A] 'function unsigned long int page_cache_prev_miss(address_space*, unsigned long int, unsigned long int)'
  [A] 'function bool page_mapped(page*)'
  [A] 'function int page_mkclean(page*)'
  [A] 'function void page_zero_new_buffers(page*, unsigned int, unsigned int)'
  [A] 'function page* pagecache_get_page(address_space*, unsigned long int, int, gfp_t)'
  [A] 'function unsigned int pagevec_lookup_range(pagevec*, address_space*, unsigned long int*, unsigned long int)'
  [A] 'function unsigned int pagevec_lookup_range_tag(pagevec*, address_space*, unsigned long int*, unsigned long int, xa_mark_t)'
  [A] 'function void put_pages_list(list_head*)'
  [A] 'function gfp_t readahead_gfp_mask(address_space*)'
  [A] 'function int redirty_page_for_writepage(writeback_control*, page*)'
  [A] 'function int rproc_set_firmware(rproc*, const char*)'
  [A] 'function int sb_min_blocksize(super_block*, int)'
  [A] 'function int sb_set_blocksize(super_block*, int)'
  [A] 'function void sched_clock_register(typedef u64 ()*, int, unsigned long int)'
  [A] 'function int security_inode_init_security(inode*, inode*, const qstr*, const initxattrs, void*)'
  [A] 'function void set_nlink(inode*, unsigned int)'
  [A] 'function int setattr_prepare(dentry*, iattr*)'
  [A] 'function blk_qc_t submit_bio_noacct(bio*)'
  [A] 'function int sync_dirty_buffer(buffer_head*)'
  [A] 'function int sync_filesystem(super_block*)'
  [A] 'function int sync_inode_metadata(inode*, int)'
  [A] 'function void tag_pages_for_writeback(address_space*, unsigned long int, unsigned long int)'
  [A] 'function timespec64 timestamp_truncate(timespec64, inode*)'
  [A] 'function void touch_atime(const path*)'
  [A] 'function void truncate_inode_pages(address_space*, loff_t)'
  [A] 'function void truncate_inode_pages_final(address_space*)'
  [A] 'function void truncate_pagecache(inode*, loff_t)'
  [A] 'function void truncate_setsize(inode*, loff_t)'
  [A] 'function int try_to_release_page(page*, gfp_t)'
  [A] 'function void try_to_writeback_inodes_sb(super_block*, wb_reason)'
  [A] 'function void unload_nls(nls_table*)'
  [A] 'function void unlock_buffer(buffer_head*)'
  [A] 'function void unlock_new_inode(inode*)'
  [A] 'function void usbnet_cdc_unbind(usbnet*, usb_interface*)'
  [A] 'function int usbnet_generic_cdc_bind(usbnet*, usb_interface*)'
  [A] 'function void wait_on_page_bit(page*, int)'
  [A] 'function int wake_bit_function(wait_queue_entry*, unsigned int, int, void*)'
  [A] 'function void wq_worker_comm(char*, size_t, task_struct*)'
  [A] 'function int write_inode_now(inode*, int)'
  [A] 'function int write_one_page(page*)'

11 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_do_ptrauth_fault'
  [A] 'tracepoint __tracepoint_android_vh_binder_free_proc'
  [A] 'tracepoint __tracepoint_android_vh_binder_has_work_ilocked'
  [A] 'tracepoint __tracepoint_android_vh_binder_looper_state_registered'
  [A] 'tracepoint __tracepoint_android_vh_binder_proc_transaction_end'
  [A] 'tracepoint __tracepoint_android_vh_binder_read_done'
  [A] 'tracepoint __tracepoint_android_vh_binder_thread_read'
  [A] 'tracepoint __tracepoint_android_vh_binder_thread_release'
  [A] 'tracepoint __tracepoint_android_vh_futex_sleep_start'
  [A] 'tracepoint __tracepoint_android_vh_subpage_dma_contig_alloc'
  [A] 'tracepoint __tracepoint_block_bio_remap'

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I064b6ff0420cee2d64e17814f43fbff8e2d9b019

Change-Id: Ia880c70c912f2b801a770feb1fdc4f4eb390d34d
tree: 2362745a3181ed0b483e3504af361aa9d3f7dc64
  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.aarch64.fips140
  44. build.config.gki.aarch64.fips140_eval_testing
  45. build.config.gki.x86_64
  46. build.config.gki_kasan
  47. build.config.gki_kasan.aarch64
  48. build.config.gki_kasan.x86_64
  49. build.config.gki_kprobes
  50. build.config.gki_kprobes.aarch64
  51. build.config.gki_kprobes.x86_64
  52. build.config.hikey960
  53. build.config.khwasan
  54. build.config.rockchip
  55. build.config.x86_64
  56. COPYING
  57. CREDITS
  58. Kbuild
  59. Kconfig
  60. MAINTAINERS
  61. Makefile
  62. OWNERS
  63. README
  64. 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)