linux/scripts
Masahiro Yamada 01b5cbe701 fixdep: use malloc() and read() to load dep_file to buffer
Commit dee81e9886 ("fixdep: faster CONFIG_ search") changed how to
read files in which CONFIG options are searched.  It used malloc()
and read() instead of mmap() because it needed to zero-terminate the
buffer in order to use strstr().  print_deps() was left untouched
since there was no reason to change it.

Now, I have two motivations to change it in the same way.

 - do_config_file() and print_deps() do quite similar things; they
   open a file, load it onto memory, and pass it to a parser function.
   If we use malloc() and read() for print_deps() too, we can factor
   out the common code.  (I will do this in the next commit.)

 - parse_dep_file() copies each token to a temporary buffer because
   it needs to zero-terminate it to be passed to printf().  It is not
   possible to modify the buffer directly because it is mmap'ed with
   O_RDONLY.  If we load the file content into a malloc'ed buffer, we
   can insert '\0' after each token, and save memcpy().  (I will do
   this in the commit after next.)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-01-18 09:37:37 +09:00
..
basic fixdep: use malloc() and read() to load dep_file to buffer 2018-01-18 09:37:37 +09:00
coccinelle Coccinelle: Remove setup_timer.cocci 2017-11-21 15:57:11 -08:00
dtc DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
gcc-plugins
gdb
genksyms
kconfig kconfig/symbol.c: use correct pointer type argument for sizeof 2017-11-23 23:12:02 +09:00
ksymoops
mod Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-11-15 11:56:19 -08:00
package kbuild: rpm: prompt to use "rpm-pkg" if "rpm" target is used 2017-11-23 23:12:05 +09:00
selinux Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
tracing
.gitignore
adjust_autoksyms.sh
asn1_compiler.c
bloat-o-meter scripts/bloat-o-meter: don't fail with division by 0 2017-11-29 18:40:43 -08:00
bootgraph.pl
check_00index.sh
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl vsprintf: add printk specifier %px 2017-11-29 12:13:14 +11:00
checkstack.pl
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck coccinelle: fix parallel build with CHECK=scripts/coccicheck 2017-11-23 23:12:03 +09:00
config
conmakehash.c
const_structs.checkpatch
decode_stacktrace.sh
decodecode
depmod.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line scripts/faddr2line: extend usage on generic arch 2017-11-29 18:40:42 -08:00
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-plugin.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_initramfs_list.sh
get_dvb_firmware
get_maintainer.pl get_maintainer: add more --self-test options 2017-11-17 16:10:01 -08:00
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh
headers.sh
insert-sys-cert.c
kallsyms.c
Kbuild.include kbuild: create directory for make cache only when necessary 2017-11-16 09:07:32 +09:00
kernel-doc A few late-arriving docs updates that have no real reason to wait. There's 2017-11-23 21:01:32 -10:00
ld-version.sh
leaking_addresses.pl leaking_addresses: add SigIgn to false positives 2017-11-14 09:29:27 +11:00
Lindent
link-vmlinux.sh Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile
Makefile.asm-generic Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile.build Kbuild updates for v4.15 (2nd) 2017-11-25 08:06:30 -10:00
Makefile.clean
Makefile.dtbinst DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
Makefile.extrawarn
Makefile.gcc-plugins
Makefile.headersinst Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile.host Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile.kasan
Makefile.kcov Makefile: support flag -fsanitizer-coverage=trace-cmp 2017-11-17 16:10:04 -08:00
Makefile.lib kbuild: drop $(extra-y) from real-objs-y 2017-11-23 23:29:26 +09:00
Makefile.modbuiltin
Makefile.modinst
Makefile.modpost Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Makefile.modsign
Makefile.ubsan
makelst
markup_oops.pl
mkcompile_h Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
mkmakefile
mksysmap
mkuboot.sh
module-common.lds
namespace.pl
objdiff
parse-maintainers.pl parse-maintainers: add ability to specify filenames 2017-11-17 16:10:01 -08:00
patch-kernel
pnmtologo.c
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
setlocalversion
show_delta
sign-file.c
sortextable.c
sortextable.h
spelling.txt spelling.txt: add "unnecessary" typo variants 2017-11-17 16:10:00 -08:00
sphinx-pre-install
stackdelta
stackusage
tags.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh