StratifyLabs / StratifyOS

A Powerful embedded RTOS for ARM Cortex M microcontrollers
https://stratifylabs.co
Other
116 stars 23 forks source link

In appfs, find_protectable_free() must have skip_protection argument set to 0 #194

Open tyler-gilbert opened 5 years ago

tyler-gilbert commented 5 years ago

Code snippet from appfs_util_root_create()

        //find space for the code -- this doesn't need to be protectable
        code_start_addr = find_protectable_free(dev, type, dest->exec.code_size, &page, 0);
        if ( code_start_addr == (u32)-1 ){
            return SYSFS_SET_RETURN(ENOSPC);
        }

The last arg of find_protectable_free() should be 1 (because files don't need to be a in protectable region) but doing that causes problems.