Merge "Merge keystone/android12-5.10-keystone-qcom-release.43+ (23a1eb5
) into msm-5.10"
This commit is contained in:
commit
b1d54dfaf7
File diff suppressed because it is too large
Load Diff
@ -281,7 +281,6 @@
|
||||
debugfs_create_symlink
|
||||
debugfs_create_u32
|
||||
debugfs_create_u64
|
||||
debugfs_create_u8
|
||||
debugfs_create_x32
|
||||
debugfs_lookup
|
||||
debugfs_remove
|
||||
@ -393,7 +392,6 @@
|
||||
devm_of_phy_get_by_index
|
||||
__devm_of_phy_provider_register
|
||||
devm_of_platform_populate
|
||||
devm_of_pwm_get
|
||||
devm_phy_create
|
||||
devm_phy_get
|
||||
devm_pinctrl_get
|
||||
@ -513,6 +511,7 @@
|
||||
dma_pool_destroy
|
||||
dma_pool_free
|
||||
dma_resv_wait_timeout_rcu
|
||||
dma_run_dependencies
|
||||
dma_set_coherent_mask
|
||||
dma_set_mask
|
||||
dma_sync_sg_for_cpu
|
||||
@ -1005,7 +1004,6 @@
|
||||
kvmalloc_node
|
||||
led_classdev_flash_register_ext
|
||||
led_classdev_flash_unregister
|
||||
led_classdev_unregister
|
||||
led_get_flash_fault
|
||||
led_set_brightness_sync
|
||||
led_set_flash_brightness
|
||||
@ -1183,6 +1181,7 @@
|
||||
of_find_device_by_node
|
||||
of_find_matching_node_and_match
|
||||
of_find_node_by_name
|
||||
of_find_node_by_phandle
|
||||
of_find_node_opts_by_path
|
||||
of_find_node_with_property
|
||||
of_find_property
|
||||
@ -1556,7 +1555,6 @@
|
||||
sdio_writel
|
||||
sdio_writesb
|
||||
send_sig
|
||||
send_sig_info
|
||||
seq_hex_dump
|
||||
seq_lseek
|
||||
seq_open
|
||||
@ -1732,8 +1730,6 @@
|
||||
syscon_node_to_regmap
|
||||
syscon_regmap_lookup_by_compatible
|
||||
syscon_regmap_lookup_by_phandle
|
||||
syscore_resume
|
||||
syscore_suspend
|
||||
sysfs_create_bin_file
|
||||
sysfs_create_file_ns
|
||||
sysfs_create_group
|
||||
@ -1758,6 +1754,7 @@
|
||||
tasklet_init
|
||||
tasklet_kill
|
||||
__tasklet_schedule
|
||||
tasklet_setup
|
||||
tasklist_lock
|
||||
__task_pid_nr_ns
|
||||
__task_rq_lock
|
||||
@ -2193,4 +2190,10 @@
|
||||
zlib_deflate_workspacesize
|
||||
|
||||
# preserved by --additions-only
|
||||
debugfs_create_u8
|
||||
devm_of_pwm_get
|
||||
led_classdev_unregister
|
||||
send_sig_info
|
||||
syscore_resume
|
||||
syscore_suspend
|
||||
v4l2_m2m_buf_remove_by_buf
|
||||
|
@ -242,6 +242,7 @@
|
||||
copy_from_kernel_nofault
|
||||
__cpu_active_mask
|
||||
cpu_bit_bitmap
|
||||
cpufreq_cooling_unregister
|
||||
cpufreq_cpu_get
|
||||
cpufreq_cpu_get_raw
|
||||
cpufreq_cpu_put
|
||||
|
@ -321,6 +321,9 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_force_compatible_pre);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_force_compatible_post);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_uid);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_user);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_freq_qos_add_request);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_freq_qos_update_request);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_freq_qos_remove_request);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_balance_anon_file_reclaim);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_enter);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_exit);
|
||||
|
@ -173,12 +173,17 @@ static void dma_buf_vma_close(struct vm_area_struct *vma)
|
||||
|
||||
static int dma_buf_do_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
|
||||
{
|
||||
/* call this first because the exporter might override vma->vm_ops */
|
||||
int ret = dmabuf->ops->mmap(dmabuf, vma);
|
||||
int ret;
|
||||
struct file *orig_vm_file = vma->vm_file;
|
||||
|
||||
/* call this first because the exporter might override vma->vm_ops */
|
||||
ret = dmabuf->ops->mmap(dmabuf, vma);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (orig_vm_file != vma->vm_file)
|
||||
return 0;
|
||||
|
||||
/* save the exporter provided vm_ops */
|
||||
dmabuf->exp_vm_ops = vma->vm_ops;
|
||||
dmabuf->vm_ops = *(dmabuf->exp_vm_ops);
|
||||
|
@ -126,6 +126,7 @@ config SCSI_UFS_MEDIATEK
|
||||
tristate "Mediatek specific hooks to UFS controller platform driver"
|
||||
depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK
|
||||
select PHY_MTK_UFS
|
||||
select RESET_TI_SYSCON
|
||||
help
|
||||
This selects the Mediatek specific additions to UFSHCD platform driver.
|
||||
UFS host on Mediatek needs some vendor specific configuration before
|
||||
|
@ -595,11 +595,23 @@ static void ufs_mtk_get_controller_version(struct ufs_hba *hba)
|
||||
|
||||
ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_LOCALVERINFO), &ver);
|
||||
if (!ret) {
|
||||
if (ver >= UFS_UNIPRO_VER_1_8)
|
||||
if (ver >= UFS_UNIPRO_VER_1_8) {
|
||||
host->hw_ver.major = 3;
|
||||
/*
|
||||
* Fix HCI version for some platforms with
|
||||
* incorrect version
|
||||
*/
|
||||
if (hba->ufs_version < ufshci_version(3, 0))
|
||||
hba->ufs_version = ufshci_version(3, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static u32 ufs_mtk_get_ufs_hci_version(struct ufs_hba *hba)
|
||||
{
|
||||
return hba->ufs_version;
|
||||
}
|
||||
|
||||
/**
|
||||
* ufs_mtk_init - find other essential mmio bases
|
||||
* @hba: host controller instance
|
||||
@ -853,6 +865,9 @@ static int ufs_mtk_device_reset(struct ufs_hba *hba)
|
||||
{
|
||||
struct arm_smccc_res res;
|
||||
|
||||
/* disable hba before device reset */
|
||||
ufshcd_hba_stop(hba);
|
||||
|
||||
ufs_mtk_device_reset_ctrl(0, res);
|
||||
|
||||
/*
|
||||
@ -1055,6 +1070,7 @@ static void ufs_mtk_event_notify(struct ufs_hba *hba,
|
||||
static const struct ufs_hba_variant_ops ufs_hba_mtk_vops = {
|
||||
.name = "mediatek.ufshci",
|
||||
.init = ufs_mtk_init,
|
||||
.get_ufs_hci_version = ufs_mtk_get_ufs_hci_version,
|
||||
.setup_clocks = ufs_mtk_setup_clocks,
|
||||
.hce_enable_notify = ufs_mtk_hce_enable_notify,
|
||||
.link_startup_notify = ufs_mtk_link_startup_notify,
|
||||
@ -1078,12 +1094,42 @@ static int ufs_mtk_probe(struct platform_device *pdev)
|
||||
{
|
||||
int err;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *reset_node;
|
||||
struct platform_device *reset_pdev;
|
||||
struct device_link *link;
|
||||
|
||||
reset_node = of_find_compatible_node(NULL, NULL,
|
||||
"ti,syscon-reset");
|
||||
if (!reset_node) {
|
||||
dev_notice(dev, "find ti,syscon-reset fail\n");
|
||||
goto skip_reset;
|
||||
}
|
||||
reset_pdev = of_find_device_by_node(reset_node);
|
||||
if (!reset_pdev) {
|
||||
dev_notice(dev, "find reset_pdev fail\n");
|
||||
goto skip_reset;
|
||||
}
|
||||
link = device_link_add(dev, &reset_pdev->dev,
|
||||
DL_FLAG_AUTOPROBE_CONSUMER);
|
||||
if (!link) {
|
||||
dev_notice(dev, "add reset device_link fail\n");
|
||||
goto skip_reset;
|
||||
}
|
||||
/* supplier is not probed */
|
||||
if (link->status == DL_STATE_DORMANT) {
|
||||
err = -EPROBE_DEFER;
|
||||
goto out;
|
||||
}
|
||||
|
||||
skip_reset:
|
||||
/* perform generic probe */
|
||||
err = ufshcd_pltfrm_init(pdev, &ufs_hba_mtk_vops);
|
||||
|
||||
out:
|
||||
if (err)
|
||||
dev_info(dev, "probe failed %d\n", err);
|
||||
|
||||
of_node_put(reset_node);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -4474,7 +4474,7 @@ EXPORT_SYMBOL_GPL(ufshcd_make_hba_operational);
|
||||
* ufshcd_hba_stop - Send controller to reset state
|
||||
* @hba: per adapter instance
|
||||
*/
|
||||
static inline void ufshcd_hba_stop(struct ufs_hba *hba)
|
||||
void ufshcd_hba_stop(struct ufs_hba *hba)
|
||||
{
|
||||
unsigned long flags;
|
||||
int err;
|
||||
@ -4493,6 +4493,7 @@ static inline void ufshcd_hba_stop(struct ufs_hba *hba)
|
||||
if (err)
|
||||
dev_err(hba->dev, "%s: Controller disable failed\n", __func__);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufshcd_hba_stop);
|
||||
|
||||
/**
|
||||
* ufshcd_hba_execute_hce - initialize the controller
|
||||
|
@ -976,6 +976,7 @@ int ufshcd_wait_for_register(struct ufs_hba *hba, u32 reg, u32 mask,
|
||||
unsigned long timeout_ms);
|
||||
void ufshcd_parse_dev_ref_clk_freq(struct ufs_hba *hba, struct clk *refclk);
|
||||
void ufshcd_update_evt_hist(struct ufs_hba *hba, u32 id, u32 val);
|
||||
void ufshcd_hba_stop(struct ufs_hba *hba);
|
||||
|
||||
static inline void check_upiu_size(void)
|
||||
{
|
||||
|
@ -894,6 +894,8 @@ static void ashmem_show_fdinfo(struct seq_file *m, struct file *file)
|
||||
seq_printf(m, "name:\t%s\n",
|
||||
asma->name + ASHMEM_NAME_PREFIX_LEN);
|
||||
|
||||
seq_printf(m, "size:\t%zu\n", asma->size);
|
||||
|
||||
mutex_unlock(&ashmem_mutex);
|
||||
}
|
||||
#endif
|
||||
|
@ -20,6 +20,23 @@ DECLARE_HOOK(android_vh_try_to_freeze_todo_unfrozen,
|
||||
TP_PROTO(struct task_struct *p),
|
||||
TP_ARGS(p));
|
||||
|
||||
enum freq_qos_req_type;
|
||||
struct freq_qos_request;
|
||||
struct freq_constraints;
|
||||
|
||||
DECLARE_HOOK(android_vh_freq_qos_add_request,
|
||||
TP_PROTO(struct freq_constraints *qos, struct freq_qos_request *req,
|
||||
enum freq_qos_req_type type, int value, int ret),
|
||||
TP_ARGS(qos, req, type, value, ret));
|
||||
|
||||
DECLARE_HOOK(android_vh_freq_qos_update_request,
|
||||
TP_PROTO(struct freq_qos_request *req, int value),
|
||||
TP_ARGS(req, value));
|
||||
|
||||
DECLARE_HOOK(android_vh_freq_qos_remove_request,
|
||||
TP_PROTO(struct freq_qos_request *req),
|
||||
TP_ARGS(req));
|
||||
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_POWER_H */
|
||||
|
@ -38,6 +38,9 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/export.h>
|
||||
#include <trace/events/power.h>
|
||||
#undef CREATE_TRACE_POINT
|
||||
#include <trace/hooks/power.h>
|
||||
|
||||
|
||||
/*
|
||||
* locking rule: all changes to constraints or notifiers lists
|
||||
@ -546,6 +549,7 @@ int freq_qos_add_request(struct freq_constraints *qos,
|
||||
req->type = 0;
|
||||
}
|
||||
|
||||
trace_android_vh_freq_qos_add_request(qos, req, type, value, ret);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(freq_qos_add_request);
|
||||
@ -570,6 +574,7 @@ int freq_qos_update_request(struct freq_qos_request *req, s32 new_value)
|
||||
"%s() called for unknown object\n", __func__))
|
||||
return -EINVAL;
|
||||
|
||||
trace_android_vh_freq_qos_update_request(req, new_value);
|
||||
if (req->pnode.prio == new_value)
|
||||
return 0;
|
||||
|
||||
@ -598,6 +603,7 @@ int freq_qos_remove_request(struct freq_qos_request *req)
|
||||
"%s() called for unknown object\n", __func__))
|
||||
return -EINVAL;
|
||||
|
||||
trace_android_vh_freq_qos_remove_request(req);
|
||||
ret = freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
|
||||
req->qos = NULL;
|
||||
req->type = 0;
|
||||
|
@ -685,8 +685,6 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)
|
||||
pr_err("=============================================================================\n");
|
||||
pr_err("BUG %s (%s): %pV\n", s->name, print_tainted(), &vaf);
|
||||
pr_err("-----------------------------------------------------------------------------\n\n");
|
||||
|
||||
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@ -760,6 +758,7 @@ void object_err(struct kmem_cache *s, struct page *page,
|
||||
{
|
||||
slab_bug(s, "%s", reason);
|
||||
print_trailer(s, page, object);
|
||||
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
|
||||
}
|
||||
|
||||
static __printf(3, 4) void slab_err(struct kmem_cache *s, struct page *page,
|
||||
@ -774,6 +773,7 @@ static __printf(3, 4) void slab_err(struct kmem_cache *s, struct page *page,
|
||||
slab_bug(s, "%s", buf);
|
||||
print_page_info(page);
|
||||
dump_stack();
|
||||
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
|
||||
}
|
||||
|
||||
static void init_object(struct kmem_cache *s, void *object, u8 val)
|
||||
@ -822,6 +822,7 @@ static int check_bytes_and_report(struct kmem_cache *s, struct page *page,
|
||||
fault, end - 1, fault - addr,
|
||||
fault[0], value);
|
||||
print_trailer(s, page, object);
|
||||
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
|
||||
|
||||
restore_bytes(s, what, value, fault, end);
|
||||
return 0;
|
||||
|
@ -117,7 +117,8 @@ struct security_class_mapping secclass_map[] = {
|
||||
{ COMMON_IPC_PERMS, NULL } },
|
||||
{ "netlink_route_socket",
|
||||
{ COMMON_SOCK_PERMS,
|
||||
"nlmsg_read", "nlmsg_write", "nlmsg_readpriv", NULL } },
|
||||
"nlmsg_read", "nlmsg_write", "nlmsg_readpriv", "nlmsg_getneigh",
|
||||
NULL } },
|
||||
{ "netlink_tcpdiag_socket",
|
||||
{ COMMON_SOCK_PERMS,
|
||||
"nlmsg_read", "nlmsg_write", NULL } },
|
||||
|
@ -98,6 +98,7 @@ struct selinux_state {
|
||||
bool initialized;
|
||||
bool policycap[__POLICYDB_CAPABILITY_MAX];
|
||||
bool android_netlink_route;
|
||||
bool android_netlink_getneigh;
|
||||
|
||||
struct page *status_page;
|
||||
struct mutex status_lock;
|
||||
@ -227,6 +228,13 @@ static inline bool selinux_android_nlroute_getlink(void)
|
||||
return state->android_netlink_route;
|
||||
}
|
||||
|
||||
static inline bool selinux_android_nlroute_getneigh(void)
|
||||
{
|
||||
struct selinux_state *state = &selinux_state;
|
||||
|
||||
return state->android_netlink_getneigh;
|
||||
}
|
||||
|
||||
struct selinux_policy_convert_data;
|
||||
|
||||
struct selinux_load_state {
|
||||
|
@ -212,12 +212,12 @@ int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm)
|
||||
return err;
|
||||
}
|
||||
|
||||
static void nlmsg_set_getlink_perm(u32 perm)
|
||||
static void nlmsg_set_perm_for_type(u32 perm, u16 type)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(nlmsg_route_perms); i++) {
|
||||
if (nlmsg_route_perms[i].nlmsg_type == RTM_GETLINK) {
|
||||
if (nlmsg_route_perms[i].nlmsg_type == type) {
|
||||
nlmsg_route_perms[i].perm = perm;
|
||||
break;
|
||||
}
|
||||
@ -227,11 +227,27 @@ static void nlmsg_set_getlink_perm(u32 perm)
|
||||
/**
|
||||
* Use nlmsg_readpriv as the permission for RTM_GETLINK messages if the
|
||||
* netlink_route_getlink policy capability is set. Otherwise use nlmsg_read.
|
||||
* Similarly, use nlmsg_getneigh for RTM_GETNEIGH and RTM_GETNEIGHTBL if the
|
||||
* netlink_route_getneigh policy capability is set. Otherwise use nlmsg_read.
|
||||
*/
|
||||
void selinux_nlmsg_init(void)
|
||||
{
|
||||
if (selinux_android_nlroute_getlink())
|
||||
nlmsg_set_getlink_perm(NETLINK_ROUTE_SOCKET__NLMSG_READPRIV);
|
||||
nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_READPRIV,
|
||||
RTM_GETLINK);
|
||||
else
|
||||
nlmsg_set_getlink_perm(NETLINK_ROUTE_SOCKET__NLMSG_READ);
|
||||
nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_READ,
|
||||
RTM_GETLINK);
|
||||
|
||||
if (selinux_android_nlroute_getneigh()) {
|
||||
nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_GETNEIGH,
|
||||
RTM_GETNEIGH);
|
||||
nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_GETNEIGH,
|
||||
RTM_GETNEIGHTBL);
|
||||
} else {
|
||||
nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_READ,
|
||||
RTM_GETNEIGH);
|
||||
nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_READ,
|
||||
RTM_GETNEIGHTBL);
|
||||
}
|
||||
}
|
||||
|
@ -2497,6 +2497,10 @@ int policydb_read(struct policydb *p, void *fp)
|
||||
p->android_netlink_route = 1;
|
||||
}
|
||||
|
||||
if ((le32_to_cpu(buf[1]) & POLICYDB_CONFIG_ANDROID_NETLINK_GETNEIGH)) {
|
||||
p->android_netlink_getneigh = 1;
|
||||
}
|
||||
|
||||
if (p->policyvers >= POLICYDB_VERSION_POLCAP) {
|
||||
rc = ebitmap_read(&p->policycaps, fp);
|
||||
if (rc)
|
||||
|
@ -239,6 +239,7 @@ struct genfs {
|
||||
struct policydb {
|
||||
int mls_enabled;
|
||||
int android_netlink_route;
|
||||
int android_netlink_getneigh;
|
||||
|
||||
/* symbol tables */
|
||||
struct symtab symtab[SYM_NUM];
|
||||
@ -336,6 +337,7 @@ extern struct role_trans_datum *policydb_roletr_search(
|
||||
|
||||
#define POLICYDB_CONFIG_MLS 1
|
||||
#define POLICYDB_CONFIG_ANDROID_NETLINK_ROUTE (1 << 31)
|
||||
#define POLICYDB_CONFIG_ANDROID_NETLINK_GETNEIGH (1 << 30)
|
||||
|
||||
/* the config flags related to unknown classes/perms are bits 2 and 3 */
|
||||
#define REJECT_UNKNOWN 0x00000002
|
||||
|
@ -2162,6 +2162,7 @@ static void security_load_policycaps(struct selinux_state *state,
|
||||
}
|
||||
|
||||
state->android_netlink_route = p->android_netlink_route;
|
||||
state->android_netlink_getneigh = p->android_netlink_getneigh;
|
||||
selinux_nlmsg_init();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user