Commit Graph

90 Commits

Author SHA1 Message Date
luoyongjie
1fb9e95d46 ANDROID: GKI: add symbol list file for meizu
add abi_gki_aarch64_meizu

INFO: 3 function symbol(s) added
  'int __traceiter_android_rvh_sk_alloc(void*, struct sock*)'
  'int __traceiter_android_rvh_sk_free(void*, struct sock*)'
  'int __traceiter_android_vh_alloc_pages_slowpath(void*, gfp_t, unsigned int, unsigned long)'

3 variable symbol(s) added
  'struct tracepoint __tracepoint_android_rvh_sk_alloc'
  'struct tracepoint __tracepoint_android_rvh_sk_free'
  'struct tracepoint __tracepoint_android_vh_alloc_pages_slowpath'

Bug: 298972064
Change-Id: Ia38dd6adc6aac353d347a0a17db6582879bb3978
Signed-off-by: luoyongjie <luoyongjie1@meizu.com>
2023-09-05 21:14:49 +00:00
Ulises Mendez Martinez
e44e3955f7 ANDROID: Use alias for old rules.
* This is in preparation for removal of these targets.

Bug: 293529933
Change-Id: I7b7400bb95b0d2c571be18b97727d878996ab575
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
(cherry picked from commit 83379c35cd0f39f65d89aacb7fbd4166b4cc9e9a)
2023-08-29 18:19:28 +00:00
Ulises Mendez Martinez
9a399ca713 ANDROID: Add arch specific gki module list targets
* This is a no-op change preparing for the split of target and files
  based on the architecture used.

Bug: 293529933
Change-Id: I7783b60e591aaad23b5446af5cb04af5765f4b3f
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-08-29 18:02:40 +00:00
aaro
2d1d3be2ba ANDROID: GKI: Add Tuxera symbol list
This list covers Microsoft exFAT by Tuxera and Microsoft NTFS by Tuxera
file system drivers

6 function symbol(s) added
  'int filemap_add_folio(struct address_space*, struct folio*, unsigned long, gfp_t)'
  'int invalidate_inode_pages2_range(struct address_space*, unsigned long, unsigned long)'
  'void mnt_drop_write_file(struct file*)'
  'int mnt_want_write_file(struct file*)'
  'gfp_t readahead_gfp_mask(struct address_space*)'
  'int sync_filesystem(struct super_block*)'

Bug: 296854551
Change-Id: Iefb4d25b2ae4b523c8d743c0843e81129654227f
Signed-off-by: Aaro Mäkinen <aaro@tuxera.com>
2023-08-25 22:48:48 +00:00
Yifan Hong
37f4509407 ANDROID: Add checkpatch target.
Running the following will run scripts/checkpatch.pl on a
patch of HEAD

  tools/bazel run //common:checkpatch

or a given Git SHA1:

  tools/bazel run //common:checkpatch -- --git_sha1 ...

For additional flags, see

  tools/bazel run //common:checkpatch -- --help

For details, see
  build/kernel/kleaf/docs/checkpatch.md
in your source tree.

Test: TH
Bug: 259995152
Change-Id: Iaad8fd69508cf9be11340166aafbb84930d4805c
Signed-off-by: Yifan Hong <elsk@google.com>
(cherry picked from commit 7dbf26568fcccde88470e7a25c07f0c7229e85f1)
2023-08-11 17:53:56 +00:00
Yifan Hong
15a4b0d726 ANDROID: set kmi_symbol_list_add_only for Kleaf builds.
On KMI frozen branches, symbols may no longer be removed
from KMI symbol lists.

This change sets kmi_symbol_list_add_only=true for Kleaf builds.

Test: Treehugger
Bug: 292106238
Change-Id: I74cf98ebad2705b92468c996e9b3b472447e8203
Signed-off-by: Yifan Hong <elsk@google.com>
2023-07-24 15:42:36 +00:00
Bumyong Lee
1b7f110278 ANDROID: add initial symbol list file for ExynosAuto SoCs
This commit is for adding initial symbol list form ExynosAuto SoCs.
"abi_gki_aarch64_exynosauto" is generated from minimal configs for build.

Bug: 291172090
Signed-off-by: Bumyong Lee <bumyong.lee@samsung.com>
Change-Id: I9114e0ec6881d7d5bdbe61e505e21a379801f69d
2023-07-17 15:19:52 +00:00
Ulises Mendez Martinez
b57cdabd55 ANDROID: Set arch attribute for allmodconfig builds
* This sets arch attribute for two builds:
  * kernel_x86_64_allmodconfig
  * kernel_arm_allmodconfig

Bug: 272164611
Change-Id: Ica02082ef53e1b08523b47b879716e94330fe5c4
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-07-05 16:30:56 +00:00
Ulises Mendez Martinez
054ab3ab00 ANDROID: db845c: Fix build when using --kgdb
* CONFIG_WATCHDOG is disabled when compiling with
  --kgdb option, hence the list of modules produced is
  adjusted conditionally.

Bug: 270320056
Change-Id: I0eafb118836e6a31dc3b0392ab7d60b5597b9367
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-06-26 11:45:17 +00:00
Ulises Mendez Martinez
ec0fc55aa4 ANDROID: db845c: Local define for db845c targets
Generally DAMP is a best practice in Bazel, for this
specific case, it helps with:

* Better target discoverability and auto-completion.
* It's possible to use `select` for KGDB fixes later on
  without encountering name expectations broken.

Bug: 256196368
Bug: 270320056
Change-Id: I300404a9b2b4b7c6569145a942ecb445d23e8e9a
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-06-23 09:08:01 +00:00
Ulises Mendez Martinez
32c2d42ee1 ANDROID: rockpi4: Fix build when using --kgdb
* CONFIG_WATCHDOG is disabled when compiling with
--kgdb option, hence the list of modules produced is
adjusted conditionally on its value.

Bug: 270320056
Change-Id: I4db55fdf6b91a65209d2e0ae3bbb5f384c7eca22
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-06-22 13:00:37 +00:00
Yifan Hong
64e4b4d31b ANDROID: kleaf: android/gki_system_dlkm_modules is generated.
modules.bzl is the source of truth for the list of GKI
modules. There is no need to keep two lists.

Test: TH
Bug: 287697703
Signed-off-by: Yifan Hong <elsk@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:a8a61755f67730af45d50f6173a4eedbcefa1c87)
Merged-In: I8953e92696833cf8ec27aa80724ec468c08736f1
Change-Id: I8953e92696833cf8ec27aa80724ec468c08736f1
2023-06-22 11:33:16 +00:00
Dezhi Huang
cab47c81b5 ANDROID: GKI: update symbol list file for honor
Create the symbol list file for Honor Device Co.

Bug: 279793369
Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
Change-Id: I11bca937366428bc87a174a64b7d6843e3d92339
2023-05-17 21:26:09 +00:00
Cixi Geng
10e4c804f2 ANDROID: GKI: add symbol list file for unisoc
Add abi_gki_aarch64_unisoc

4 function symbol(s) added
  'struct hwspinlock* devm_hwspin_lock_request_specific(struct device*, unsigned int)'
  'void sdhci_enable_v4_mode(struct sdhci_host*)'
  'void sdhci_request(struct mmc_host*, struct mmc_request*)'
  'int sdhci_request_atomic(struct mmc_host*, struct mmc_request*)'

Bug: 282902304
Change-Id: I70eaba8be31407d3486b6e845241681c9995f27e
Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
2023-05-16 14:10:58 +00:00
Ulises Mendez Martinez
81509f85f3 ANDROID: db845c: Remove MAKE_GOALS from build.config
* Instead use the equivalent kernel_build attribute.
* This migrates rockpi4 `MAKE_GOALS` too.

Bug: 236012223
Change-Id: Icf47eb42795100b4955f02170a002689c7566194
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-05-15 07:01:39 +00:00
Ramji Jiyani
dcaaf3105a ANDROID: GKI: DB845C: cfg/mac 80211 as vendor modules
Enabled cfg80211.ko and mac80211.ko as vendor module for
db845c target.

Bug: 281137343
Test: TH
Change-Id: I466cbcc81598c3ff127078195974e4cedb2597a1
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-05-11 05:22:29 +00:00
Ulises Mendez Martinez
119cead9cf ANDROID: GKI: Remove MAKE_GOALS from build.config
* Instead use the equivalent kernel_build attribute.

Bug: 236012223
Change-Id: Id90fa89dcadd95d8a8ecf570f46d9d71a925c388
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
(cherry picked from commit ab7e63ef765d74b388e881800ad500c5f93199fc)
2023-05-10 17:05:37 +00:00
litao
3183446493 ANDROID: GKI: add init symbol list file for vivo
6 function symbol(s) added
  'struct buffer_head* __getblk_gfp(struct block_device*, sector_t, unsigned int, gfp_t)'
  'void __lock_buffer(struct buffer_head*)'
  'void __wait_on_buffer(struct buffer_head*)'
  'void end_buffer_read_sync(struct buffer_head*, int)'
  'void submit_bh(blk_opf_t, struct buffer_head*)'
  'void unlock_buffer(struct buffer_head*)'

Bug: 278801617
Change-Id: I3d850f7de9c7acc1c3dc88e65ab811ee16f56a9d
Signed-off-by: litao <tao.li@vivo.corp-partner.google.com>
2023-04-21 15:05:10 +00:00
Junki Min
d88ab885ee ANDROID: Add initial symbol list for Exynos SoC
This commit is for adding initial symbol list form Exynos SoC.
"abi_gki_aarch64_exynos" is generated from minimal configs for build.

2 function symbol(s) added
  'int devm_hwrng_register(struct device*, struct hwrng*)'
  'int irq_force_affinity(unsigned int, const struct cpumask*)'

Bug: 278466304
Change-Id: I6a700eda5639bf46f694524fefe91b759583704d
Signed-off-by: Junki Min <joonki.min@samsung.com>
2023-04-19 15:15:06 +09:00
fengqi
732a9ff82f ANDROID: GKI: add symbol list file for xiaomi
add abi_gki_aarch64_xiaomi

INFO: 59 function symbol(s) added
  'void __blk_mq_end_request(struct request*, blk_status_t)'
  'struct scsi_device* __scsi_add_device(struct Scsi_Host*, uint, uint, u64, void*)'
  'int __traceiter_android_vh_binder_transaction_init(void*, struct binder_transaction*)'
  'int __traceiter_android_vh_binder_wait_for_work(void*, bool, struct binder_thread*, struct binder_proc*)'
  'void balance_dirty_pages_ratelimited(struct address_space*)'
  'struct backing_dev_info* bdi_alloc(int)'
  'void bdi_put(struct backing_dev_info*)'
  'int bdi_register(struct backing_dev_info*, const char*, ...)'
  'void blk_mq_freeze_queue(struct request_queue*)'
  'struct request_queue* blk_mq_init_queue(struct blk_mq_tag_set*)'
  'void blk_mq_tagset_busy_iter(struct blk_mq_tag_set*, busy_tag_iter_fn*, void*)'
  'void blk_mq_unfreeze_queue(struct request_queue*)'
  'void blk_queue_update_dma_alignment(struct request_queue*, int)'
  'void blk_queue_update_dma_pad(struct request_queue*, unsigned int)'
  'bool blk_update_request(struct request*, blk_status_t, unsigned int)'
  'void bsg_job_done(struct bsg_job*, int, unsigned int)'
  'void bsg_remove_queue(struct request_queue*)'
  'struct request_queue* bsg_setup_queue(struct device*, const char*, bsg_job_fn*, bsg_timeout_fn*, int)'
  'void deactivate_locked_super(struct super_block*)'
  'void dev_pm_opp_remove(struct device*, unsigned long)'
  'const char* drm_get_connector_type_name(unsigned int)'
  'void generic_shutdown_super(struct super_block*)'
  'int gpio_request_array(const struct gpio*, size_t)'
  'void lockref_get(struct lockref*)'
  'void logfc(struct fc_log*, const char*, char, const char*, ...)'
  'int lookup_bdev(const char*, dev_t*)'
  'void* mempool_alloc_pages(gfp_t, void*)'
  'void mempool_free_pages(void*, void*)'
  'int mempool_resize(mempool_t*, int)'
  'struct nvmem_device* nvmem_register(const struct nvmem_config*)'
  'void nvmem_unregister(struct nvmem_device*)'
  'struct page* read_cache_page(struct address_space*, unsigned long, filler_t*, struct file*)'
  'int scsi_add_host_with_dma(struct Scsi_Host*, struct device*, struct device*)'
  'int scsi_change_queue_depth(struct scsi_device*, int)'
  'struct scsi_device* scsi_device_lookup(struct Scsi_Host*, uint, uint, u64)'
  'int scsi_dma_map(struct scsi_cmnd*)'
  'void scsi_dma_unmap(struct scsi_cmnd*)'
  'struct Scsi_Host* scsi_host_alloc(struct scsi_host_template*, int)'
  'struct Scsi_Host* scsi_host_lookup(unsigned short)'
  'void scsi_host_put(struct Scsi_Host*)'
  'int scsi_is_host_device(const struct device*)'
  'void scsi_print_command(struct scsi_cmnd*)'
  'void scsi_remove_host(struct Scsi_Host*)'
  'void scsi_report_bus_reset(struct Scsi_Host*, int)'
  'void scsi_scan_host(struct Scsi_Host*)'
  'struct super_block* sget_fc(struct fs_context*, int(*)(struct super_block*, struct fs_context*), int(*)(struct super_block*, struct fs_context*))'
  'int ufshcd_alloc_host(struct device*, struct ufs_hba**)'
  'int ufshcd_config_pwr_mode(struct ufs_hba*, struct ufs_pa_layer_attr*)'
  'void ufshcd_dealloc_host(struct ufs_hba*)'
  'int ufshcd_hba_enable(struct ufs_hba*)'
  'int ufshcd_make_hba_operational(struct ufs_hba*)'
  'void ufshcd_update_evt_hist(struct ufs_hba*, u32, u32)'
  'int utf16s_to_utf8s(const wchar_t*, int, enum utf16_endian, u8*, int)'
  'void wait_for_device_probe()'
  'int wakeup_sources_read_lock()'
  'void wakeup_sources_read_unlock(int)'
  'struct wakeup_source* wakeup_sources_walk_next(struct wakeup_source*)'
  'struct wakeup_source* wakeup_sources_walk_start()'
  'int blk_mq_alloc_sq_tag_set(struct blk_mq_tag_set*, const struct blk_mq_ops*, unsigned int, unsigned int)'

3 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_binder_transaction_init'
  'struct tracepoint __tracepoint_android_vh_binder_wait_for_work'
  'u64 jiffies_64'

Bug: 276850920

Change-Id: Ibc65a0bfb3332072be7bea17e0aea48277043510
Signed-off-by: fengqi <fengqi@xiaomi.com>
2023-04-11 15:57:31 +00:00
Zhipeng Wang
710a5d9ce1 ANDROID: Add initial symbols list for imx
Initial symbol list for imx that adds it to the build and does not add
any new symbols at this point in time.

Bug: 277651618
Change-Id: I19d4463295bc2f2a22fa5983765a20838d8615ce
Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-11 15:53:23 +00:00
Chun-Hung Wu
24c39824c8 ANDROID: Add initial symbol list for mtk
Add initial MTK symbol list and add to the build system.

Bug: 277305001
Change-Id: I3944eb4517c5040dac4fb8769907800af3b5495e
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-11 15:53:23 +00:00
Junki Min
4754c5690b ANDROID: GKI: Add a filegroup instead of _aarch64_additional_kmi symbol list
_aarch64_additional_kmi_symbol_list has all vendor's kmi symbol list file,
but it is inaccessible from outside. Added a filegroup for it.

Bug: 275670969
Signed-off-by: Junki Min <joonki.min@samsung.com>
Change-Id: I65ad4008ae2135fae88c8eaf1c09d141ea562294
2023-04-04 11:46:56 +00:00
zuoyonghua
2420a46a32 ANDROID: GKI: Update symbols to symbol list
Add initial symbol list for oplus in android/abi_gki_aarch64_oplus

74 function symbol(s) added
  'int __page_mapcount(struct page*)'
  'int __printk_ratelimit(const char*)'
  '__sum16 __skb_checksum_complete(struct sk_buff*)'
  'int __trace_puts(unsigned long, const char*, int)'
  'int _raw_write_trylock(rwlock_t*)'
  'int bio_add_page(struct bio*, struct page*, unsigned int, unsigned int)'
  'void bio_associate_blkg(struct bio*)'
  'void bio_put(struct bio*)'
  'int blk_rq_map_user(struct request_queue*, struct request*, struct rq_map_data*, void*, unsigned long, gfp_t)'
  'int blk_rq_map_user_iov(struct request_queue*, struct request*, struct rq_map_data*, const struct iov_iter*, gfp_t)'
  'int cpufreq_frequency_table_get_index(struct cpufreq_policy*, unsigned int)'
  'unsigned int cpufreq_policy_transition_delay_us(struct cpufreq_policy*)'
  'int device_create_bin_file(struct device*, const struct bin_attribute*)'
  'void device_remove_bin_file(struct device*, const struct bin_attribute*)'
  'int devres_destroy(struct device*, dr_release_t, dr_match_t, void*)'
  'int down_read_trylock(struct rw_semaphore*)'
  'int filp_close(struct file*, fl_owner_t)'
  'void for_each_kernel_tracepoint(void(*)(struct tracepoint*, void*), void*)'
  'int freq_qos_add_notifier(struct freq_constraints*, enum freq_qos_req_type, struct notifier_block*)'
  'int freq_qos_remove_notifier(struct freq_constraints*, enum freq_qos_req_type, struct notifier_block*)'
  'void gov_attr_set_get(struct gov_attr_set*, struct list_head*)'
  'struct gpio_chip* gpiod_to_chip(const struct gpio_desc*)'
  'bool have_governor_per_policy()'
  's32 i2c_smbus_read_word_data(const struct i2c_client*, u8)'
  's32 i2c_smbus_write_word_data(const struct i2c_client*, u8, u16)'
  'struct iio_channel* iio_channel_get(struct device*, const char*)'
  'void iio_channel_release(struct iio_channel*)'
  'int iio_get_channel_type(struct iio_channel*, enum iio_chan_type*)'
  'int ip6_local_out(struct net*, struct sock*, struct sk_buff*)'
  'int ip6_route_me_harder(struct net*, struct sock*, struct sk_buff*)'
  'int ip_route_me_harder(struct net*, struct sock*, struct sk_buff*, unsigned int)'
  'int ipv6_find_hdr(const struct sk_buff*, unsigned int*, int, unsigned short*, int*)'
  'u64 jiffies_64_to_clock_t(u64)'
  'void ktime_get_coarse_real_ts64(struct timespec64*)'
  'ssize_t mipi_dsi_generic_write(struct mipi_dsi_device*, const void*, size_t)'
  'int mmc_wait_for_cmd(struct mmc_host*, struct mmc_command*, int)'
  'void nf_ct_attach(struct sk_buff*, const struct sk_buff*)'
  'bool nf_ct_delete(struct nf_conn*, u32, int)'
  'int nf_register_net_hooks(struct net*, const struct nf_hook_ops*, unsigned int)'
  'void nf_unregister_net_hooks(struct net*, const struct nf_hook_ops*, unsigned int)'
  'struct cgroup_subsys_state* of_css(struct kernfs_open_file*)'
  'void pm_get_active_wakeup_sources(char*, size_t)'
  'struct proc_dir_entry* proc_symlink(const char*, struct proc_dir_entry*, const char*)'
  'struct reciprocal_value reciprocal_value(u32)'
  'int register_tcf_proto_ops(struct tcf_proto_ops*)'
  'int regulator_map_voltage_linear_range(struct regulator_dev*, int, int)'
  'int remove_proc_subtree(const char*, struct proc_dir_entry*)'
  'int rtc_read_alarm(struct rtc_device*, struct rtc_wkalrm*)'
  'int rtc_set_alarm(struct rtc_device*, struct rtc_wkalrm*)'
  'int sdio_memcpy_fromio(struct sdio_func*, void*, unsigned int, int)'
  'int sdio_memcpy_toio(struct sdio_func*, unsigned int, void*, int)'
  'int sdio_set_block_size(struct sdio_func*, unsigned int)'
  'u8 sdio_writeb_readb(struct sdio_func*, u8, unsigned int, int*)'
  'int send_sig(int, struct task_struct*, int)'
  'int send_sig_info(int, struct kernel_siginfo*, struct task_struct*)'
  'int set_blocksize(struct block_device*, int)'
  'int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime*, snd_pcm_hw_param_t, u_int64_t)'
  'struct snd_soc_dai* snd_soc_find_dai(const struct snd_soc_dai_link_component*)'
  'unsigned int stack_trace_save_tsk(struct task_struct*, unsigned long*, unsigned int, unsigned int)'
  'char* stpcpy(char*, const char*)'
  'struct rq* task_rq_lock(struct task_struct*, struct rq_flags*)'
  'int tcf_action_exec(struct sk_buff*, struct tc_action**, int, struct tcf_result*)'
  'void tcf_exts_destroy(struct tcf_exts*)'
  'int tcf_exts_dump(struct sk_buff*, struct tcf_exts*)'
  'int tcf_exts_dump_stats(struct sk_buff*, struct tcf_exts*)'
  'int tcf_exts_validate(struct net*, struct tcf_proto*, struct nlattr**, struct nlattr*, struct tcf_exts*, u32, struct netlink_ext_ack*)'
  'bool tcf_queue_work(struct rcu_work*, work_func_t)'
  'void* typec_mux_get_drvdata(struct typec_mux_dev*)'
  'void unregister_memory_notifier(struct notifier_block*)'
  'void unregister_tcf_proto_ops(struct tcf_proto_ops*)'
  'void v4l2_i2c_subdev_init(struct v4l2_subdev*, struct i2c_client*, const struct v4l2_subdev_ops*)'
  'unsigned long wait_for_completion_io_timeout(struct completion*, unsigned long)'
  'long wait_for_completion_killable_timeout(struct completion*, unsigned long)'
  'void wakeup_source_remove(struct wakeup_source*)'

4 variable symbol(s) added
  'int console_printk[4]'
  'struct cgroup_subsys memory_cgrp_subsys'
  'struct static_key_true memory_cgrp_subsys_enabled_key'
  'struct bus_type spi_bus_type'

Bug: 276674646
Signed-off-by: zuoyonghua <zuoyonghua@oppo.com>
Change-Id: I095fd140aefa5489992581332e584df4d1b94275
2023-04-03 18:36:58 +00:00
Ramji Jiyani
0d5b95acb6 ANDROID: GKI: Multi arch exports protection support
ABI is being implemented for x86_64, making it necessary
to support protected exports header file generation for
the GKI modules for multiple architecture.

Enable support to select required inputs based on the ARCH
to generate gki_module_protected_exports.h during kernel
build.

Inputs for generating gki_module_protected_exports.h are:

ARCH = arm64:
ABI Protected exports list: abi_gki_protected_exports_aarch64
Protected GKI modules list: gki_aarch64_protected_modules

ARCH = x86_64:
ABI Protected exports list: abi_gki_protected_exports_x86_64
Protected GKI modules list: gki_x86_64_protected_modules

Test: TH
Test: Manual verification of the generated header file
Test: bazel run //common:kernel_aarch64_abi_update_protected_exports
Bug: 151893768
Change-Id: Ic4bcb2732199b71a7973b5ce4c852bcd95d37131
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-03-29 23:11:03 +00:00
Ramji Jiyani
cc85c8ade8 ANDROID: GKI: arm64: Enable KMI strict mode
Enables the KMI strict mode for the aarch64;
also remove the TODO comment for aarch64-debug
as KMI strict mode shouldn't be enabled for
that target.

Bug: 269346251
Test: bazel build //common:kernel_aarch64
Test: TH
Change-Id: If8cb717d2e3dfef29004fafe1315a69caa940716
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-03-17 17:21:52 +00:00
YOUNGJIN JOO
36280321bc ANDROID: Add initial symbols list for galaxy
29 function symbol(s) added
  'struct block_device* I_BDEV(struct inode*)'
  'void* __devm_alloc_percpu(struct device*, size_t, size_t)'
  'int __get_task_ioprio(struct task_struct*)'
  'int __traceiter_android_vh_is_fpsimd_save(void*, struct task_struct*, struct task_struct*)'
  'int __traceiter_console(void*, const char*, size_t)'
  'int __traceiter_hrtimer_expire_entry(void*, struct hrtimer*, ktime_t*)'
  'int __traceiter_hrtimer_expire_exit(void*, struct hrtimer*)'
  'int __traceiter_irq_handler_entry(void*, int, struct irqaction*)'
  'int __traceiter_irq_handler_exit(void*, int, struct irqaction*, int)'
  'int __traceiter_workqueue_execute_start(void*, struct work_struct*)'
  'struct block_device* blkdev_get_by_dev(dev_t, fmode_t, void*)'
  'struct block_device* blkdev_get_by_path(const char*, fmode_t, void*)'
  'int blkdev_issue_flush(struct block_device*)'
  'void blkdev_put(struct block_device*, fmode_t)'
  'void file_ra_state_init(struct file_ra_state*, struct address_space*)'
  'int file_write_and_wait_range(struct file*, loff_t, loff_t)'
  'loff_t fixed_size_llseek(struct file*, loff_t, int, loff_t)'
  'ssize_t generic_file_read_iter(struct kiocb*, struct iov_iter*)'
  'ssize_t generic_perform_write(struct kiocb*, struct iov_iter*)'
  'ssize_t generic_write_checks(struct kiocb*, struct iov_iter*)'
  'u64 get_random_u64()'
  'struct gpio_chip* gpiochip_find(void*, int(*)(struct gpio_chip*, void*))'
  'dev_t name_to_dev_t(const char*)'
  'int param_get_uint(char*, const struct kernel_param*)'
  'int param_set_uint(const char*, const struct kernel_param*)'
  'void proc_set_size(struct proc_dir_entry*, loff_t)'
  'int pstore_register(struct pstore_info*)'
  'void pstore_unregister(struct pstore_info*)'
  'int vfs_fsync_range(struct file*, loff_t, loff_t, int)'

7 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_is_fpsimd_save'
  'struct tracepoint __tracepoint_console'
  'struct tracepoint __tracepoint_hrtimer_expire_entry'
  'struct tracepoint __tracepoint_hrtimer_expire_exit'
  'struct tracepoint __tracepoint_irq_handler_entry'
  'struct tracepoint __tracepoint_irq_handler_exit'
  'struct tracepoint __tracepoint_workqueue_execute_start'

Bug: 271472212
Change-Id: I9a95f28814d1e5c6dc5b275ca134242cd710a847
Signed-off-by: YOUNGJIN JOO <youngjin79.joo@samsung.com>
2023-03-03 17:15:34 +00:00
Ramji Jiyani
d02bc47290 ANDROID: GKI: define protected exports and modules list
Define protected modules and exports list for the aarch64 target.
This enables support to update and/or create protected
exports list at common/android/abi_gki_protected_exports based on
the modules listed in common/android/gki_protected_modules.

Command:

bazel run --config=fast //common:kernel_aarch64_abi_update_protected_exports

Bug: 268679215
Test: bazel run //common:kernel_aarch64_abi_update_protected_exports
Test: TH
Change-Id: I36a18162c2ef253fcf691b016b4da861d9c61e4a
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-03-02 01:08:51 +00:00
Ulises Mendez Martinez
b38e72d30c ANDROID: Add initial symbols list for db845c
* This update the ABI [STG] definition:

197 function symbol(s) added
  'int __clk_mux_determine_rate(struct clk_hw*, struct clk_rate_request*)'
  'struct clk_hw* __devm_clk_hw_register_divider(struct device*, struct device_node*, const char*, const char*, const struct clk_hw*, const struct clk_parent_data*, unsigned long, void*, u8, u8, u8, const struct clk_div_table*, spinlock_t*)'
  'struct clk_hw* __devm_clk_hw_register_mux(struct device*, struct device_node*, const char*, u8, const char* const*, const struct clk_hw**, const struct clk_parent_data*, unsigned long, void*, u8, u32, u8, const u32*, spinlock_t*)'
  'int __devm_reset_control_bulk_get(struct device*, int, struct reset_control_bulk_data*, bool, bool, bool)'
  'struct spi_controller* __devm_spi_alloc_controller(struct device*, unsigned int, bool)'
  'struct dma_chan* __dma_request_channel(const dma_cap_mask_t*, dma_filter_fn, void*, struct device_node*)'
  'void __drm_atomic_helper_plane_reset(struct drm_plane*, struct drm_plane_state*)'
  'struct reset_control* __of_reset_control_get(struct device_node*, const char*, int, bool, bool, bool)'
  'struct reset_control* __reset_control_get(struct device*, const char*, int, bool, bool, bool)'
  'wait_queue_head_t* __var_waitqueue(void*)'
  'void* __vmalloc(unsigned long, gfp_t)'
  'struct clk* clk_hw_get_clk(struct clk_hw*, const char*)'
  'int component_compare_of(struct device*, void*)'
  'int crypto_register_shash(struct shash_alg*)'
  'void crypto_unregister_shash(struct shash_alg*)'
  'int dapm_regulator_event(struct snd_soc_dapm_widget*, struct snd_kcontrol*, int)'
  'struct dev_pm_opp* dev_pm_opp_find_level_exact(struct device*, unsigned int)'
  'unsigned int dev_pm_opp_get_level(struct dev_pm_opp*)'
  'struct device_node* dev_pm_opp_get_of_node(struct dev_pm_opp*)'
  'struct device_node* dev_pm_opp_of_get_opp_desc_node(struct device*)'
  'int device_get_mac_address(struct device*, char*)'
  'struct fwnode_handle* device_get_named_child_node(struct device*, const char*)'
  'int devm_clk_bulk_get_optional(struct device*, int, struct clk_bulk_data*)'
  'struct clk_hw* devm_clk_hw_register_fixed_factor_parent_hw(struct device*, const char*, const struct clk_hw*, unsigned long, unsigned int, unsigned int)'
  'struct devfreq* devm_devfreq_add_device(struct device*, struct devfreq_dev_profile*, const char*, void*)'
  'struct clk* devm_get_clk_from_child(struct device*, struct device_node*, const char*)'
  'struct gpio_desc* devm_gpiod_get_index(struct device*, const char*, unsigned int, enum gpiod_flags)'
  'void devm_gpiod_put(struct device*, struct gpio_desc*)'
  'int devm_led_classdev_multicolor_register_ext(struct device*, struct led_classdev_mc*, struct led_init_data*)'
  'void* devm_memremap(struct device*, resource_size_t, size_t, unsigned long)'
  'int devm_pm_clk_create(struct device*)'
  'int devm_pm_opp_of_add_table(struct device*)'
  'int devm_pm_opp_set_config(struct device*, struct dev_pm_opp_config*)'
  'int devm_pm_runtime_enable(struct device*)'
  'struct qcom_smem_state* devm_qcom_smem_state_get(struct device*, const char*, unsigned int*)'
  'int devm_regulator_bulk_get_const(struct device*, int, const struct regulator_bulk_data*, struct regulator_bulk_data**)'
  'struct reset_control* devm_reset_control_array_get(struct device*, bool, bool)'
  'int devm_spi_register_controller(struct device*, struct spi_controller*)'
  'int devm_watchdog_register_device(struct device*, struct watchdog_device*)'
  'void* dma_pool_alloc(struct dma_pool*, gfp_t, dma_addr_t*)'
  'struct dma_pool* dma_pool_create(const char*, struct device*, size_t, size_t, size_t)'
  'void dma_pool_destroy(struct dma_pool*)'
  'void dma_pool_free(struct dma_pool*, void*, dma_addr_t)'
  'void dma_resv_describe(struct dma_resv*, struct seq_file*)'
  'struct dma_fence* dma_resv_iter_first(struct dma_resv_iter*)'
  'struct dma_fence* dma_resv_iter_next(struct dma_resv_iter*)'
  'struct drm_bridge_state* drm_atomic_get_new_bridge_state(struct drm_atomic_state*, struct drm_bridge*)'
  'void drm_atomic_print_new_state(const struct drm_atomic_state*, struct drm_printer*)'
  'void drm_bridge_connector_enable_hpd(struct drm_connector*)'
  'struct drm_connector* drm_bridge_connector_init(struct drm_device*, struct drm_encoder*)'
  'enum drm_connector_status drm_bridge_detect(struct drm_bridge*)'
  'void drm_bridge_hpd_notify(struct drm_bridge*, enum drm_connector_status)'
  'bool drm_crtc_vblank_helper_get_vblank_timestamp(struct drm_crtc*, int*, ktime_t*, bool)'
  'bool drm_edid_block_valid(u8*, int, bool, bool*)'
  'void drm_flip_work_cleanup(struct drm_flip_work*)'
  'void drm_flip_work_commit(struct drm_flip_work*, struct workqueue_struct*)'
  'void drm_flip_work_init(struct drm_flip_work*, const char*, drm_flip_func_t)'
  'void drm_flip_work_queue(struct drm_flip_work*, void*)'
  'void drm_gem_lru_init(struct drm_gem_lru*, struct mutex*)'
  'void drm_gem_lru_move_tail(struct drm_gem_lru*, struct drm_gem_object*)'
  'unsigned long drm_gem_lru_scan(struct drm_gem_lru*, unsigned int, bool(*)(struct drm_gem_object*))'
  'int drm_gem_plane_helper_prepare_fb(struct drm_plane*, struct drm_plane_state*)'
  'bool drm_handle_vblank(struct drm_device*, unsigned int)'
  'int drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe*, const struct drm_connector*, const struct drm_display_mode*)'
  'void drm_helper_move_panel_connectors_to_head(struct drm_device*)'
  'int drm_mode_config_helper_resume(struct drm_device*)'
  'int drm_mode_config_helper_suspend(struct drm_device*)'
  'void drm_mode_destroy(struct drm_device*, struct drm_display_mode*)'
  'void drm_modeset_lock_init(struct drm_modeset_lock*)'
  'void drm_plane_enable_fb_damage_clips(struct drm_plane*)'
  'int drm_prime_sg_to_page_array(struct sg_table*, struct page**, int)'
  'bool drm_probe_ddc(struct i2c_adapter*)'
  'void drm_puts(struct drm_printer*, const char*)'
  'int drm_rect_calc_hscale(const struct drm_rect*, const struct drm_rect*, int, int)'
  'int drm_rect_calc_vscale(const struct drm_rect*, const struct drm_rect*, int, int)'
  'void drm_state_dump(struct drm_device*, struct drm_printer*)'
  'void drm_syncobj_add_point(struct drm_syncobj*, struct dma_fence_chain*, struct dma_fence*, uint64_t)'
  'struct drm_syncobj* drm_syncobj_find(struct drm_file*, u32)'
  'int drm_syncobj_find_fence(struct drm_file*, u32, u64, u64, struct dma_fence**)'
  'void drm_syncobj_free(struct kref*)'
  'void drm_syncobj_replace_fence(struct drm_syncobj*, struct dma_fence*)'
  'int drm_writeback_connector_init_with_encoder(struct drm_device*, struct drm_writeback_connector*, struct drm_encoder*, const struct drm_connector_funcs*, const u32*, int)'
  'struct usb_role_switch* fwnode_usb_role_switch_get(struct fwnode_handle*)'
  'void* gen_pool_dma_alloc_align(struct gen_pool*, size_t, dma_addr_t*, int)'
  'void* gen_pool_dma_zalloc_align(struct gen_pool*, size_t, dma_addr_t*, int)'
  'void guid_gen(guid_t*)'
  'int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe*)'
  'ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe*, void*, size_t)'
  'ssize_t hdmi_infoframe_pack(union hdmi_infoframe*, void*, size_t)'
  'int i2c_generic_scl_recovery(struct i2c_adapter*)'
  'void i2c_parse_fw_timings(struct device*, struct i2c_timings*, bool)'
  'int i2c_recover_bus(struct i2c_adapter*)'
  'int icc_disable(struct icc_path*)'
  'int icc_enable(struct icc_path*)'
  'int icc_std_aggregate(struct icc_node*, u32, u32, u32, u32*, u32*)'
  'void init_wait_var_entry(struct wait_bit_queue_entry*, void*, int)'
  'unsigned long invalidate_mapping_pages(struct address_space*, unsigned long, unsigned long)'
  'char* kstrdup_quotable_cmdline(struct task_struct*, gfp_t)'
  'int led_mc_calc_color_components(struct led_classdev_mc*, enum led_brightness)'
  'void memcpy_and_pad(void*, size_t, const void*, size_t, int)'
  'void netdev_notice(const struct net_device*, const char*, ...)'
  'int nvmem_cell_read_variable_le_u32(struct device*, const char*, u32*)'
  'struct clk_hw* of_clk_hw_onecell_get(struct of_phandle_args*, void*)'
  'int of_clk_set_defaults(struct device_node*, bool)'
  'int of_device_request_module(struct device*)'
  'struct device_node* of_get_compatible_child(const struct device_node*, const char*)'
  'struct i2c_adapter* of_get_i2c_adapter_by_node(struct device_node*)'
  'int of_pm_clk_add_clks(struct device*)'
  'int pci_enable_msi(struct pci_dev*)'
  'struct pci_dev* pci_get_slot(struct pci_bus*, unsigned int)'
  'const struct pci_device_id* pci_match_id(const struct pci_device_id*, struct pci_dev*)'
  'int pcie_capability_write_word(struct pci_dev*, int, u16)'
  'int phy_configure(struct phy*, union phy_configure_opts*)'
  'int pinctrl_generic_add_group(struct pinctrl_dev*, const char*, int*, int, void*)'
  'int pinctrl_generic_get_group_count(struct pinctrl_dev*)'
  'const char* pinctrl_generic_get_group_name(struct pinctrl_dev*, unsigned int)'
  'int pinctrl_generic_get_group_pins(struct pinctrl_dev*, unsigned int, const unsigned int**, unsigned int*)'
  'int pinctrl_generic_remove_group(struct pinctrl_dev*, unsigned int)'
  'int pinctrl_pm_select_idle_state(struct device*)'
  'int pm_generic_runtime_resume(struct device*)'
  'int pm_generic_runtime_suspend(struct device*)'
  'void qcom_smem_state_put(struct qcom_smem_state*)'
  'void regcache_cache_bypass(struct regmap*, bool)'
  'int register_vmap_purge_notifier(struct notifier_block*)'
  'int regmap_get_val_bytes(struct regmap*)'
  'int regmap_irq_set_type_config_simple(unsigned int**, unsigned int, const struct regmap_irq*, int)'
  'int regmap_noinc_read(struct regmap*, unsigned int, void*, size_t)'
  'int regmap_noinc_write(struct regmap*, unsigned int, const void*, size_t)'
  'int regulator_bulk_get(struct device*, int, struct regulator_bulk_data*)'
  'int regulator_get_current_limit_regmap(struct regulator_dev*)'
  'unsigned int regulator_get_linear_step(struct regulator*)'
  'int regulator_set_current_limit_regmap(struct regulator_dev*, int, int)'
  'int reset_control_bulk_assert(int, struct reset_control_bulk_data*)'
  'int reset_control_bulk_deassert(int, struct reset_control_bulk_data*)'
  'void reset_control_put(struct reset_control*)'
  'struct rpmsg_device* rpmsg_create_channel(struct rpmsg_device*, struct rpmsg_channel_info*)'
  'struct rpmsg_endpoint* rpmsg_create_ept(struct rpmsg_device*, rpmsg_rx_cb_t, void*, struct rpmsg_channel_info)'
  'int rpmsg_release_channel(struct rpmsg_device*, struct rpmsg_channel_info*)'
  'u64 rproc_elf_get_boot_addr(struct rproc*, const struct firmware*)'
  'void sb800_prefetch(struct device*, int)'
  'void shmem_truncate_range(struct inode*, loff_t, loff_t)'
  'int snd_dma_alloc_dir_pages(int, struct device*, enum dma_data_direction, size_t, struct snd_dma_buffer*)'
  'void snd_dma_free_pages(struct snd_dma_buffer*)'
  'int snd_pcm_create_iec958_consumer_default(u8*, size_t)'
  'int snd_pcm_fill_iec958_consumer(struct snd_pcm_runtime*, u8*, size_t)'
  'int snd_pcm_fill_iec958_consumer_hw_params(struct snd_pcm_hw_params*, u8*, size_t)'
  'int snd_pcm_hw_constraint_eld(struct snd_pcm_runtime*, void*)'
  'int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime*, snd_pcm_hw_param_t, unsigned int, unsigned int)'
  'int snd_pcm_hw_constraint_step(struct snd_pcm_runtime*, unsigned int, snd_pcm_hw_param_t, unsigned long)'
  'unsigned int snd_soc_component_read_field(struct snd_soc_component*, unsigned int, unsigned int)'
  'int snd_soc_component_write_field(struct snd_soc_component*, unsigned int, unsigned int, unsigned int)'
  'void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link*)'
  'int snd_soc_dai_set_fmt(struct snd_soc_dai*, unsigned int)'
  'struct snd_soc_dapm_context* snd_soc_dapm_kcontrol_dapm(struct snd_kcontrol*)'
  'int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card*, const char*)'
  'int snd_soc_of_parse_aux_devs(struct snd_soc_card*, const char*)'
  'int snd_soc_of_parse_pin_switches(struct snd_soc_card*, const char*)'
  'int snd_soc_tplg_component_load(struct snd_soc_component*, struct snd_soc_tplg_ops*, const struct firmware*)'
  'int snd_soc_tplg_component_remove(struct snd_soc_component*)'
  'int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget*, const struct snd_soc_tplg_widget_events*, int, u16)'
  'int spi_async(struct spi_device*, struct spi_message*)'
  'void spi_finalize_current_transfer(struct spi_controller*)'
  'const struct spi_device_id* spi_get_device_id(const struct spi_device*)'
  'struct spi_message* spi_get_next_queued_message(struct spi_controller*)'
  'int spi_write_then_read(struct spi_device*, const void*, unsigned int, void*, unsigned int)'
  'int typec_find_port_data_role(const char*)'
  'int typec_find_port_power_role(const char*)'
  'int typec_set_orientation(struct typec_port*, enum typec_orientation)'
  'void typec_unregister_port(struct typec_port*)'
  'int ufshcd_dme_configure_adapt(struct ufs_hba*, int, int)'
  'int ufshcd_get_pwr_dev_param(const struct ufs_dev_params*, const struct ufs_pa_layer_attr*, struct ufs_pa_layer_attr*)'
  'void ufshcd_init_pwr_dev_param(struct ufs_dev_params*)'
  'int unregister_vmap_purge_notifier(struct notifier_block*)'
  'void usb_amd_dev_put()'
  'bool usb_amd_prefetch_quirk()'
  'bool usb_amd_quirk_pll_check()'
  'void usb_amd_quirk_pll_disable()'
  'void usb_amd_quirk_pll_enable()'
  'long usb_calc_bus_time(int, int, int, int)'
  'void usb_hc_died(struct usb_hcd*)'
  'int usb_hcd_pci_probe(struct pci_dev*, const struct hc_driver*)'
  'void usb_hcd_pci_remove(struct pci_dev*)'
  'void usb_hcd_pci_shutdown(struct pci_dev*)'
  'void usb_role_switch_put(struct usb_role_switch*)'
  'void usb_root_hub_lost_power(struct usb_device*)'
  'int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler*)'
  'struct v4l2_ctrl* v4l2_ctrl_new_std_compound(struct v4l2_ctrl_handler*, const struct v4l2_ctrl_ops*, u32, union v4l2_ctrl_ptr)'
  'void v4l2_m2m_buf_remove_by_buf(struct v4l2_m2m_queue_ctx*, struct vb2_v4l2_buffer*)'
  'struct vb2_v4l2_buffer* v4l2_m2m_buf_remove_by_idx(struct v4l2_m2m_queue_ctx*, unsigned int)'
  'int v4l2_m2m_ioctl_create_bufs(struct file*, void*, struct v4l2_create_buffers*)'
  'int v4l2_m2m_ioctl_expbuf(struct file*, void*, struct v4l2_exportbuffer*)'
  'int v4l2_m2m_ioctl_prepare_buf(struct file*, void*, struct v4l2_buffer*)'
  'int v4l2_m2m_ioctl_qbuf(struct file*, void*, struct v4l2_buffer*)'
  'int v4l2_m2m_ioctl_try_decoder_cmd(struct file*, void*, struct v4l2_decoder_cmd*)'
  'int v4l2_m2m_ioctl_try_encoder_cmd(struct file*, void*, struct v4l2_encoder_cmd*)'
  'void vb2_queue_error(struct vb2_queue*)'
  'void wake_up_var(void*)'

5 variable symbol(s) added
  'atomic_long_t nr_swap_pages'
  'struct ww_class reservation_ww_class'
  'const struct dev_pm_ops usb_hcd_pci_pm_ops'
  'unsigned long usb_hcds_loaded'
  'const struct vb2_mem_ops vb2_dma_contig_memops'

Bug: 270670362
Change-Id: I8b3fd2b73ccc3ad91267515c647bc8242695fb52
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-02-27 11:32:18 +00:00
Will McVicker
47c6b1ee81 ANDROID: GKI: Enable symbol trimming
Needed for monitoring the KMI.

Bug: 269587270
Change-Id: I6f688a9d81cbe9c891a2e39727a4bf4b687369aa
Signed-off-by: Will McVicker <willmcvicker@google.com>
2023-02-20 16:52:57 +00:00
Will McVicker
b8eb62608b ANDROID: GKI: add Pixel symbol list
Add android/abi_gki_aarch64_pixel.

Test: TH
Bug: 269587270
Change-Id: I075196a8cb63a4e5f93e12d73d69fe9736de15ad
Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
2023-02-17 13:39:20 +00:00
Aleksei Vetrov
ad1cfe4df1 ANDROID: GKI: enable KMI enforcement
Add android/abi_gki_aarch64.stg as initial ABI representation of the
KMI and start enforcing KMI. Kernel is not trimmed yet, the trimming
will be enabled after adding symbols lists.

This is not KMI freeze. While this is hard enforcement in the code
base, we still allow controlled changes to the ABI.

Test: TH
Bug: 269323432
Change-Id: Ic3a126a6d60242ae713ae396bb239af5b3e58c53
Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
2023-02-16 15:41:17 +00:00
Peter Griffin
0f95c27659 ANDROID: BUILD.bazel: Add qcom soundwire module
Add snd-soc-qcom-sdw to module_outs for db845.
This was split out of the common qcom-snd module
to avoid a regression on older platforms that didn't
support soundwire.

Fixes: c878ac66db ("ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE")
Change-Id: I957bccf8ce8e947332aad81e5e5ec33bcbbbbaa1
Signed-off-by: Peter Griffin <gpeter@google.com>
2023-01-20 15:13:13 +00:00
T.J. Mercier
806fc43cd8 ANDROID: Temporarily disable vendor symbol lists
This will be reverted before freezing the KMI on this branch.

Bug: 264279944
Change-Id: Ic0229cf4e8a9462732cb0555af980747eaee6ebc
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-01-19 17:35:22 +00:00
Ard Biesheuvel
c6d5a76721 ANDROID: fips140: add kernel crypto module
To meet FIPS 140 requirements, add support for building a kernel module
"fips140.ko" that contains various cryptographic algorithms built from
existing kernel source files.  At load time, the module checks its own
integrity and self-tests its algorithms, then registers the algorithms
with the crypto API to supersede the original algorithms provided by the
kernel itself.

[ebiggers: this commit originated from "ANDROID: crypto: fips140 -
 perform load time integrity check", but I've folded many later commits
 into it to make forward porting easier.  See below]

Original commits:
  android12-5.10:
    6be141eb36fe ("ANDROID: crypto: fips140 - perform load time integrity check")
    868be244bbed ("ANDROID: inject correct HMAC digest into fips140.ko at build time")
    091338cb398e ("ANDROID: fips140: add missing static keyword to fips140_init()")
    c799c6644b52 ("ANDROID: fips140: adjust some log messages")
    92de53472e68 ("ANDROID: fips140: log already-live algorithms")
    0af06624eadc ("ANDROID: fips140: check for errors from initcalls")
    634445a640a4 ("ANDROID: fips140: fix deadlock in unregister_existing_fips140_algos()")
    e886dd4c339e ("ANDROID: fips140: unregister existing DRBG algorithms")
    b7397e89db29 ("ANDROID: fips140: add power-up cryptographic self-tests")
    50661975be74 ("ANDROID: fips140: add/update module help text")
    b397a0387cb2 ("ANDROID: fips140: test all implementations")
    17ccefe14021 ("ANDROID: fips140: use full 16-byte IV")
    1be58af0776a ("ANDROID: fips140: remove non-prediction-resistant DRBG test")
    2b5843ae2d90 ("ANDROID: fips140: add AES-CBC-CTS")
    2ee56aad318c ("ANDROID: fips140: add AES-CMAC")
    960ebb2b565b ("ANDROID: fips140: add jitterentropy to fips140 module")
    e5b14396f9d2 ("ANDROID: fips140: take into account AES-GCM not being approvable")
    52b70d491bd4 ("ANDROID: fips140: use FIPS140_CFLAGS when compiling fips140-selftests.c")
    6b995f5a5403 ("ANDROID: fips140: preserve RELA sections without relying on the module loader")
    e45108ecff64 ("ANDROID: fips140: block crypto operations until tests complete")
    ecf9341134d1 ("ANDROID: fips140: remove in-place updating of live algorithms")
    482b0323cf29 ("ANDROID: fips140: zeroize temporary values from integrity check")
    64d769e53f20 ("ANDROID: fips140: add service indicators")
    8d7f609cdaa4 ("ANDROID: fips140: add name and version, and a function to retrieve them")
    6b7c37f6c449 ("ANDROID: fips140: use UTS_RELEASE as FIPS version")
    903e97a0ca6d ("ANDROID: fips140: refactor evaluation testing support")
    97fb2104fe22 ("ANDROID: fips140: add support for injecting integrity error")
    109f31ac23f5 ("ANDROID: fips140: add userspace interface for evaluation testing")
  android14-5.15:
    84572a0c7981 ("ANDROID: fips140: split dump-section+add-section into 2 ops")
    b0f8873811d4 ("ANDROID: kleaf: convert fips140 to kleaf")
    2535deae8069 ("ANDROID: GKI: Source GKI_BUILD_CONFIG_FRAGMENT after setting all variables")
    685a2ade28bb ("ANDROID: fips140: add crypto_memneq() back to the module")
    320dfca58a3d ("ANDROID: fips140: fix in-tree builds")
    d4966a820397 ("ANDROID: fips140: remove CONFIG_CRYPTO_FIPS140 option")
    6da26b8750f5 ("ANDROID: fips140: require 'm' to enable CRYPTO_FIPS140_MOD")
    bfcfcce3803b ("ANDROID: fips140: unapply ABS32 relocations generated by KCFI")
    63f46b45dda2 ("ANDROID: fips140: eliminate crypto-fips.a build step")
    ae4ca7a09bb6 ("ANDROID: fips140: allow building without LTO")

Bug: 153614920
Bug: 188620248
Test: tested that the module builds and can be loaded on raven.
Change-Id: I3fde49dbc3d16b149b072a27ba5b4c6219015c94
Signed-off-by: Ard Biesheuvel <ardb@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-01-09 21:33:43 +00:00
Alistair Delva
93e1118c79 ANDROID: kleaf: add DDK definitions for risc64
Bug: 260012551
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I6d6e90f927796d1355af3ad181624b7abd876a9a
2022-12-08 13:23:00 -08:00
Alistair Delva
d0da01fd61 ANDROID: GKI: Add 64-bit RISC-V config
Add a "fake" GKI for RISC-V based on the arm64 one. This implementation
simply symlinks the arm64 gki_defconfig and merges in two other configs:

- arch/riscv/configs/64-bit.config
  This is an upstream file which enables RISC-V for 64-bit.

- arch/riscv/configs/gki.config
  This is a workaround file which enables things the ARM64 architecture
  pre-selects, such as GPIOLIB. Without enabling these options, some
  drivers are incorrectly dropped from the gki_defconfig.

Bug: 260012551
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ifad59ed483bdbb736e905eefc5107328155a361b
2022-12-08 20:01:15 +00:00
Yifan Hong
b97f4c68b7 ANDROID: Add ddk_headers for arm architecture.
Similar to aarch64 and x86_64, we also add ddk_headers
for arm so we can build DDK (Driver development kit) modules
for the arm architecture for virtual devices.

Test: Treehugger
Bug: 254735056
Change-Id: I7ade4a6053e59d84b825285fbc6162b6e642682e
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-29 20:46:07 +00:00
Yifan Hong
f5f041c153 ANDROID: Fix license for BUILD.bazel file.
It should be GPLv2.

Test: none
Bug: 259137060
Change-Id: I6381a9e5a543c24d395984c211bfde5993ea4840
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-28 18:53:03 -08:00
Ulises Mendez Martinez
75c1d995db ANDROID: kleaf: Rename allmodconfig targets
* This is to follow the convention:
  kernel_<arch>_<target>

Bug: 260313194
Change-Id: I643fef0ed77b24c6564f8b8e1ed152180beeaf80
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2022-11-24 12:19:41 +00:00
Yifan Hong
6bf834cb53 ANDROID: kleaf: Add build rules for allmodconfig.
These corresponds to the build.config.allmodconfig.*
build configs.

Unlike build.sh, the Kleaf variant deliberately does not copy
any outputs to the distribution directory. There's not
even a dist target.
This is because allmodconfig is a build test only.

Test: bazel build --allow_undeclared_mdoules //common:allmodconfig_{aarch64,arm,x86_64}
Bug: 258259749
Change-Id: Iefe8f69149f6391938696e90243939d42d4fda84
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-21 21:15:22 +00:00
Yifan Hong
bbf0d78099 ANDROID: convert rockpi4 to kleaf.
Use Kleaf to build rockpi4.

This does not enable mixed build. Mixed build is enabled
in follow-up CLs.

Test: bazel build //common:rockpi4_dist
Bug: 258259749

Change-Id: I4828953495c862afe517fff48195d2f6a97e3fcf
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-16 21:47:26 +00:00
Yifan Hong
f032c7ae45 ANDROID: kleaf: Move list of kernel modules to an extension.
This is so that it can be loaded by other packages. Some
device's may wish to not build mixed build, in which case
they'll either need to use 'auto' in module_outs (discouraged),
or load the list of GKI modules.

Test: TH
Bug: 258308697
Change-Id: Iff7778b9edae7101a2debd44a49bb5eb403bfb2f
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-16 18:10:21 +00:00
Ramji Jiyani
d55c01c608 ANDROID: GKI: Convert BT HCI sdio & uart as modules
Converts BT host controller sdio & uart interface drivers
as modules:

CONFIG_BT_HCIBTSDIO: HCI SDIO driver
CONFIG_BT_HCIUART: HCI UART driver

Converts HCI uart dependent protocol drivers as modules
due to dependency on the CONFIG_BT_HCIUART.

CONFIG_BT_HCIUART_QCA: Qualcomm Atheros protocol support
CONFIG_BT_HCIUART_BCM: Broadcom protocol support

Bug: 232431151
Test: TH
Change-Id: I3a3a7ae03140774a78a56ac306b8aef1042b1ceb
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit 78a20156d1fc07d4a5960a86935d4a3dd26d3fb1)
2022-11-16 00:01:05 +00:00
Ramji Jiyani
d39c7fb8b0 ANDROID: GKI: Covnert Bluetooth HIDP as module
CONFIG_BT_HIDP: HIDP protocol support

HIDP (Human Interface Device Protocol) is a transport
layer for HID reports. HIDP is required for the Bluetooth
Human Interface Device Profile.

Bug: 232431151
Test: TH
Change-Id: Ibe9ed98370ecc9c9825c3a735070817d16254138
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit 4747c631a478866edd2cd6e0c98ce8febedf6ab1)
2022-11-15 23:01:56 +00:00
Ramji Jiyani
56afa3f145 ANDROID: GKI: Convert Bluetooth RFCOMM as module
CONFIG_BT_RFCOMM: RFCOMM protocol support

RFCOMM provides connection oriented stream transport.
RFCOMM support is required for Dialup Networking,
OBEX and other Bluetooth applications.

Bug: 232431151
Test: TH
Change-Id: I573d8c7a1eff02b1554b5d6793b5c3c06fb35931
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit 264b55ef9b11bdc59c6164de01e3daf6a44bc95d)
2022-11-15 22:07:59 +00:00
Ramji Jiyani
338ed913f3 ANDROID: GKI: Convert NFC support as GKI module
CONFIG_NFC: NFC subsystem support

Bug: 232431151
Test: TH
Change-Id: Idc4d8c6656a8c4e36a695d9c9eb18fe20793bc76
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit 48a868ee068a7fb0989a94ab244b1ce3d26cffba)
2022-11-15 18:11:52 +00:00
Ramji Jiyani
dd503c2c08 ANDROID: GKI: Convert VLAN 8021Q as gki module
Sets following feature to module:
CONFIG_VLAN_8021Q: Create 8021Q vlan interfaces.

Bug: 232431151
Test: TH
Change-Id: I4728f03b04bb49f65838564c96f88d232cbf21e8
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit 2cf15a5bbc4a8d7e8f33a31e1647ce1095150aaa)
2022-11-15 03:43:08 +00:00
Ramji Jiyani
d1463bf566 ANDROID: GKI: Convert TIPC to gki modules
Converts following networking features to modules:

CONFIG_TIPC: The Transparent Inter Process Communication (TIPC) protocol.
CONFIG_TIPC_DIAG: TIPC: socket monitoring interface

Bug: 232431151
Test: TH
Change-Id: I370cc7a34f67222b619107d773cc4a13edd6b538
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit e516a098e2a4605ce113dc85ba6ac4c93d5136fc)
2022-11-15 03:39:18 +00:00
Ramji Jiyani
e127eb71e4 ANDROID: GKI: Add USB serial and ftdi sio modules
CONFIG_USB_SERIAL: USB Serial Converter support
CONFIG_USB_FTDI_SIO: FTDI SIO single port USB to
serial converter device.

Bug: 232431151
Test: TH
Change-Id: I1522a9beb0f70740fdce11d1c50b606d81ddf6c6
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit 1383c8eae920fe95de79d0ce39e4468ad22034d6)
2022-11-13 06:56:01 +00:00