Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33bfb9f0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes I3851a668,I71e06a81 into msm-next

* changes:
  msm: secure_buffer: Update the hyp_assign_phys() api
  msm: kgsl: Add EXEC permission to the unassign call
parents 800de8bb 3bfdd36d
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -319,12 +319,11 @@ int hyp_assign_table(struct sg_table *table,
	return ret;
}

int hyp_assign_phys(phys_addr_t addr, u64 size,
			int *dest_vmids, int *dest_perms,
			int dest_nelems)
int hyp_assign_phys(phys_addr_t addr, u64 size, u32 *source_vm_list,
			int source_nelems, int *dest_vmids,
			int *dest_perms, int dest_nelems)
{
	struct sg_table *table;
	u32 source_vm;
	int ret;

	table = kzalloc(sizeof(struct sg_table), GFP_KERNEL);
@@ -336,9 +335,7 @@ int hyp_assign_phys(phys_addr_t addr, u64 size,

	sg_set_page(table->sgl, phys_to_page(addr), size, 0);

	source_vm = VMID_HLOS;

	ret = hyp_assign_table(table, &source_vm, 1, dest_vmids,
	ret = hyp_assign_table(table, source_vm_list, source_nelems, dest_vmids,
						dest_perms, dest_nelems);
	if (ret)
		goto err2;
+9 −6
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -30,6 +30,7 @@

#define PERM_READ                       0x4
#define PERM_WRITE                      0x2
#define PERM_EXEC			0x1

#ifdef CONFIG_QCOM_SECURE_BUFFER
int msm_secure_table(struct sg_table *table);
@@ -39,8 +40,8 @@ int hyp_assign_table(struct sg_table *table,
			int *dest_vmids, int *dest_perms,
			int dest_nelems);
int hyp_assign_phys(phys_addr_t addr, u64 size,
			int *dest_vmids, int *dest_perms,
			int dest_nelems);
			u32 *source_vmlist, int source_nelems,
			int *dest_vmids, int *dest_perms, int dest_nelems);
bool msm_secure_v2_is_supported(void);
#else
static inline int msm_secure_table(struct sg_table *table)
@@ -58,12 +59,14 @@ int hyp_assign_table(struct sg_table *table,
{
	return -EINVAL;
}
int hyp_assign_phys(phys_addr_t addr, u64 size,
			int *dest_vmids, int *dest_perms,
			int dest_nelems)

static inline int hyp_assign_phys(phys_addr_t addr, u64 size,
			u32 *source_vmlist, int source_nelems,
			int *dest_vmids, int *dest_perms, int dest_nelems)
{
	return -EINVAL;
}

static inline bool msm_secure_v2_is_supported(void)
{
	return false;