summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't redefine __constHEADmasterStewart Smith2017-12-011-7/+0
| | | | | | This would break compiling on RHEL6/CentOS6 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* clib: explicitly include clib/builtin.hStewart Smith2017-11-306-6/+6
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* README: add build instructionsStewart Smith2017-11-301-1/+5
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* clib: include system assert.hStewart Smith2017-11-301-1/+1
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Remove references to removed clib/assert.hStewart Smith2017-11-3011-12/+0
| | | | | Fixes: 281345fdc962398cfdb5a25f2794f0b1c1418728 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* fix high memory usage during any operation with '--buffer'Stewart Smith2017-11-3016-151/+17
| | | | | | | | | | | | | | | | | | | | | The --buffer command line option was passed to setvbuf(3). Computers are fast enough and libc is good enough that we realistically do not need this. Hostboot's buildpnor.pl would pass --buffer 0x40000000 which resulted in a malloc(2GB), which would fail on systems with less than 2GB of memory because sometimes libc and the kernel are sane. So, we keep the command line option for backwards compatibility but completely ignore it. In the few places where it was used to allocate a buffer to do work in (and this was via a rather round-about way), we instead just allocate something the size of the PNOR image. Fixes: https://github.com/open-power/ffs/issues/7 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* fpart: make test run valgrind cleanStewart Smith2017-11-302-10/+29
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Merge branch 'bugfixes' of https://github.com/stewart-ibm/ffsStewart Smith2017-11-302-17/+12
|\
| * fpart/libffs doesn't initialized reserved FFS header to 0Stewart Smith2015-12-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running the fpart test suite under valgrind, you can see that it writes unitialized data to disk (pnor) in the very first test: ./fpart/fpart --target /tmp/create.nor --size 64MiB --block 64kb \ --partition-offset 0x7f0000 --create This is because libffs.c doesn't properly initialize the reserved area. Thus, it could contain any old crap sitting around in memory, essentially making the reserved fields useless. Somebody will need to audit *EVERY* libffs created thing in the wild before ever using that reserved space. ==8261== Syscall param write(buf) points to uninitialised byte(s) ==8261== at 0x4F27C20: __write_nocancel (syscall-template.S:84) ==8261== by 0x4EAE1DE: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1263) ==8261== by 0x4EAF978: new_do_write (fileops.c:518) ==8261== by 0x4EAF978: _IO_do_write@@GLIBC_2.2.5 (fileops.c:494) ==8261== by 0x4EAD9DF: _IO_file_sync@@GLIBC_2.2.5 (fileops.c:874) ==8261== by 0x4EA2FEE: fflush (iofflush.c:41) ==8261== by 0x406D31: ffs_flush (libffs.c:635) ==8261== by 0x408304: __ffs_fclose (libffs.c:718) ==8261== by 0x4032D9: __cleanup_ffs (cmd_create.c:108) ==8261== by 0x4032D9: create.5128 (cmd_create.c:108) ==8261== by 0x4056D2: command (command.c:229) ==8261== by 0x403400: command_create (cmd_create.c:118) ==8261== by 0x4018F8: process_args (main.c:431) ==8261== by 0x4018F8: main (main.c:565) ==8261== Address 0x402201c is in a rw- anonymous segment Fixes: https://github.com/open-power/ffs/issues/11 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| * Don't use fsync(): it's not neededStewart Smith2015-12-151-12/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| * use open/read/write for create_regular_fileStewart Smith2015-12-151-5/+8
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Add skeleton READMEStewart Smith2017-11-301-0/+6
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge fix for TOC > 4kStewart Smith2017-11-302-0/+33
|\ \ | | | | | | | | | https://github.com/open-power/ffs/pull/14
| * | Update libffs to increment part entry and TOC size infoChristian Geddes2017-11-202-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this commit , the size of the Table of Contents noted by ffs_hdr->size was getting defaulted to 4kb (1 hostboot pagesize) There should be no limitation on the size of the toc, but this size was not getting incremented if there were enough entries to push the size of the toc over 4kb. This commit adds logic to increate the ffs_hdr->size as well as the "part" ffs_entries's size as we add entries to the ffs_hdr
* | | Add .gitignoreStewart Smith2017-11-301-0/+22
| |/ |/| | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix make distcheckStewart Smith2015-12-151-3/+40
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | use trusty travis envStewart Smith2015-12-151-0/+3
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused mqStewart Smith2015-12-154-448/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove AC_CHECK_HEADER_STDBOOLStewart Smith2015-12-151-1/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove autoconf 2.69 requiremntStewart Smith2015-12-151-1/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Update travis-ci.yml for autotoolsStewart Smith2015-12-151-2/+2
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove custom assert implementation and exception.cStewart Smith2015-12-1528-546/+8
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Move to autotoolsStewart Smith2015-12-1527-1179/+98
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused ctz builtin definesStewart Smith2015-12-151-48/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Remove #define parity __builtin_parityStewart Smith2015-12-152-10/+1
| | | | | | | | | | | | | | we already used __builtin_parityll explicitly, no need to keep around this define Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove likely/unlikely: nothing is *that* perf criticalStewart Smith2015-12-154-40/+24
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove crc32 - use sha1sum in test case insteadStewart Smith2015-12-155-309/+4
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove more unused memory_leak_detection codeStewart Smith2015-12-152-1276/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused slabStewart Smith2015-12-157-488/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused db.c/db.hStewart Smith2015-12-153-859/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused signalStewart Smith2015-12-153-223/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused heapStewart Smith2015-12-154-281/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused arrayStewart Smith2015-12-156-1569/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused dispatch and watchStewart Smith2015-12-157-620/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused stack.hStewart Smith2015-12-152-107/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused vector and vector_iterStewart Smith2015-12-159-1774/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused timer.hStewart Smith2015-12-151-84/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused map and map_iterStewart Smith2015-12-155-826/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused bitsetStewart Smith2015-12-151-366/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | remove unused table and table_iterStewart Smith2015-12-156-1399/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Remove unused memory_leak_detection.hStewart Smith2015-12-154-381/+0
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | add running of fpart test to travisStewart Smith2015-12-151-0/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | add .travis.yml for travis-ciStewart Smith2015-12-151-0/+5
|/ | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Merge pull request #4 from anoo1/masterPatrick Williams2015-04-2249-279/+314
|\ | | | | Support to compile in 64bit for Ubuntu Little Endian
| * Support to compile in 64bit for Ubuntu Little EndianAdriana Kobylak2015-02-1849-279/+314
|/
* Merge pull request #2 from bradbishop/masterPatrick Williams2015-01-16173-2875/+4278
|\ | | | | Use correct (Apache) license.
| * Use correct (Apache) license.Brad Bishop2015-01-07173-2875/+4278
| |
* | Merge pull request #3 from bradbishop/hashPatrick Williams2015-01-161-194/+0
|\ \ | |/ |/| Remove some unused hash function.
| * Remove some unused hash function.Brad Bishop2015-01-081-194/+0
|/
* Port FFS tools over from Building Block repository.Brad Bishop2014-07-02179-0/+34179
OpenPOWER on IntegriCloud