Loading drivers/char/adsprpc.c +12 −3 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ #define FASTRPC_STATIC_HANDLE_MAX (20) #define FASTRPC_LATENCY_CTRL_ENB (1) #define MAX_SIZE_LIMIT (0x78000000) #define INIT_FILELEN_MAX (2*1024*1024) #define INIT_MEMLEN_MAX (8*1024*1024) Loading Loading @@ -951,6 +952,12 @@ static int fastrpc_mmap_create(struct fastrpc_file *fl, int fd, map->size = buf_page_size(len); } VERIFY(err, map->size >= len && map->size < MAX_SIZE_LIMIT); if (err) { err = -EFAULT; goto bail; } vmid = fl->apps->channel[fl->cid].vmid; if (!sess->smmu.enabled && !vmid) { VERIFY(err, map->phys >= me->range.addr && Loading Loading @@ -994,9 +1001,11 @@ static int fastrpc_buf_alloc(struct fastrpc_file *fl, size_t size, struct fastrpc_buf *buf = NULL, *fr = NULL; struct hlist_node *n; VERIFY(err, size > 0); if (err) VERIFY(err, size > 0 && size < MAX_SIZE_LIMIT); if (err) { err = -EFAULT; goto bail; } if (!remote) { /* find the smallest buffer that fits in the cache */ Loading Loading @@ -4076,7 +4085,7 @@ static int fastrpc_cb_probe(struct device *dev) start = 0x60000000; VERIFY(err, !IS_ERR_OR_NULL(sess->smmu.mapping = arm_iommu_create_mapping(&platform_bus_type, start, 0x78000000))); start, MAX_SIZE_LIMIT))); if (err) goto bail; Loading Loading
drivers/char/adsprpc.c +12 −3 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ #define FASTRPC_STATIC_HANDLE_MAX (20) #define FASTRPC_LATENCY_CTRL_ENB (1) #define MAX_SIZE_LIMIT (0x78000000) #define INIT_FILELEN_MAX (2*1024*1024) #define INIT_MEMLEN_MAX (8*1024*1024) Loading Loading @@ -951,6 +952,12 @@ static int fastrpc_mmap_create(struct fastrpc_file *fl, int fd, map->size = buf_page_size(len); } VERIFY(err, map->size >= len && map->size < MAX_SIZE_LIMIT); if (err) { err = -EFAULT; goto bail; } vmid = fl->apps->channel[fl->cid].vmid; if (!sess->smmu.enabled && !vmid) { VERIFY(err, map->phys >= me->range.addr && Loading Loading @@ -994,9 +1001,11 @@ static int fastrpc_buf_alloc(struct fastrpc_file *fl, size_t size, struct fastrpc_buf *buf = NULL, *fr = NULL; struct hlist_node *n; VERIFY(err, size > 0); if (err) VERIFY(err, size > 0 && size < MAX_SIZE_LIMIT); if (err) { err = -EFAULT; goto bail; } if (!remote) { /* find the smallest buffer that fits in the cache */ Loading Loading @@ -4076,7 +4085,7 @@ static int fastrpc_cb_probe(struct device *dev) start = 0x60000000; VERIFY(err, !IS_ERR_OR_NULL(sess->smmu.mapping = arm_iommu_create_mapping(&platform_bus_type, start, 0x78000000))); start, MAX_SIZE_LIMIT))); if (err) goto bail; Loading