Re: move libmm/libcpu shared files to libbsp

2013-09-05 Thread Sebastian Huber
On 2013-09-04 22:56, Hesham Moustafa wrote: Hi, Currently libmm have a routine implemented at libcpu/arm/shared Since libcpu maybe deprecated soon, I'd like to ask whether I should move this implementation to libbsp files or not. This function just apply protection attributes for a memory region

[PATCH] shell: Out-of-bounds access

2013-09-05 Thread Gedare Bloom
In case the length of cwd path plus the userScriptName exceeds PATH_MAX (255), the strncat calls will overflow scriptFile. Also check for getcwd failure. --- cpukit/libmisc/shell/shell_script.c | 23 +++ 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/cpukit/l

Re: [PATCH] shell: Out-of-bounds access

2013-09-05 Thread Gedare Bloom
On Thu, Sep 5, 2013 at 12:18 PM, Gedare Bloom wrote: > In case the length of cwd path plus the userScriptName exceeds > PATH_MAX (255), the strncat calls will overflow scriptFile. Also > check for getcwd failure. > --- > cpukit/libmisc/shell/shell_script.c | 23 +++ > 1 file

[PATCH] dosfs: Unsigned compared against 0

2013-09-05 Thread Gedare Bloom
Change the type for storing the return from iconv to be signed. --- cpukit/libfs/src/dosfs/msdos_conv_utf8.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpukit/libfs/src/dosfs/msdos_conv_utf8.c b/cpukit/libfs/src/dosfs/msdos_conv_utf8.c index a80db7e..18aebc6 100644

Re: [PATCH] dosfs: Unsigned compared against 0

2013-09-05 Thread Gedare Bloom
On Thu, Sep 5, 2013 at 1:17 PM, Gedare Bloom wrote: > Change the type for storing the return from iconv to be signed. > --- > cpukit/libfs/src/dosfs/msdos_conv_utf8.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/cpukit/libfs/src/dosfs/msdos_conv_utf8.c > b/cpuki

Re: [PATCH] dosfs: Unsigned compared against 0

2013-09-05 Thread Joel Sherrill
Gedare.. are these from Coverity Scan? They seem remarkably picky otherwise. :) If they are, ask when you want another run submitted. --joel On 9/5/2013 12:10 PM, Gedare Bloom wrote: Fix the type of "cmpltd" to be ssize_t so that assigning it to -1 will terminate processing as intended. ---

Re: [PATCH] dosfs: Unsigned compared against 0

2013-09-05 Thread Gedare Bloom
Well, I'm fixing without testing right now. A lot of these changes due to Coverity probably are not introducing easily testable cases (other than to ensure our existing tests pass). I'll try to give a good run through yet today before I finish up. If nothing seems broken I'll push them. -Gedare O

[PATCH] imfs: check return value from mkdir

2013-09-05 Thread Gedare Bloom
--- cpukit/libfs/src/imfs/imfs_load_tar.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpukit/libfs/src/imfs/imfs_load_tar.c b/cpukit/libfs/src/imfs/imfs_load_tar.c index 723699b..abb9f46 100644 --- a/cpukit/libfs/src/imfs/imfs_load_tar.c +++ b/cpukit/libfs/src/imfs/i

[PATCH] sparse-disk: check return value from semaphore_obtain/release

2013-09-05 Thread Gedare Bloom
In case obtain/release is unsuccessful, cause a fatal error. --- cpukit/libblock/src/sparse-disk.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cpukit/libblock/src/sparse-disk.c b/cpukit/libblock/src/sparse-disk.c index 987ab6d..ab6a25d 100644 --- a/cpukit/li

[PATCH] nvdisk: swap arguments to checksum helper

2013-09-05 Thread Gedare Bloom
The arguments to rtems_nvdisk_calc_crc16() are reversed when called from rtems_nvdisk_page_checksum(). 26053 Operands don't affect result --- cpukit/libblock/src/nvdisk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpukit/libblock/src/nvdisk.c b/cpukit/libblock/src/n

[PATCH] termios: check return value from semaphore obtain/release

2013-09-05 Thread Gedare Bloom
Raise a fatal error in case of failure. --- cpukit/libcsupport/src/termios.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 976c376..c462ce6 100644 --- a/cpukit/libcsupport/src/termios.c +++

[PATCH] flashdisk: swap arguments to checksum helper

2013-09-05 Thread Gedare Bloom
The arguments to rtems_fdisk_calc_crc16() are reversed when called from rtems_fdisk_page_checksum(). 26052 Operands don't affect result --- cpukit/libblock/src/flashdisk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpukit/libblock/src/flashdisk.c b/cpukit/libblock/s

Files for Coverity Scan to Ignore

2013-09-05 Thread Joel Sherrill
Hi For Coverity Scan, I am building sparc/leon3 with the following configure command: $r/configure --target=${RTEMS_TARGET} --enable-smp \ --disable-networking --disable-itron --disable-tests \ --enable-rtemsbsp=${RTEMS_BSP} >c.log 2>&1 You can configure Scan to ignore certain file patterns

[PATCH] bdpart: Argument cannot be negative

2013-09-05 Thread Gedare Bloom
If open(fd) fails then avoid the error path that calls close(fd). --- cpukit/libblock/src/bdpart-read.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cpukit/libblock/src/bdpart-read.c b/cpukit/libblock/src/bdpart-read.c index fd8a038..cfb31d5 100644 --- a/cpukit/lib

[PATCH] dosfs: Unintentional integer overflow

2013-09-05 Thread Gedare Bloom
Explicitly promote 32-bit integer to 64-bits for multiplication. --- cpukit/libfs/src/dosfs/msdos_format.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpukit/libfs/src/dosfs/msdos_format.c b/cpukit/libfs/src/dosfs/msdos_format.c index a939df5..154282f 100644 --- a/cp

[PATCH] dosfs: Unsigned compared against 0

2013-09-05 Thread Gedare Bloom
Fix the type of "cmpltd" to be ssize_t so that assigning it to -1 will terminate processing as intended. --- cpukit/libfs/src/dosfs/msdos_dir.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c index 2

[PATCH] IMFS: Resource leak

2013-09-05 Thread Gedare Bloom
Free fs_info in case root_node is NULL. --- cpukit/libfs/src/imfs/imfs_initsupp.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c index 1593076..7fe1e16 100644 --- a/cpukit/libfs/src/imfs/imfs_i

Fwd: [GSoC Mentors] GSoC 2013 Mentors/Org Admins: "Pencils Down" and Final Evaluation Dates Approaching

2013-09-05 Thread Joel Sherrill
Tick... tick.. tick.. Code needs to be flying in. -- Forwarded message -- From: Carol Smith Date: Thu, Sep 5, 2013 at 12:28 PM Subject: [GSoC Mentors] GSoC 2013 Mentors/Org Admins: "Pencils Down" and Final Evaluation Dates Approaching To: Google Summer of Code Mentors List Hi

Re: [PATCH] nvdisk: swap arguments to checksum helper

2013-09-05 Thread Gedare Bloom
You'd have to ask Chris. I suspect it never did actually work exactly right. -Gedare On Thu, Sep 5, 2013 at 2:44 PM, Joel Sherrill wrote: > How did this ever work? > > > On 9/5/2013 1:29 PM, Gedare Bloom wrote: >> >> The arguments to rtems_nvdisk_calc_crc16() are reversed when called from >> rtem

Re: [PATCH] sparse-disk: check return value from semaphore_obtain/release

2013-09-05 Thread Joel Sherrill
Sebastian may want to comment on whether we should use 0xdeadbeef or some other unique code. He has worked hard on the BSP fatal errors to be unique and (I suspect) he will have a comment on this. On 9/5/2013 1:22 PM, Gedare Bloom wrote: In case obtain/release is unsuccessful, cause a fatal erro

Re: [PATCH] dosfs: Unsigned compared against 0

2013-09-05 Thread Joel Sherrill
On 9/5/2013 12:50 PM, Gedare Bloom wrote: On Thu, Sep 5, 2013 at 1:31 PM, Joel Sherrill wrote: Gedare.. are these from Coverity Scan? They seem remarkably picky otherwise. :) Yes. I have some time to kill while I'm running some simulations. If they are, ask when you want another run submitt

Re: [PATCH] nfs: Fix ln option processing.

2013-09-05 Thread Joel Sherrill
On 9/5/2013 12:49 PM, Gedare Bloom wrote: If opts is NULL, then strchr() will dereference it and search for 's'. Is this fixed in the upstream BSD source or do we need to report a bug? 1063863 Dereference after null check --- cpukit/libfs/src/nfsclient/src/dirutils.c |2 +- 1 files chang

Re: [PATCH] dosfs: Unsigned compared against 0

2013-09-05 Thread Gedare Bloom
On Thu, Sep 5, 2013 at 1:31 PM, Joel Sherrill wrote: > Gedare.. are these from Coverity Scan? They seem > remarkably picky otherwise. :) > Yes. I have some time to kill while I'm running some simulations. > If they are, ask when you want another run submitted. > Will do. The patches need to be ap

Re: [PATCH] dosfs: Unsigned compared against 0

2013-09-05 Thread Joel Sherrill
FYI.. push them. :) On 9/5/2013 12:57 PM, Joel Sherrill wrote: On 9/5/2013 12:50 PM, Gedare Bloom wrote: On Thu, Sep 5, 2013 at 1:31 PM, Joel Sherrill wrote: Gedare.. are these from Coverity Scan? They seem remarkably picky otherwise. :) Yes. I have some time to kill while I'm running some

[PATCH] nfs: Fix ln option processing.

2013-09-05 Thread Gedare Bloom
If opts is NULL, then strchr() will dereference it and search for 's'. 1063863 Dereference after null check --- cpukit/libfs/src/nfsclient/src/dirutils.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpukit/libfs/src/nfsclient/src/dirutils.c b/cpukit/libfs/src/nfsclie

[PATCH] uuid: make integer arithmetic conversion explicit

2013-09-05 Thread Gedare Bloom
Upcast multiplication to 64-bit integer arithmetic. --- cpukit/libmisc/uuid/gen_uuid.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpukit/libmisc/uuid/gen_uuid.c b/cpukit/libmisc/uuid/gen_uuid.c index 0599637..4d10ff3 100644 --- a/cpukit/libmisc/uuid/gen_uuid.c +++ b/

[PATCH] untar: check return value from mkdir

2013-09-05 Thread Gedare Bloom
Check the return value from mkdir instead of failing silently. 1063857 Unchecked return value from library --- cpukit/libmisc/untar/untar.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c index 9ed00e9..5f16

[PATCH] dosfs: Eliminate empty case statements that fall through to default.

2013-09-05 Thread Gedare Bloom
Also eliminates possibly dead code in case the name_type can never actually be MSDOS_NAME_INVALID. 1063860 Logically dead code. --- cpukit/libfs/src/dosfs/msdos_misc.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src

Re: [PATCH] nvdisk: swap arguments to checksum helper

2013-09-05 Thread Joel Sherrill
How did this ever work? On 9/5/2013 1:29 PM, Gedare Bloom wrote: The arguments to rtems_nvdisk_calc_crc16() are reversed when called from rtems_nvdisk_page_checksum(). 26053 Operands don't affect result --- cpukit/libblock/src/nvdisk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions

[PATCH] imfs: use safe string functions

2013-09-05 Thread Gedare Bloom
Replace strcpy and strcat with counted variants. --- cpukit/libfs/src/imfs/imfs_load_tar.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cpukit/libfs/src/imfs/imfs_load_tar.c b/cpukit/libfs/src/imfs/imfs_load_tar.c index abb9f46..fd47ec2 100644 --- a/cpukit/libfs

[PATCH] Colon in module path fix

2013-09-05 Thread Mohammed Khoory
Hi, This patch fixes an issue in the RTL target code that occurs when trying to load a RAP/ELF module that is located in a directory which has a colon in it. Note: I based this commit off Peng Fan's repository. Regards, Mohammed Khoory 0001-Colon-in-module-path-fix.patch Description: Binar

Re: [PATCH] Colon in module path fix

2013-09-05 Thread Chris Johns
Mohammed Khoory wrote: This patch fixes an issue in the RTL target code that occurs when trying to load a RAP/ELF module that is located in a directory which has a colon in it. Looks fine to me. Thanks. Note: I based this commit off Peng Fan's repository. Peng, please add your repo and I