History log of /fuchsia/zircon/system/core/netsvc/netsvc.c
Revision Date Author Comments
# b33437b1 26-Jul-2018 Nick Maniscalco <maniscalco@google.com>

[zircon][kernel] Use proper time types and overflow-safe arithmetic

This change is preparation for converting zx_time_t and zx_duration_t
from unsigned to signed types (ZX-2100).

1. Fix several places where the wrong time type was used (e.g.
zx_time_t instead of zx_duration_t). Because these are simple typedefs
it's easy to use the wrong one. While it generally doesn't cause a
problem, using the wrong type can be misleading and lead to bugs like
passing a relative time when an absolute time is expected.

2. Update kernel/ and some other parts of zircon to use the new
overflow-safe arithmetic functions from zircon/time.h.

Performance: Ran "/pkgfs/packages/zircon_benchmarks/0/bin/app -p" on
NUC before and after this change. Differences were withing the noise,
some slightly faster, some slightly slower.

Test: CQ

ZX-2100 #comment cleanup before conversion

Change-Id: I75d074e5850ade5385decd9bbf330497bf7610e9


# ab6b7447 19-Jul-2018 George Kulakowski <kulakowski@google.com>

[debuglog] Migrate to zx_debuglog_create

Test: cq

Change-Id: Ia7aa2efefd0c1ac0ce3460159a9405d6f0b1777e


# 1324490a 17-Jun-2018 Adam Barth <abarth@chromium.org>

[netsvc] Switch to fdio_spawn_etc

Most codepaths that create processes should use fdio_spawn rather than
launchpad directly.

Test: Manually verified that netruncmd and paving continue to work.
Change-Id: Ib5a6596921c2bd8f65e80c47bc995960bd35b378


# 47cff597 26-Jun-2018 George Kulakowski <kulakowski@google.com>

[clock] zx_clock_get(ZX_CLOCK_MONOTONIC) -> zx_clock_get_monotonic()

Test: no functional change

Change-Id: Iaa513c521d96b178458acc707be3646067971701


# e99d3750 20-Jun-2018 Justin Mattson <jmatt@google.com>

[netsvc] Revert "Switch to fdio_spawn_etc"

This reverts commit 8a28ca4959dea54349d1c7aacfb76d83492d4b1e.

The original change breaks the paving flow.

TEST=manual

Change-Id: Id37551f30a6183adfebae3dc6d67fadac2555bff


# 8a28ca49 17-Jun-2018 Adam Barth <abarth@chromium.org>

[netsvc] Switch to fdio_spawn_etc

Most codepaths that create processes should use fdio_spawn rather than
launchpad directly.

Test: Manually verified that netruncmd and paving continue to work.
Change-Id: If9c079e7f620f41b74845782f1944aaa5ad0a142


# 379f22fa 06-Jun-2018 Adam Barth <abarth@google.com>

[fdio] Move headers into lib/fdio/...

Change-Id: Ie8d74e716da913bf6e2672c4acf8cd67b4962b7f


# 798454db 21-Mar-2018 Nick Maniscalco <maniscalco@google.com>

[netsvc][devmgr] Add option to disable netboot advertisements

Add netsvc.advertise kernel option to disable netboot advertisements
from netsvc.

Tested using bootserver and tcpdump.

ZX-1845 #done

Change-Id: Id547df9d28d15cb8a82fc46d64e64afa972c296e


# a10bfc25 15-Feb-2018 Tim Kilbourn <tkilbourn@google.com>

[netsvc] Commandline for specifying net interface

netsvc.interface=<topological path>
This flag will be passed to netsvc if present. netsvc will only use an
ethernet device matching the given topological path. This can be useful
in a device with multiple ethernet ports.

ZX-1709 #done

Change-Id: If76f3fd9978e0d2708e2748d6cb30da71db78086


# ec9928ea 22-Jan-2018 Adam Barth <abarth@google.com>

[syscalls] Rename zx_time_get to zx_clock_get

This change frees up the get() method in for a zx_time_t accessor in the
zx::time class.

Change-Id: Ia4cdc7e3e558df5ba0cfeedb27a442abf4d6f305


# ebccb982 11-Jan-2018 Josh Conner <joshconner@google.com>

[netsvc] Add intermediate buffer to paver

When paving, store incoming tftp data to a buffer so that the ethernet
receive buffers don't fill up. This introduces an additional thread of
execution - one to receive the eth data and one to write it out to the
paver process.

ZX-1521

Change-Id: Ic2a05c195a872deed8975727ee85526072d932f9


# aedb3bac 20-Nov-2017 Josh Conner <joshconner@google.com>

[netsvc][bootserver][inet6][libtftp] pull support

Add pull support to libtftp and use it in netcp operations.

NET-287

Change-Id: I9f4ceb23655f27a71405dfb46223cdbab9514e89


# d95fa9d6 08-Nov-2017 Brian Swetland <swetland@google.com>

[netsvc][zedboot] display bootloader version

Change-Id: I1bb3afe3152c6a76fb0dbdc2a93753eb42455420


# f25d0eaf 12-Sep-2017 Gurjant Kalsi <gkalsi@google.com>

[zedboot] Rename magentaboot to zedboot

Change-Id: I36d0938dd45ea9255557900ec0c2e2f3c1e4d2aa


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# ae120198 21-Aug-2017 Brian Swetland <swetland@google.com>

[netsvc][netboot] display "magentaboot" banner in netboot mode

Change-Id: I8faceae2a4280c5b50ebc331bc33f10e9ffa69ff


# 78fa22af 22-Aug-2017 Tim Kilbourn <tkilbourn@google.com>

[netsvc] Set nodename after opening netifc

Unless the nodename was provided on the commandline, the nodename should
be set each time a netifc is opened. This avoids the acid-acid-acid-acid
scenario where we set the nodename before the device is opened.

Change-Id: I4fcc521b019b4ac36d57df1c3b670e3fa1ac21d1


# 04e6a8bf 03-Aug-2017 Josh Conner <joshconner@google.com>

[bootloader][netsvc][libtftp] Add timeout support

Add libtftp support for timeout handing as per TFTP RFC. Also,
sets a limit for the number of consecutive timeouts before a
connection is terminated (configurable using
tftp_set_max_timeouts()).

Change-Id: I9a31605d6f926275afdc32fbd8dbcab141ccc993


# 8e53d47f 24-Jul-2017 Gurjant Kalsi <gkalsi@google.com>

[netsvc] Only parse netsvc args once

Change-Id: I0b04a7f3e0b77e141fbf0f980a905dcb2d49278b


# 86a34263 24-Jul-2017 Josh Conner <joshconner@google.com>

[netsvc] Refactor debuglog support

Move debuglog support into a separate compilation unit. This should
simplify things quite a bit when adding another timeout source (tftp).

Also, give a name to the debuglog magic number (NB_DEBUGLOG_MAGIC).

Change-Id: Id47f6503cb74cbfb535326d60993daf4b128befd


# 680b228e 30-Jun-2017 Josh Conner <joshconner@google.com>

[netsvc] Add tftp support

Adds support for handling incoming tftp requests, which are received on
NB_TFTP_INCOMING_PORT and then processed using NB_TFTP_OUTGOING_PORT.

Change-Id: I13cf77b6addcc6a302127fb00c78466f96928a86


# 5d534c45 12-Jun-2017 Josh Conner <joshconner@google.com>

[netsvc] Refactor netboot code

Move code related to the netboot protocol out of netsvc.c and netfile.c
and into netboot.c.

Change-Id: Idbaba3da0afb62adb3238aedaad67ad53462fbfd


# 43e03a8d 19-May-2017 Gurjant Kalsi <gkalsi@google.com>

[netsvc][netboot] Implements netboot in magenta

Change-Id: Ic85235dbabf1dbcf4fad136ee723c5d15eaac59d


# c294fabb 24-Apr-2017 Brian Swetland <swetland@google.com>

[processargs] tidy up naming and numbering

This cleans stuff up ahead of the addition of string tables for
the upcoming PA_NS_DIR and PA_NS_REQ types and the eventual
flattening of PA_MXIO_* to a single type, using subtypes for
protocol.

- Align names with current-day usage
- Organize numbering / ordering around subsystem usage
- Reduce "type" field to 8 bits
- Reserve space for "subtype" field
- Use PA_ namespace and shorter a lot of very long names

Change-Id: I5e59f412c3b9bd79d90f921a248a6d98d4b703bc


# da639c82 10-Mar-2017 Brian Swetland <swetland@google.com>

[boot] migrate boot data and protocol headers to magenta/boot

This tidies up the top level magenta includes a bit and more
importantly moves multiboot.h somewhere where gigaboot can
find it.

Change-Id: I5c746fdce836e266d207b9bdfac6e940ce9ca294


# 0024a478 28-Feb-2017 Brian Swetland <swetland@google.com>

[netsvc][debuglog] set size of packet correctly

This fixes garbled logs in loglistener.

Change-Id: I548b37c3758bab2cf5f8f347633d553b6d9be4c0


# d3483540 23-Feb-2017 Jérôme Poichet <jpoichet@google.com>

[bootloader][netsvc][loglistener][netcp] Use nodename

In bootloader forward nodename through kernel command lines.

Change log packets to carry nodename so that loglistener can filter on
nodename (in netsvc and loglistener)

Use MAGENTA_NODENAME environment variable if provided for loglistener
and netcp

Change-Id: I79531504653b6e2f31efef5a44dfa85f1b809f2f


# a13f0581 24-Feb-2017 Jérôme Poichet <jpoichet@google.com>

[netsvc] Generate unique nodename

Use mac address and EFF Diceware short list to generate a unique
nodename for the device.

Change-Id: I70056ada45250662733d986236612a72a489bd1e


# b8c1b135 24-Feb-2017 Jérôme Poichet <jpoichet@google.com>

Revert "[netsvc] Generate unique nodename"

This reverts commit bd31874b6688ecc2e3feecd103eefe0ca2946de5.

Change-Id: I2748c62b549f559f6d0e5e680e62e3abba64e155


# bd31874b 24-Feb-2017 Jérôme Poichet <jpoichet@google.com>

[netsvc] Generate unique nodename

Use mac address and EFF Diceware short list to generate a unique
nodename for the device.

Change-Id: I0cad02524e9879b9bbcd88b028e511d9fe2e8aff


# 92a51def 21-Feb-2017 Dave Bort <dbort@google.com>

[magenta] Migrate Magenta's uses of mxio_get_startup_handle

Leave the compatibility shim in place until Fuchsia-at-large migrates.

For MG-228: "get startup handles should not live in mxio"

Change-Id: I5bf53388585520bf7d4b5acc31902bfc7797489d


# 0d8dd12a 16-Feb-2017 Tim Kilbourn <tkilbourn@google.com>

[netsvc] Remove ipc channel

Fuchsia's netstack opens ethernet devices directly now.

Change-Id: I7ea4fcc6eaa2ae9055f2b364a123233959cc36ba


# cc3a1491 17-Feb-2017 Brian Swetland <swetland@google.com>

[devmgr][netsvc] allow nodename to be overridden by magenta.nodename

Change-Id: I8fcd29ce5138f8133a21eb588b97d6726a3048e4


# e55b92da 10-Feb-2017 Brian Swetland <swetland@google.com>

[syscalls] update callers to mx_handle_wait_*() and deprecate

Change-Id: I7b0516007b99d58aee906eac62358625100ee32e


# ac67e440 30-Jan-2017 Dave Bort <dbort@google.com>

[devmgr][mxio] Add a system-wide loader service

Add a dmctl ioctl to get a handle to a shared system loader service,
which translates paths like "libhid.so" into VMOs containing the named
object's data.

Launchpad and other users of mxio_loader_service() will automatically
prefer the system loader service if available.

Before this, loading was done by in-process threads, which meant that
those processes needed filesystem access. This is a step towards
supporting dynamic binaries with no filesystem rights.

For now, the system loader service uses the same code as the in-process
loader service, but this may change. It also needs to be smarter to
avoid starvation from bad processes (MG-491).

Moving the loader-related prototypes to a new header caused some ripple
effects for code that depended on transitive includes from mxio/util.h.

For MG-451: "loader service"

Change-Id: I8adb534b55f96334017e979da6af263e19095d84


# 23d7f070 30-Jan-2017 Tim Kilbourn <tkilbourn@google.com>

[netsvc] Send network info once netstack comes up

If the netstack is started after an ethernet device is opened, its
mac and mtu need to be sent to netstack. Check whether this has been
sent as part of the netifc polling loop instead of before the loop.

Change-Id: Ib351f11f984067cb2909db431474de065303d62d


# da6cdad2 30-Jan-2017 Tim Kilbourn <tkilbourn@google.com>

[devmgr][netsvc] decouple netsvc and netstack

The devmgr will create the channel used between netsvc and netstack
and pass the two ends to the appropriate processes. The netstack handle
will pass through init to further decouple devmgr and netstack.

Change-Id: I53f7d67a270041ac1989996458bdb4b0ccba8f93


# a88819c5 26-Jan-2017 Brian Swetland <swetland@google.com>

[netsvc] migrate to new launchpad API

Change-Id: I5453a3d4c1dc3cd8ecbdfdd3315f6061d294da8c


# 4bc08aa3 24-Jan-2017 Brian Swetland <swetland@google.com>

[syscalls][debuglog] mx_log_create() returns mx_status_t

Necessary work for the uint-ification of mx_handle_t.

Change-Id: I60ab858879d20314b19115e368a5d6ed76278ca1


# b50b93c3 03-Jan-2017 George Kulakowski <kulakowski@google.com>

[signals] Remove legacy signal names

Change-Id: I6d4543358a16d16b9b9028ede06af40a632ba31b


# 664e624a 21-Dec-2016 Aaron Green <aarongreen@google.com>

[netsvc] Fix 8 byte info leak

When constructing packets to send to loglistener, netsvc incorrectly
added 8 bytes for the magic and seqno twice, leading to 8 bytes of
random memory contents being appended to each packet. Since
get_log_line ensured the first extra byte was always \x00, this wasn't
detected by loglistener.c.

Change-Id: I4fc088b2c3ff1537008fbdb63f98b9a63ad5e926


# b6ab3c86 15-Dec-2016 Adam Barth <abarth@chromium.org>

[netsvc][run-vc] Use dash instead of mxsh

Change-Id: Id78285c56a741a1ce6f3b3c981c379fb4d7183d6


# 5c70f03e 11-Nov-2016 Tim Newsham <tim.newsham@gmail.com>

[netsvc] Make netsvc set the right process name when spawning netstack

Change-Id: I554a7d6a44c115b4714869680cd498c3204f8f45


# 55571f2f 20-Oct-2016 Brian Swetland <swetland@google.com>

[devmgr] mount additional bootfs images at /system, not /boot

Look for Fuchsia components (application_manager, thinfs) on /system

Change-Id: Ie0fa39d872ad0d17501d8df2ec2ded2a9e3b67de


# 8fd7892c 28-Oct-2016 Tim Kilbourn <tkilbourn@google.com>

[core][netsvc] Use 'channel' instead of deprecated 'msgpipe'

Change-Id: Ie45261af28c923394343672677f75c08a74e8a23


# 6ae5a8a3 20-Oct-2016 Toshi Kikuchi <toshik@google.com>

[netsvc] fix typo with wait timeout in ipc_thread

Change-Id: I210ab91969a30ec002cb8ce20b5baee383c93cfe


# ab2f1115 16-Oct-2016 Brian Swetland <swetland@google.com>

[netsvc] launch network stack and pass network traffic to it

- network stack will receive a msgpipe via USER0 handle
- reads on that msgpipe will be a network packet (if len > 8)
or network status (if len == 8)
- status is { uint8_t mac[6]; uint16_t mtu; } and will be zero
if the network goes offline, or the mac address and mtu if
network goes online
- writes to that msgpipe will be sent out the active network
interface if online

Change-Id: I2c971d89f5b93f4e93d2503472d18257979c42a1


# 8afff943 17-Oct-2016 Brian Swetland <swetland@google.com>

[magenta][syscalls][headers] tidy up syscall structure related headers

For more complex syscalls, there are now sub-headers that declare their
structures and constants which must be included. This avoids pulling
a bunch of stuff into the global namespace whenever anyone needs to make
a syscall and includes magenta/syscalls.h

The magenta/syscalls-types.h no longer exists.

- magenta/syscalls/debug.h for debugger api defines
- magenta/syscalls/exception.h for exception defines
- magenta/syscalls/port.h for mx_port_*()
- magenta/syscalls/log.h for mx_log_*()
- magenta/syscalls/object.h for object info/property defines
- magenta/syscalls/pci.h for mx_pci_*() (ddk use only)

Change-Id: I636c28e4a9a08836d9543b539f236e9d38ecc11b


# fb8705c4 15-Oct-2016 Brian Swetland <swetland@google.com>

[debuglog] add pid and tid to log records

Change-Id: I2cde8fc7d5c77924ddb829311455e838bc7c6024


# dc800e9a 29-Sep-2016 Brian Swetland <swetland@google.com>

[organization] move essential userspace components to system/core/...

userboot, devmgr, acpisvc, crashlogger, netsvc are essential to the
system booting and running. Pretty much everything else in system/uapp/..
is nonessential.

Change-Id: Ibbcf2b1c388bdefc28699226eab02e90aab895f0