itri-sofa / sofa Goto Github PK
View Code? Open in Web Editor NEWSOFA (Software Orchestrated Flash Array) is a log-structured flash array management system
License: Apache License 2.0
SOFA (Software Orchestrated Flash Array) is a log-structured flash array management system
License: Apache License 2.0
Reported by Cppcheck:
[src/common/sofa_config.c:972]: (error) Buffer is accessed out of bounds: osdisk_name
The corresponding code:
if (fgets(osdisk_name, CFG_VALSET_STR_LEN, fp) != NULL) {
if (osdisk_name[0] != 0) {
_remove_char_str(osdisk_name, strlen(osdisk_name), '\n');
set_config_item(STR_OSDISK_NAME, osdisk_name, NULL);
strcpy(osdisk_ret, osdisk_name);
syslog(LOG_INFO, "[SOFA] USERD INFO get os disk: %s\n",
osdisk_name);
ret = 0;
} else {
Quoted from Deprecated string input functions - fget:
The fgets ("file get string") function is similar to the gets function. This function is deprecated -- that means it is obsolete and it is strongly suggested you do not use it -- because it is dangerous. It is dangerous because if the input data contains a null character, you can't tell. Don't use fgets unless you know the data cannot contain a null. Don't use it to read files edited by the user because, if the user inserts a null character, you should either handle it properly or print a clear error message. Always use getline or getdelim instead of fgets if you can.
Each source file contains the ASF notice:
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
However, there is no NOTICE
file, which should contain the copyright owner information.
Example in Apache Impala: https://github.com/apache/impala/blob/master/NOTICE.txt
The source file src/sofa_main/sofa_module_init.c
declares itself as Apache License v2. However, by the end of this file, the kernel module are about to be registered as GPL via the macro MODULE_LICENSE("GPL")
. The incompatibility between GPLv2/v3 and Apache License were discussed here: https://www.apache.org/licenses/GPL-compatibility.html
Therefore, the current implementation causes the uncertainty regarding licensing terms in sofa module for Linux kernel.
Not every piece of code is written by ITRI. For example, the files in directory src_miscComp/sofa_monitor/SOFAUI/web/jLego/js/addOns/jQuery
are indeed from external jQuery, which is licensed in MIT-style licensing terms. The top-level documentation should clarify and address the third-party packages.
The file release_notes.txt
mentions the following policy on versions:
Our SOFA starts with 1.0.0 version and follows the rule of Linux Kernel release.
However, such odd-unstable/even-stable style of versioning is already dropped by Linux kernel. Thus, it is not an effective role model to refer.
Please refer to the link provided by jserv.
https://en.wikipedia.org/wiki/Copyright_notice
The build script attempts to package sofa.ko
into single RPM, that causes several problems:
To overcome the above, decoupling Linux kernel modules from sofa package is a feasible approach. That is, there should be at least two packages: 1) sofa service/utility; 2) sofa kernel module for Linux;
I managed to build sofa
on Ubuntu Linux 18.04-LTS which is based on Linux kernel version 4.15. However, I failed to build Linux kernel module. Here are the instructions to reproduce:
cd src
sh build_sofa.sh
The build system complained as following:
sofa/src/storage_core/lfsm/common/mem_manager.c: In function 'init_memory_manager':
sofa/src/storage_core/lfsm/common/mem_manager.c:42:10: error: implicit declaration of function 'bioset_init'; did you mean 'bio_init'? [-Werror=implicit-function-declaration]
bioset_init(&memMgr.bioset, bio_pool_size, 0,
^~~~~~~~~~~
bio_init
sofa/src/storage_core/lfsm/common/mem_manager.c: In function 'rel_memory_manager':
sofa/src/storage_core/lfsm/common/mem_manager.c:115:5: error: implicit declaration of function 'bioset_exit'; did you mean 'bioset_free'? [-Werror=implicit-function-declaration]
bioset_exit(&memMgr.bioset);
^~~~~~~~~~~
bioset_free
cc1: some warnings being treated as errors
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.