Something went wrong on our end
Select Git revision
-
Nick Kralevich authored
clatd calls mmap(MAP_LOCKED) with a 1M buffer. MAP_LOCKED first checks capable(CAP_IPC_LOCK), and then checks to see the requested amount is under RLIMIT_MEMLOCK. The latter check succeeds. As a result, clatd does not need CAP_IPC_LOCK, so we suppress any denials we see from clatd asking for this capability. See https://android-review.googlesource.com/127940 Suppresses the following denial: type=1400 audit(1424916750.163:7): avc: denied { ipc_lock } for pid=3458 comm="clatd" capability=14 scontext=u:r:clatd:s0 tcontext=u:r:clatd:s0 tclass=capability Change-Id: Ica108f66010dfc6a5431efa0b4e58f6a784672d1
Nick Kralevich authoredclatd calls mmap(MAP_LOCKED) with a 1M buffer. MAP_LOCKED first checks capable(CAP_IPC_LOCK), and then checks to see the requested amount is under RLIMIT_MEMLOCK. The latter check succeeds. As a result, clatd does not need CAP_IPC_LOCK, so we suppress any denials we see from clatd asking for this capability. See https://android-review.googlesource.com/127940 Suppresses the following denial: type=1400 audit(1424916750.163:7): avc: denied { ipc_lock } for pid=3458 comm="clatd" capability=14 scontext=u:r:clatd:s0 tcontext=u:r:clatd:s0 tclass=capability Change-Id: Ica108f66010dfc6a5431efa0b4e58f6a784672d1
ddd.m 1.62 KiB
classdef ddd < export.Data
%DDD export 3D data
%
properties
x;
y;
z;
xRange;
yRange;
end
properties(Dependent)
out;
end
methods
function obj = ddd(varargin)
obj@export.Data('N', 60);
for arg=1:2:length(varargin)
obj.(varargin{arg}) = varargin{arg + 1};
end
end
function xR = get.xRange(obj)
if isempty(obj.xRange)
xR = [obj.x(1), obj.x(end)];
else
xR = obj.xRange;
end
end
function yR = get.yRange(obj)
if isempty(obj.yRange)
yR = [obj.y(1), obj.y(end)];
else
yR = obj.yRange;
end
end
function set.z(obj, z)
obj.z = squeeze(z);
end
function out = get.out(obj)
o.x = linspace(obj.xRange(1), obj.xRange(2), obj.N);
o.y = linspace(obj.yRange(1), obj.yRange(2), obj.N);
[o.x, o.y] = meshgrid(o.x, o.y);
[grid.x, grid.y] = meshgrid(obj.x, obj.y);
o.z = interp2(grid.x, grid.y, obj.z', o.x, o.y);
out = [o.x(:), o.y(:), o.z(:)];
end
function i = isempty(obj)
i = isempty(obj.x) || isempty(obj.y) || isempty(obj.z);
end
end
methods( Access = protected)
function innerexport(obj)
o = obj.out;
save(obj.path, 'o', '-ascii', '-tabs')
end
end
end