| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Move the sources to sys/boot. Make adjustments related to the
move. Kill LIBSTAND_SRC since it's no longer needed.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324551
|
| |
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324550
|
| |
|
|
|
|
|
|
|
|
| |
The memory can be leaked if we will have pkt set and will get an error
during tftp_open() processing.
Differential Revision: https://reviews.freebsd.org/D12202
Notes:
svn path=/head/; revision=323496
|
| |
|
|
|
|
|
|
|
|
| |
The nfs_readlink() is returning constant 0 instead of variable.
Reviewed by: avg
Differential Revision: https://reviews.freebsd.org/D12201
Notes:
svn path=/head/; revision=323100
|
| |
|
|
|
|
|
|
|
| |
This adds the stpcpy and stpncpy functions to libstand.
Differential Revision: https://reviews.freebsd.org/D11844
Notes:
svn path=/head/; revision=322037
|
| |
|
|
|
|
|
|
|
| |
While there also collapase SEEK_END into default case in lseek.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=320468
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The DHCP client is supposed to use the same option request list for
both DHCP discovery and request.
This will also allow us to fill the list in single function.
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D10981
Notes:
svn path=/head/; revision=319085
|
| |
|
|
|
|
|
| |
Reported by: lidl
Notes:
svn path=/head/; revision=318993
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the code are now only issueing one single dhcp request at startup of the
loader meaning we can always request a the PXE informations from the
dhcp server.
Previous code lost that information, meaning no option 55 anymore (meaning not
working with the kea dhcp server) and no request for rootpath etc, no user class
Remove the flags from the bootp function which is not needed anymore
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10952
Notes:
svn path=/head/; revision=318989
|
| |
|
|
|
|
|
| |
Suggested by: tsoome
Notes:
svn path=/head/; revision=318986
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rfc3004 allows to pass multiple user classes on dhcp requests
this is used by dhcp servers to differentiate the caller if needed.
As an example with isc dhcp server it will be possible to make options
only for the FreeBSD loaders:
if exists user-class and option user-class = "FREEBSD" {
option root-path "tftp://192.168.42.1/FreeBSD;
}
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10951
Notes:
svn path=/head/; revision=318982
|
| |
|
|
|
|
|
|
|
|
|
|
| |
With ip fragment reassembly implemented, it makes sense to allow
larger nfs reads. Note due to loader heap size limit, we do not want
to set too large maximum read size. Also we do not change default read size.
Reviewed by: bcr, allanjude
Differential Revision: https://reviews.freebsd.org/D10754
Notes:
svn path=/head/; revision=318356
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement simple separate ip module and fragment re-assembly.
The work is based on send and receive previously implemented in udp.c,
moved to ip.c and added the ip fragment re-assembly.
This change allows to specify larger tftp or nfs payload, such as:
tftp.blksize=4096 or nfs.read_size=4096
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D10631
Notes:
svn path=/head/; revision=318320
|
| |
|
|
|
|
|
|
|
|
|
|
| |
readether argument is missing & operator.
CID: 1374944
Reported by: Coverity, cem
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D10663
Notes:
svn path=/head/; revision=318142
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current read from network is working from up to down - we have some
protocol needing the data from the network, so we build the buffer space
for that protocol, add the extra space for headers and pass this buffer
down to be filled by nif get call in hope, we have guessed the incoming
packet size right. Amazingly enough this approach mostly does work, but
not always...
So, this update does work from down to up - we allocate buffer (based
on MTU or frame size info), fill it up, and pass on for upper layers.
The obvious problem is that when we should free the buffer - if at all.
In the current implementation the upper layer will free the packet on error
or when the packet is no longer needed.
While working on the issue, the additional issue did pop up - the bios
implementation does not have generic get/put interface but is using pxe
udpsend/udpreceive instead. So the udp calls are gone and undi interface
is implemented instead. Which in turn means slight other changes as we
do not need to have duplicated pxe implementation and can just use dev_net.
To align packet content, the actual read from nic is using shifted buffer by
ETHER_ALIGN (2).
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D10232
Notes:
svn path=/head/; revision=317887
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use DHCP 150 option to decide which protocol use to netboot. When
root-path includes ip address - go thru NFS, if ip address not exists in
root-path - go thru TFTP from server which ip address is in next-server. But
there is one limitation - only one tftp server in network to provide loader and
everything else. Does enybody use more than only one?
Submitted by: kczekirda
Sponsored by: Oktawave
MFC after: 3 weeks
Relnote: Yes
Differential Revision: https://reviews.freebsd.org/D8740
Notes:
svn path=/head/; revision=317886
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current implementation of dosfs in libstand reads full File Allocation Table to
the RAM in the initialization code. In the extreme case of FAT32 filesystem,
this structure will take up to 256-1024 Mb of loader memory, depending on the
cluster size.
Proposed patch reduces libstands/dosfs memory requirements to 128 Kb for all
variants of dosfs filesystem. For FAT12 and FAT16 filesystems, File Allocation
Table is cached in full, as before. For FAT32, File Allocation Table is broken
into the equal blocks of 128 Kilobytes (32768 entries), and only current block
is cached.
Because per-filesystem context is now small, global FAT cache (for all
instances of dosfs filesystem) is replaced by local per-instance cache.
Submitted by: Mikhail.Kupchik_gmail.com
Reviewed by: tsoome, allanjude
Differential Revision: https://reviews.freebsd.org/D9547
Notes:
svn path=/head/; revision=316590
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we have mechanisms in place to protect ourselves against the read
behind the disk end, there is still one corner case. As the GPT
partition table has backup table at the end of the disk, and we yet
do not know the size of the disk (if the wrong size is provided by the
firmware/bios), we need to limit the reads to avoid read ahead in such case.
Note: this update does add constant into stand.h, so the incremental build
will need to get local stand.h updated first.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D10187
Notes:
svn path=/head/; revision=316578
|
| |
|
|
|
|
|
|
|
|
|
| |
Make sure sensitive memory is properly cleared when finished with it
Reviewed by: Eric McCorkle <eric@metricspace.net>
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D9798
Notes:
svn path=/head/; revision=316311
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We have parallel NFSv2 and NFSv3 reader implementations, only configurable at
build time, defaulting to v3. Remove v2.
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D10206
Notes:
svn path=/head/; revision=316287
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the uset can set dhcp.interface-mtu, we need to try to validate the
value. So we verify if the conversion to int is successful and we will not
allow to set value greater than max IPv4 packet size.
Also use snprintf for safety.
Reviewed by: allanjude, bapt
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8492
Notes:
svn path=/head/; revision=315653
|
| |
|
|
|
|
|
|
|
|
|
| |
Implement simple value check and feedback.
Reviewed by: allanjude, rpokala
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8491
Notes:
svn path=/head/; revision=315648
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
the bootp(). It removes unnecessary DHCP request from pxeloader.
Submitted by: kczekirda
Sponsored by: Oktawave
Initiated by: Matthew Dillon
Reviewed by: smh, gnn, bapt, oshogbo
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D9847
Notes:
svn path=/head/; revision=314948
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
Notes:
svn path=/head/; revision=314436
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_
Reviewed by: kib, mckusick
Obtained from: NetBSD
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9536
Notes:
svn path=/head/; revision=313780
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(like NFS, EXT2FS, SVR4, IBCS2) instead of redefining the MAXNAMLEN
constant.
No functional change.
Reviewed by: kib@, markj@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9500
Notes:
svn path=/head/; revision=313475
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite EFI part device interface to present disk devices in more
user friendly way.
We keep list of three types of devices: floppy, cd and disk, the
visible names: fdX: cdX: and diskX:
Use common/disk.c and common/part.c interfaces to manage the
partitioning.
The lsdev -l will additionally list the device path.
Reviewed by: imp, allanjude
Approved by: imp (mentor), allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8581
Notes:
svn path=/head/; revision=313333
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Nowadays it's not necessary to compute network mask from the IP address and
compare to given by DHCP.
Submitted by: kczekirda
Reviewed by: glebius, bapt
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D8740
Notes:
svn path=/head/; revision=311659
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
party software, this provides more standarized import workflow and
makes future upgrades easier.
The following files are new with this commit:
zconf.h.in
zlib.map
zlib.pc.in
They are not connected to build, but were kept in tree for reference
for future maintenance.
All our local trivial changes were applied to contrib/zlib, and the
contrib/zlib vendor source code is intended to 100% match lib/libz
before this commit.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=311275
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The strategy argument cleanup in r310850 did miss another call to strategy(),
and left it with extra argument.
Reviewed by: allanjude
Approved by: allanjude (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9003
Notes:
svn path=/head/; revision=310853
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently the libstand dosfs optimization is a bit too optimistic
and did introduce possible memory corruption.
This patch is backing out the bad part and since this results in
dosfs reading full blocks now, we can also remove extra offset argument
from dv_strategy callback.
The analysis of the issue and the backout patch is provided by Mikhail Kupchik.
PR: 214423
Submitted by: Mikhail Kupchik
Reported by: Mikhail Kupchik
Reviewed by: bapt, allanjude
Approved by: allanjude (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8644
Notes:
svn path=/head/; revision=310850
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: bapt, imp, allanjude
Approved by: imp (mentor), allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8678
Notes:
svn path=/head/; revision=309369
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change does modify devsw dv_print() to return the int value,
enabling walkers to interrupt the walk on non zero value from dv_print().
This will allow the pager_print actually to stop displaying data on
user input, and additionally pager is used in various *dev_print callbacks,
where it was missing.
For test, lsdev [-v] command should display data by screenfuls and should
stop when the key 'q' is pressed on pager prompt.
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D5461
Notes:
svn path=/head/; revision=308434
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with all dhcp parameters we might be interested in.
Some DHCP server like the new kea (by ISC) expect it.
This makes pxeboot functional with ISC kea.
Submitted by: Vincent Legout <vincent.legout@gandi.net>
MFC after: 1 month
Sponsored by: Gandi.net
Notes:
svn path=/head/; revision=308129
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed text in comments.
Reported by: Bruce Evans <brde@optusnet.com.au>
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8119
Notes:
svn path=/head/; revision=306638
|
| |
|
|
|
|
|
|
|
|
| |
Reported by: Bruce Evans <brde@optusnet.com.au>
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8107
Notes:
svn path=/head/; revision=306552
|
| |
|
|
|
|
|
|
|
|
|
| |
rS306534 did create bad cstyle by my mistake, correcting it.
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8103
Notes:
svn path=/head/; revision=306538
|
| |
|
|
|
|
|
|
|
|
|
| |
The libstand cd9660 reader code must check for extents having padding.
Reviewed by: jhb
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8101
Notes:
svn path=/head/; revision=306534
|
| |
|
|
|
|
|
| |
Reported by: tsoome
Notes:
svn path=/head/; revision=305770
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Increase this tunable improves kernel loading speed.
Submitted by: Jun Su <junsu microsoft com>
Reviewed by: rpokala, wblock (previous version)
Obtained from: DragonFlyBSD
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7756
Notes:
svn path=/head/; revision=305588
|
| |
|
|
| |
Notes:
svn path=/head/; revision=305480
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new 'netproto' variable which can be set for now to
NET_TFTP or NET_NFS (default to NET_NONE)
From the dhcp options if one sets the root-path option to:
"ip:path", the loader will consider it is booting over NFS
(meaning same behaviour as the default current behaviour)
if the dhcp option "tftp server address" is set (option 150)
the loader will consider it is booting over tftpfs, it will then
consider the root-path options with 2 possible case
1. "path" then the IP of the tftp server will be the one passed by
the option 150, and the files will be retrieved under "path" on the tftp
server
2. "ip:path" then the IP of the tftp server will be the one passed in
the option "overwritting the IP from the option 150.
We could not "abuse" the rootpath option in the form or tftp://ip:path because
this is already used for other purpose by iPXE preventing any chainload from
iPXE to the FreeBSD loader.
Given at each open(), the loader loops over all available filesystems and keep
the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa.
the tftpfs and nfs implementation in libstand now return EINVAL early if
'netproto' for that purpose.
Reviewed by: tsoome
Relnotes: yes
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D7628
Notes:
svn path=/head/; revision=305125
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tftp download for large files will cause internal block id
to wrap to 0 as the data type is unsigned short.
Also provide file size information for stat.
PR: 200500
Reported by: tsoome
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D7660
Notes:
svn path=/head/; revision=305116
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: imp, allanjude
Approved by: imp (mentor), allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D7659
Notes:
svn path=/head/; revision=304850
|
| |
|
|
| |
Notes:
svn path=/head/; revision=300264
|
| |
|
|
|
|
|
| |
use it.
Notes:
svn path=/head/; revision=300078
|
| |
|
|
|
|
|
|
| |
We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
Notes:
svn path=/head/; revision=298601
|
| |
|
|
|
|
|
|
|
|
| |
Followup to r298230
Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com> (original version)
Sponsored by: ScaleEngine Inc.
Notes:
svn path=/head/; revision=298242
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy.
Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks.
Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device.
The cache also implements limited read-ahead to increase performance.
To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache.
Booting from a virtual CD over IPMI:
0ms latency, before: 27 second, after: 7 seconds
60ms latency, before: over 12 minutes, after: under 5 minutes.
Submitted by: Toomas Soome <tsoome@me.com>
Reviewed by: delphij (previous version), emaste (previous version)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D4713
Notes:
svn path=/head/; revision=298230
|
| |
|
|
| |
Notes:
svn path=/head/; revision=298210
|