Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 5 Sep 2013 09:26:35 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Daniel's weekly report #12

On 5 Sep, 2013, at 4:00 , Dániel Bali <balijanosdaniel@...il.com> wrote:
> I have a question about loading kernels from binaries. 
> I see that the "opencl_build_from_binary" function is responsible for this,
> and it is called from "opencl_build_kernel_save". I'm not sure I understand this part:
> 
> //Select the kernel to run.
> if (!stat(path_expand(bin_name), &bin_stat) && (source_stat.st_mtime < bin_stat.st_mtime)) {
> 	read_kernel_source(bin_name);
> 	opencl_build_from_binary(sequential_id);
> }
> 
> Is this only used for saving binaries and not loading them?

It's caching (some kernels take a long time to build). If mtime of binary is newer than mtime of source, we deem the cached copy valid and build from it.

> I tried to run a format so that the binary is generated and then remove the kernel source and it failed.

No you can't remove the source but the cached binary will be used. You can remove the binary, and it will be re-built.

magnum


Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ