Skip to content
Snippets Groups Projects
  1. Nov 12, 2018
  2. Nov 10, 2018
    • Roland McGrath's avatar
      [ulib][launchpad] Calculate space for handle array in initial stack size · b3b9c57c
      Roland McGrath authored
      The initial stack size calculation is meant to cover what the process
      will need to read the bootstrap message.  That needs not just the message
      buffer but also the handle array.
      
      Bug: ZX-2926 #comment launchpad includes handle array size
      Test: CQ
      Change-Id: I1608b1d64ecf9ddcd8b69fa14c9d26fae52b8a51
      b3b9c57c
    • Roland McGrath's avatar
      [ulib][musl][ldso] Don't unpack strings on bootstrap stack · 86458beb
      Roland McGrath authored
      There's no guarantee the bootstrap stack has enough space for all the
      string pointers.  But the dynamic linker has no need to unpack all the
      argument and environment strings into the canonical argv[] and environ[]
      arrays.  It only uses the first argument string, and matches environment
      strings only in one place.
      
      Bug: ZX-2926 #comment ld.so does not unpack strings on stack
      Test: CQ
      Change-Id: Ie7938b66232ff005495be057b644a6a207f8899d
      86458beb
    • Todd Eisenberger's avatar
      [devmgr] Switch devcoordinator to libasync · 529f7faa
      Todd Eisenberger authored
      This is a relanding of 57372092 which was
      reverted in e278a58e and
      dc9ab1e0 for causing failures on the roller.
      The previous attempts broke loading drivers from outside of /boot.
      
      This will get us things like future-scheduled events, which
      would be useful for implementing backoff on driver binding attempts.
      
      Test: Booted in qemu with ASAN enabled.  Booted on hardware, verified
      system comes up and is responsive to hardware events.  Made sure
      /pkgfs/packages/wlanstack2-tests/0/test/wlanstack2_bin_test_rustc and
      /pkgfs/packages/wlan-hw-sim-tests/0/test/wlan-hw-sim_bin_test_rustc
      work (these rely on wlantap, which comes from garnet).
      
      Change-Id: I36f31469adaae0e764c4d33e6047740d1f75e2f7
      529f7faa
    • Todd Eisenberger's avatar
      Revert "[devmgr] Switch devcoordinator to libasync" · dc9ab1e0
      Todd Eisenberger authored
      This reverts commit 41860739.
      
      Reason for revert: <INSERT REASONING HERE>
      
      Original change's description:
      > [devmgr] Switch devcoordinator to libasync
      > 
      > This is a relanding of 57372092 which was
      > reverted in e278a58e for causing
      > failures on the roller.  The only change between this patch and that are
      > naming changes.
      > 
      > This will get us things like future-scheduled events, which
      > would be useful for implementing backoff on driver binding attempts.
      > 
      > Test: Booted in qemu with ASAN enabled.  Booted on hardware, verified
      > system comes up and is responsive to hardware events.
      > 
      > Change-Id: Ia2fbc2c7fe1347184c1e3645daefdc1dec6f3ea0
      
      TBR=kulakowski@google.com,teisenbe@google.com
      
      Change-Id: I8e59a129fe5cbfd7bdc0ee966d78c44a03c7aacb
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      dc9ab1e0
    • Todd Eisenberger's avatar
      Revert "[devmgr] Make DcIostate's ownership more explicit" · 88fdea10
      Todd Eisenberger authored
      This reverts commit e7817168.
      
      Reason for revert: <INSERT REASONING HERE>
      
      Original change's description:
      > [devmgr] Make DcIostate's ownership more explicit
      > 
      > This is a relanding of 5e1b40e9 which
      > was reverted in 63d3696c for causing
      > failures on the roller.  The failures were caused by the unrelated
      > bug ZX-2961.
      > 
      > This captures the ownership model of DcIostate's memory and its
      > associated IPC channel.
      > 
      > Test: Booted on hardware and tested interactions
      > Change-Id: I709a7f8679e8831529e5f4a5a554cbed462fe7d1
      
      TBR=kulakowski@google.com,teisenbe@google.com
      
      Change-Id: Ibe21b5b3f854c26c671bbe5b9d6b7a7d77f52048
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      88fdea10
    • Ruchira Ravoori's avatar
      Revert "[zircon][usb]Allocate more req size to acommodate internal contexts" · 8bd04852
      Ruchira Ravoori authored
      This reverts commit fcbe4779.
      
      Reason for revert: <INSERT REASONING HERE>
      
      Original change's description:
      > [zircon][usb]Allocate more req size to acommodate internal contexts
      > 
      > This is part2 of my previous changeset, https://fuchsia-review.googlesource.com/c/zircon/+/218979
      > I just broke this down into 2 changesets, so as not to change too many
      > clients in 1 change.
      > 
      > Test:
      > vim2: Plugged in a usb mass storage device
      >       and read using dd on it.
      > Pixelbook: Netbooted pixelbook. Plugged in a usb mass storage
      >            device and read some blocks using dd.
      >            audio tone
      > Astro: Netbooted. Verified that the usb ethernet adapter showed up.
      > 
      > Change-Id: I6136b937988958a460b369b368c84a60199cb528
      
      TBR=voydanoff@google.com,ravoorir@google.com,surajmalhotra@google.com
      
      Change-Id: I3afda9afcec3e610da70900d8db3d306e71303b0
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      8bd04852
  3. Nov 09, 2018
    • Adam Barth's avatar
      [zxs] Remove inception.h · 36242efc
      Adam Barth authored
      We still have protocol.h because the zxs-test needs the protocol
      definition. Once NET-1865 is fixed, we'll be able to remove protocol.h
      as well.
      
      Also, removed a number of unused declarations from these headers.
      
      Test: No behavior change
      Change-Id: Ifeee4e3bfc3e0781e3cef28fb327836d9642904e
      36242efc
    • Aaron Green's avatar
      [edid] Add EDID fuzzer · a5dd5a30
      Aaron Green authored
      This CL adds a simple fuzzer which fuzzes the Edid::Init method.
      
      SEC-44 #comment Another fuzzer to test the framework with
      
      Tests: Manually tested with uapp/fuzz
      Change-Id: Ib802490a7a1131b9ebc65b652e11ad56fa5906a0
      a5dd5a30
    • Todd Eisenberger's avatar
      [devmgr] Make DcIostate's ownership more explicit · e7817168
      Todd Eisenberger authored
      This is a relanding of 5e1b40e9 which
      was reverted in 63d3696c for causing
      failures on the roller.  The failures were caused by the unrelated
      bug ZX-2961.
      
      This captures the ownership model of DcIostate's memory and its
      associated IPC channel.
      
      Test: Booted on hardware and tested interactions
      Change-Id: I709a7f8679e8831529e5f4a5a554cbed462fe7d1
      e7817168
    • Todd Eisenberger's avatar
      [devmgr] Switch devcoordinator to libasync · 41860739
      Todd Eisenberger authored
      This is a relanding of 57372092 which was
      reverted in e278a58e for causing
      failures on the roller.  The only change between this patch and that are
      naming changes.
      
      This will get us things like future-scheduled events, which
      would be useful for implementing backoff on driver binding attempts.
      
      Test: Booted in qemu with ASAN enabled.  Booted on hardware, verified
      system comes up and is responsive to hardware events.
      
      Change-Id: Ia2fbc2c7fe1347184c1e3645daefdc1dec6f3ea0
      41860739
    • Todd Eisenberger's avatar
      [devmgr] Fix race in devhost proxy iostate destruction · 623c2920
      Todd Eisenberger authored
      Previously multiple threads were accessing the dev->proxy_ios and the
      proxy_ios->ph.handle fields concurrently.
      
      ZX-2691 #done
      
      Test: Do not yet have a reliable test for this. ZX-2987 tracks adding
      a test later.
      
      Change-Id: Iaae98c30f9fc17efaf7ad1f84668503adb52754f
      623c2920
    • Nick Maniscalco's avatar
      [kernel] Add self to kernel/MAINTAINERS · b0a2db2a
      Nick Maniscalco authored
      Test: none
      
      Change-Id: I9eb2c9c193ca7fd0e7e692e7fc0c5297c232655e
      b0a2db2a
    • Nick Maniscalco's avatar
      [ulib][inspector] Print warning when backtrace is truncated · e93cc73f
      Nick Maniscalco authored
      Print a warning when we fail to print all frames in a
      backtrace. Hopefully, this warning will make it more obvious when a
      crash is caused by unbounded recursion.
      
      Old style:
      
      [00024.028] 01103.01117> bt#48: pc 0x5bde7df5e670 sp 0x1e75cb9c73d0 (app:/boot/test/sys/time-test,0x670)
      [00024.028] 01103.01117> bt#49: pc 0x5bde7df5e670 sp 0x1e75cb9c7480 (app:/boot/test/sys/time-test,0x670)
      [00024.028] 01103.01117> bt#50: end
      [00024.028] 01103.01117> warning: backtrace frame limit exceeded; backtrace may be truncated
      
      New style:
      
      [00024.031] 01103.01117> {{{bt:48:0x5bde7df5e670}}}
      [00024.031] 01103.01117> {{{bt:49:0x5bde7df5e670}}}
      [00024.031] 01103.01117> warning: backtrace frame limit exceeded; backtrace may be truncated
      
      Test: ran a program that recurses infinitely, saw the new warning
      
      ZX-2989 #done
      
      Change-Id: I0434a86986e63391f647db9c09be328cac23f8a3
      e93cc73f
    • Adam Barth's avatar
      [zxs] Implement zxs_socket · 5c31feae
      Adam Barth authored
      This function is the last function to be implemented in zxs.
      
      Test: Covered by loopback tests in //garnet
      Change-Id: I95e1c18f5672e91c3f49089d68ebb37ad6a967a5
      5c31feae
    • Todd Eisenberger's avatar
      [devmgr] Fix race between async loop and device remove · 0edc8be3
      Todd Eisenberger authored
      device_remove() may be called from a different thread than the async
      loop.  Because of that, we need to avoid mutating the async connection
      data structure from device_remove().  This patch reworks the shutdown
      logic to avoid unsafe accesses.
      
      ZX-2961 #comment Fixes the non-proxy datarace
      
      Test: Ran /pkgfs/packages/wlan-hw-sim-tests/0/test/wlan-hw-sim_bin_test_rustc
      repeatedly.  Previously would trigger a devhost crash roughly 1 in 5
      times.  Did not see anymore devhost crashes with this patch, except for
      the discovery of a bug in the wlan driver (NET-1860).
      
      Change-Id: Ib48d058b0f5f4d5b1958d6ea688c67ae1e53b6d1
      0edc8be3
    • Todd Eisenberger's avatar
      [devmgr] Split DevhostIostate into two parts · 4a756535
      Todd Eisenberger authored
      DevcoordinatorConnection is now used solely for the devhost<->devcoordinator
      communications channel.
      
      DevfsConnection has been introduced to track application <-> device
      connections (which happen via devfs).
      
      Test: Build and ran with ASAN in qemu
      Change-Id: Ibb7d557a8b6422dc0ffbbe6c57d0b62ebfb4cdba
      4a756535
    • Todd Eisenberger's avatar
      [devmgr] Prepare to split DevhostIostate · b3b35f69
      Todd Eisenberger authored
      DevhostIostate is used to track two different types of async
      connections:
      1) The devhost <-> devcoordinator connection for a device
      2) The application <-> device (devfs) connections for a device
      
      This diff refactors away the one point at which the types were being
      merged.
      
      Test: Build and ran under ASAN
      Change-Id: Icd87c8ebd2b622d63f47803e34d1747fcb5d92c0
      b3b35f69
    • Aaron Green's avatar
      [zxcrypt] Synchronize Bind/Unbind · 5dfe1207
      Aaron Green authored
      This CL handles the case that Unbind is called simultaneouesly with
      Bind.  It prevents DdkRemove from being called twice, which would lead
      to a use-after-free.
      
      ZX-2988 #done
      
      Tests: zxcrypt unit tests
      Change-Id: Ib3da97b1b6b0841e94b8538b5a575391596b8b1e
      5dfe1207
    • Jocelyn Dang's avatar
      [zircon][usb-request] Add phys_iter tests. · bfc64d0e
      Jocelyn Dang authored
      Ported from previously removed iotxn tests to usb-request.
      Will be adding more tests in future when modifying phys_iter to
      to account for scatter gather.
      
      ZX-936 #comment
      
      TEST= runtests /system/test/ddk-test
      
      Change-Id: I5170726383ab949626dd60e0c9db187b20be25d3
      bfc64d0e
    • Ruchira Ravoori's avatar
      [zircon][usb]Allocate more req size to acommodate internal contexts · fcbe4779
      Ruchira Ravoori authored
      This is part2 of my previous changeset, https://fuchsia-review.googlesource.com/c/zircon/+/218979
      I just broke this down into 2 changesets, so as not to change too many
      clients in 1 change.
      
      Test:
      vim2: Plugged in a usb mass storage device
            and read using dd on it.
      Pixelbook: Netbooted pixelbook. Plugged in a usb mass storage
                 device and read some blocks using dd.
                 audio tone
      Astro: Netbooted. Verified that the usb ethernet adapter showed up.
      
      Change-Id: I6136b937988958a460b369b368c84a60199cb528
      fcbe4779
    • Nick Maniscalco's avatar
      [utest][launchpad] Convert launchpad tests to C++ · fb5241aa
      Nick Maniscalco authored
      Convert launchpad tests to C++, changing as little as possible.
      
      Test: /boot/test/sys/launchpad-test
      
      Change-Id: Ib2ebdc74880aac70598d5a051fa520f5a40190a2
      fb5241aa
    • Todd Eisenberger's avatar
      Revert "[block][ddk][ddktl][fvm] changed signature of get_stats for block device" · 51cfa32b
      Todd Eisenberger authored
      This reverts commit 663d78ff.
      
      Reason for revert: Incompatible change with a driver in astro
      
      Original change's description:
      > [block][ddk][ddktl][fvm] changed signature of get_stats for block device
      > 
      > changed signature of get_stats for block device to reveal less
      > information. This also required changing the code in a few places
      > that were autogenerated from the old signature.
      > 
      > tests: runtests
      > Change-Id: I57483dc6d0fdf06e209e0183150d2f5e6353e8c3
      
      TBR=smklein@google.com,rvargas@google.com,gevalentino@google.com,kmerrick@google.com
      
      Change-Id: I756a88eb753483beefbed7ec815eea2e5ba7223e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      51cfa32b
    • James Tucker's avatar
      [paths] swap /system/apps for /pkg/bin · 01d7be54
      James Tucker authored
      Test: boot and run "set", observe new path
      Change-Id: Iea7c0c2ebbf17997ff3aa1d5ec9d9e73aad62d1e
      01d7be54
    • Braden Kell's avatar
      [mt8167][emmc] Add interrupt thread · 2bdccc24
      Braden Kell authored
      Test: iochk
      ZX-2783
      
      Change-Id: I3d543ded18a0d14b0828ff122612ee51b3f89e1f
      2bdccc24
    • Abdulla Kamar's avatar
      [hypervisor] Make addresses in VM exit clearly hex · da569e3e
      Abdulla Kamar authored
      Test: N/A
      Change-Id: Id99eacb07c1c8a46ee390982cf60736abf262dc9
      da569e3e
    • Todd Eisenberger's avatar
      [fvm] Fix use-after-free caused by double DdkRemove() · d4f2fcd4
      Todd Eisenberger authored
      DdkRemove() will drop the driver's reference to the device.  Since the
      driver only has one reference, calling it twice is unsafe.
      
      Test: Ran the blobfs-tests with new devhost changes that caused this
      bug to trigger frequently.
      
      Change-Id: Id322cd131c4fefe125b6aa2df79c8c49694ccccc
      d4f2fcd4
    • Kevin Merrick's avatar
      [block][ddk][ddktl][fvm] changed signature of get_stats for block device · 663d78ff
      Kevin Merrick authored
      changed signature of get_stats for block device to reveal less
      information. This also required changing the code in a few places
      that were autogenerated from the old signature.
      
      tests: runtests
      Change-Id: I57483dc6d0fdf06e209e0183150d2f5e6353e8c3
      663d78ff
    • Yifei Teng's avatar
      [fit] Small doc improvements to fit::nullable. · dca2c959
      Yifei Teng authored
      Fix missing angular bracket and make it clear we are comparing to
      std::optional.
      
      TEST: no test needed since only comments are changed.
      
      Change-Id: Ib2557bfc65d668b7b878a2bd88dfced0a1c603ca
      dca2c959
    • Gianfranco Valentino's avatar
      [cobalt-client]: Remove option for pre allocating. · e4757733
      Gianfranco Valentino authored
      No longer need to define max_histograms/max_counters.
      
      Use a wrapper class to dereference a pointer to the vector
      and an index in the vector, ElementView.
      
      Histogram and Counter used to have a pointer to their respective
      internal implementations(Remote and local in the future). This meant
      that the vector that contained them was not allowed to reallocated,
      which is why we requested the amount of each before allocation.
      
      Instead now we prevent Collector from being moved, and provide only
      heap allocated Collector. This allows to have a pointer to the vector
      and index within the vector, fetching on demand.
      
      Due to lack of support for immutable vector mutable elements, or
      vecotr view (std::span) we provide an equivalent of for a single
      element, eq of span of size 1, ElementView.
      
      TEST=cobalt-client-test
      
      Change-Id: Ie18af1b3c6927cfe41282d8ac951fce2c1dff181
      e4757733
    • Doug Evans's avatar
      [zx_koid_t] Kernel generated values are 63 bits · 1217c1b8
      Doug Evans authored
      Koids with the topmost bit set are for use by software for
      artificially created objects, e.g., "virtual threads" in tracing.
      
      Tested: CQ
      Change-Id: I55ecb7fe01a9b20256b04d733643cc48e0726f01
      1217c1b8
    • Aaron Green's avatar
      [hid-parser] Add hid-parser fuzzer · db6fcbb5
      Aaron Green authored
      This CL adds a simple fuzzer that executes the Parse method.
      
      SEC-44 #comment Add a fuzzer to test with
      
      Tests: Manual tested using uapp/fuzz
      
      Change-Id: I1825d1c298f5455067dfa8f5b95367708fd837fe
      db6fcbb5
  4. Nov 08, 2018
    • Ruchira Ravoori's avatar
      [zircon][usb]Allocate req to accommodate internal contexts · 49dcfcc4
      Ruchira Ravoori authored
      Motivation:usb_request_t struct needs to be broken into public and private regions
      that each driver in usb driver stack can access privately. This is done to avoid
      drivers touching each other's internal context data in the
      usb_request_t. The overall request size will be sizeof(public region -> usb_request_t)
      plus all the private contexts of each layer in the stack.
      This changeset allocates the size required to accommodate contexts of
      usb_bus and controller layers. In a later changeset, xhci and usb-device
      will use the extra space allocated without changing the request struct.
      The duplicated fields in the usb_request_t will be removed at the end.
      
      I have fixed the issue that caused network outage previously, in this
      changeset. The issue was that I was using the dev->req_size before
      initializing it, in usb-device.c
      
      Test:fx full-build. Netbooted vim2. Plugged in a usb mass storage device
      and read using dd on it. Netbooted pixelbook. Plugged in a usb mass storage
      device and read some blocks using dd. Netbooted astro and did a lsusb.
      Verified that the network adapter plugged-in showed up in lsusb.
      runtests /boot/test/ddk
      
      Change-Id: I3937113260f19d2b30e3d9e6109a9e9b724b95b3
      49dcfcc4
    • Adam Barth's avatar
      [zxs] Move ioctl for sockets into zxs · 1bed4a84
      Adam Barth authored
      After this CL, all the zxsio transactions are issued by the zxs library.
      
      Test: ioctl_test
      Change-Id: I91d265529f5c65d68e50ff7fdb78c87825c860c1
      1bed4a84
    • Todd Eisenberger's avatar
      [devhost] Switch zx_device to use RefPtr refcounting · 7b5da933
      Todd Eisenberger authored
      This causes more things to take references to zx_device, which should
      help us avoid some use-after-free risks, especially as we try to address
      the data race described in ZX-2961.
      
      Test: Booted full system and ran tests in qemu with ASAN.  Booted full
      system on hardware, confirmed peripherals functioned.
      
      Change-Id: I8d7683a689a1bd066c0f31ef7b67202e6c2d8c01
      7b5da933
    • Jocelyn Dang's avatar
      [dev][usb-request] Add scatter gather fields. · 29a1525b
      Jocelyn Dang authored
      Future CLs will actually use this and pass it to phys_iter.
      
      ZX-936 #comment
      
      TEST= runtests /boot/test/ddk
      
      Change-Id: I9afe02121a5d2bccc2858193654c292e2df32edd
      29a1525b
    • Roland McGrath's avatar
      [prebuilt] Update Clang toolchain · 891c3315
      Roland McGrath authored
      Test: CQ
      Change-Id: If589566ae6ed9579ccdb8a7c069fb8065d853e18
      891c3315
    • Tim Kilbourn's avatar
      [ethernet] Signal a status change on start · 3e8c08e4
      Tim Kilbourn authored
      When a client connects to an ethernet device, set the status signal on
      the rx fifo to encourage them to read the status. This is normally
      triggered by the start() method in the ethernet protocol, except that
      the new client isn't added to the active set at the time so it misses
      the signal.
      
      Reland of https://fuchsia-review.googlesource.com/c/zircon/+/181072
      
      NET-713
      Test: - manual testing in QEMU with the 'set_link' monitor command
            - /system/test/sys/ethernet-test
            - manual testing with a Pixelbook and a USB ethernet adapter
      
      Change-Id: I36410293f3ca5225e90fea01468fa7a284548af1
      3e8c08e4
    • George Kulakowski's avatar
      [devmgr] Move Metadata to its own header · 5c1fa25e
      George Kulakowski authored
      Test: no functional change
      Change-Id: Ifc72cefec2cba2b32e7a5c3ac0be3f1c0cc12ae2
      5c1fa25e
    • Adam Barth's avatar
      [zxs] Move socket data transport into zxs · ffb784c2
      Adam Barth authored
      This CL moves the data transport code for sockets from FDIO to ZXS.
      The FDIO code now uses ZXS to transport data for sockets.
      
      Test: No behavior change
      Change-Id: Ibf08374fba75f56a11e29cee546f70f7af4ec38d
      ffb784c2
Loading