| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Most of file system drivers initialize the cache themselves.
The problem is that the same cache could be again initialized later,
then invalidating the previous one. This patch fixes this.
Problem found while auditing the code.
Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Filesystem UUID shows the partition we boot kernel from.
The kernel parameter has format like FSUUID=DA1A-0B2E.
The SYSAPPEND bit is 0x40000. Now the FAT only supports FSUUID.
The patch is based on 67aaaeeb228.
Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
syslinux-5.11-pre2
Conflicts:
core/elflink/load_env32.c
version
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In retrospect, choosing the colon character as the entry separator for
the PATH directive was not a smart move, as that character is also used
in TFTP-style paths. This conflict manifests as PXELINUX being unable to
find and load files.
An example dnsmasq log looks like,
dnsmasq-tftp: sent /arch/boot/syslinux/lpxelinux.0 to 192.168.0.90
dnsmasq-tftp: file /arch/ldlinux.c32 not found
dnsmasq-tftp: file /arch//ldlinux.c32 not found
dnsmasq-tftp: file /arch//boot/isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /arch//isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /arch//boot/syslinuxldlinux.c32 not found
dnsmasq-tftp: sent /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: error 0 No error, file close received from 192.168.0.90
dnsmasq-tftp: failed sending /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: sent /arch/boot/syslinux/archiso.cfg to 192.168.0.90
dnsmasq-tftp: sent /arch/boot/syslinux/whichsys.c32 to 192.168.0.90
dnsmasq-tftp: file /arch/libcom32.c32 not found
dnsmasq-tftp: file /arch//libcom32.c32 not found
dnsmasq-tftp: file /arch/libcom32.c32 not found
dnsmasq-tftp: file /arch//arch//boot/syslinux/libcom32.c32 not found
The last line of the log is the indication that there's a problem.
Internally, Syslinux adds the location of ldlinux.c32 to PATH by
querying the current working directory once ldlinux.c32 is successfully
loaded. Under PXELINUX that means the initial PATH string will be,
"::/arch/boot/syslinux/"
The PATH parsing code doesn't know how to correctly parse the "::"
string and hence, the file is searched for relative to the 210 dhcp
option directory - /arch/.
Implement PATH with a linked list which *greatly* simplifies the path
code, and means we no longer have to parse strings backwards and
forwards.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
syslinux-5.10-pre2
Conflicts:
NEWS
com32/include/netinet/in.h
com32/include/sys/cpu.h
com32/lib/Makefile
core/Makefile
core/fs/diskio.c
core/fs/pxe/pxe.h
core/init.c
core/mem/free.c
core/mem/malloc.c
mk/devel.mk
version
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Welcome to Syslinux 5.10.
Conflicts:
NEWS
com32/lib/Makefile
com32/lib/sys/open.c
com32/lib/syslinux/ipappend.c
com32/modules/Makefile
com32/modules/prdhcp.c
core/Makefile
core/cmdline.inc
core/com32.inc
core/comboot.inc
core/configinit.inc
core/fs/chdir.c
core/fs/fs.c
core/fs/pxe/dnsresolv.c
core/fs/pxe/pxe.c
core/fs/pxe/pxe.h
core/idle.c
core/include/ctype.h
core/init.inc
core/mem/init.c
core/parseconfig.inc
core/runkernel.inc
core/syslinux.ld
core/ui.inc
doc/comboot.txt
version
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Pass the file flags down through the stack. This allows us to
distinguish between open for read, open for write, or opendir in the
low-level filesystem functions; this will matter for the PXE methods.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Dynamically size the heap to 1/16 of available high memory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Makefile
NEWS
com32/cmenu/Makefile
com32/elflink/ldlinux/Makefile
com32/gfxboot/Makefile
com32/gpllib/Makefile
com32/include/sys/module.h
com32/lib/Makefile
com32/lib/sys/module/elf_module.c
com32/menu/Makefile
com32/rosh/Makefile
com32/samples/Makefile
core/init.c
mk/elf.mk
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove some stale (16-bit compatibility) functions in fs.c.
Add some debugging for inode refcounts.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Makefile
com32/elflink/ldlinux/Makefile
com32/lib/sys/module/elf_module.c
core/cleanup.c
core/comboot.inc
core/conio.c
core/fs/fs.c
core/init.c
core/mem/free.c
core/mem/malloc.c
core/timer.inc
diag/geodsp/Makefile
extlinux/main.c
mk/embedded.mk
modules/Makefile
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before modules were dynamically loaded the boundary between GPL and
non-GPL code was implicit because of the separate link domains for
each module. With dynamic modules we need an explicit whitelist of
core symbols that non-GPL code can link against at runtime without
needing to be re-licensed under the GPL.
Mark such symbols with __export, so that it is explicitly clear which
symbols in the core can be linked against by non-GPL code.
Reduce the visibility of symbols in both the core and ldlinux.c32 with
-fvisibility=hidden. __export changes the visibility to 'default'.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a significant rewrite of the generic lookup logic inside
core/fs/fs.c's searchdir function. Previously, there was a
memory leak if a path involved multiple directories. After a
sufficiently large number of invocations, this could be observed.
Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Shao Miller <sha0.miller@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We've currently got both the BIOS and EFI versions of struct
disk_private in core/include/disk.h, which isn't ideal because this
file shouldn't need to know about the inner-workings of the firmware's
private disk info.
Move the implementation of 'struct disk_private' into more suitable
locations and use a void * for the 'private' member of struct disk.
This change allows us to once and for all delete the gnu-efi header
files from core/include/core.h and the gnu-efi include paths from
mk/lib.mk.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Makefile
com32/elflink/ldlinux/adv.c
com32/elflink/ldlinux/kernel.c
com32/elflink/ldlinux/ldlinux.c
com32/include/bitsize/stddef.h
com32/include/bitsize/stdint.h
com32/include/stdint.h
com32/include/sys/module.h
com32/include/sys/x86_64/bitops.h
com32/include/syslinux/linux.h
com32/lib/Makefile
com32/lib/sys/ansicon_write.c
com32/lib/sys/module/elfutils.h
com32/lib/sys/vesa/efi/fill.h
com32/lib/syslinux/load_linux.c
com32/lib/syslinux/serial.c
com32/lib/syslinux/shuffle.c
core/conio.c
core/elflink/config.c
core/elflink/load_env32.c
core/graphics.c
core/include/graphics.h
core/init.c
core/pxelinux.asm
mk/elf.mk
mk/lib.mk
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
core/fs/lib/searchconfig.c
Get the reverse pathname lookup fixes from the master branch.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Actually keep track of the pathnames for all elements for on-disk
filesystems. This makes sure we can always reconstruct the correct
path.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... which avoids the following build warning,
fs/fs.c: In function ‘open_config’:
fs/fs.c:97:2: warning: implicit declaration of function ‘close’
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We can't realloc() 'PATH' because realloc() may just extend the
malloc'd region if the adjacent region is free, as opposed to
allocating a new region and then copying the data. This behaviour is
fine in most circumstances but not with initialised string data, such
as 'PATH'. The reason is that other string data pointers may point to
characters in 'PATH' and if we modify it after realloc()'ing, we'll
appear to corrupt unrelated string data.
For example, the string "/" is used in chdir() and the address of that
string is the last "/" in 'PATH'. If we realloc() and then append
"foo" to 'PATH' the string pointer in chdir() will now point to "/foo".
Initialise 'PATH' at runtime using malloc() and free() to avoid
corrupting string data.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We need a way of passing firmware-specific information to the disk I/O
subsystem. Split the BIOS code into diskio_bios.c so that we don't
include any disk BIOS symbols in the EFI executable. This way, the
code in core/fs/diskio.c is firmware independent.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Each firmware has its own method of initialising a disk so allow each
firmware backend to implement a separate disk_init() function.
Make all the assembly callers of fs_init() jump through pm_fs_init(),
which allows us to restrict the com32sys_t arguments to only those
callers that really need it, e.g. the .asm files.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, if syslinux is installed in a directory other than "/" we
will fail to load ldlinux.c32.
Because we know where we were installed the simplest fix is to chdir()
to the installation directory before attempting to load
ldlinux.c32. This requires us to add "." to PATH so that we look in
the current working directory when loading ELF modules.
Changing to the install directory needs to handled differently for
different file systems, which is the reason behind the new file system
operation, .chdir_start(). Disk-based Syslinux variants should use
generic_chdir_start() to chdir() to CurrentDirName, which is the
installation path. By using this new fs operation, we can load
ldlinux.c32 when we expand the "." in PATH, without having to search
the entire filesystem for it. However, iso9660 file systems still
require us to search some directories because it has no notion of an
installation directory.
Previously, changing into the install directory was handled when
opening the config file, but because the config file parser is now
part of the ldlinux.c32 ELF module, it needs to be done much earlier.
Reported-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
com32/elflink/ldlinux/readconfig.c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add support for specifying directories to search when loading
modules. A new config directive, "PATH", instructs the module loading
code to search the directories listed in a colon-separated list when
loading a module.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Wrap open_config() the same way that open() wraps open_file(). The
only user of open_config() requires access to a file descriptor so it
makes sense to return a file descriptor.
The file handle implementation is a historic piece of code and this
patch tries to hide it as they will likely be removed at a future
point in time. Furthermore, the file handle code is very core-specific
and should not be exposed to any callers of open_config().
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
|/
|
|
|
|
|
|
| |
Change load_config() to open_config(), which is a method that works
just like open_file(). This we can use to get the original
configuration file.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Rather than opencoding the arithmetic flag mask, define an inline to
make that happen properly.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
If we can't find a configuration file, we need to do something
slightly more friendly than hanging.
Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
We don't actually need recursion in put_inode(), so replace recursion
with a loop.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Some filesystems, including btrfs, don't have .. directory entries.
We already handle . in the filesystem core, handle .. as well.
This means keeping chains of parent inodes for all open inodes, at
least for the duration of a path search; we might as well hang onto
them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Enforce that the file type in open_file is a plain file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the case where the "sector size" used by the pm filesystem driver
isn't the same thing as the SECTOR_SIZE/SECTOR_SHIFT macros used in
the assembly code. This is a per-device property, and in the
particular case of isolinux hybrid, they are not even currently the
same (for all others, they are the same for now, but not necessarily
in the future.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Make the maxtransfer per device, as it should be; properly imported
from the head loader (in case it is patched with -s). Also enforce
capping to 127 for EBIOS and 63 for CBIOS. This is structured so that
once EDD4 is approved we can remove the capping for that particular
subcase.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Replace enum inode_mode with the equivalent enum dirent_type.
|
|
|
|
|
|
|
|
| |
Use an inode structure for PXE as well. Even though this is really
rather superfluous in the case of PXE, it eliminates an ugly special
case in the generic code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Add 32-bit API calls for open file and close file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The notion of "mangle name" is now restricted to producing a canonical
representation, e.g. changing \ -> / for FAT filesystems. However,
the resulting mangled name is now always human-readable, so there
never is any reason to unmangle a name.
Get rid of not just the mangling, but of the resulting unmangled-name
buffers and so on.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Remove the now-obsolete unmangle_name method.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use generic_getfssec() for the FAT filesystem. Do a bunch of
calculations based on clusters rather than on sectors, so we don't
have to do the same thing N times for N sectors per cluster.
Fix boundary conditions in generic_getfssec(). Adjust iso9660 to
match the resulting interface change.
Add dprintf's to generic_getfssec() and a few other routines.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Handle the case of opening a directory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
| |
Fix double free of pathbuf in searchdir().
Constify the pathname passed to ->iget().
Major cleanups of the iso9660 filesystem; it would use insufficiently
dimensioned stack variables and do compares in a rather inefficient
manner.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Add a direct 32-bit API to some functions; initially read file only.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
Move filesystem-related C files into the fs/ directory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|