Skip to content
Snippets Groups Projects
  1. 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
  2. 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
    • Doug Evans's avatar
      [doc][exceptions] Update zircon/posix comparison table · b69cedf8
      Doug Evans authored
      Tested: doc change, eyeballed it
      Change-Id: I823ff3d80c505344aa39080c6657a8fe795b6679
      b69cedf8
    • Doug Evans's avatar
      [doc][exceptions] Document the job debugger exception port · a9e7a615
      Doug Evans authored
      ... and reorganize things a little
      
      Tested: eyeballed it in gitiles
      Change-Id: Ibcf817a3775b48f988b9813db8b4f9f5550ac65f
      a9e7a615
    • Sean Klein's avatar
      [gpt] Return the correct size of GPT partitions · 80c21d30
      Sean Klein authored
      GPT partitions have their own sizes stored in info,
      which is not necessarily equal to the entire size of the
      underlying device.
      
      Test: Able to run `fvm-check` on an FVM within GPT successfully.
      ZX-2978 #comment In progress
      
      Change-Id: I30411ecfe9f36b133c525adbe2922c5b9ad8ac33
      80c21d30
    • Roland McGrath's avatar
      [ulib][musl] Unpack arg/env/name strings on user stack, not bootstrap stack · b615e2f3
      Roland McGrath authored
      There's no guarantee the bootstrap stack has enough space for all the
      string pointers.  It's better to have those arrays on the user (unsafe)
      stack anyway.
      
      Bug: ZX-2926 #comment libc unpacks strings on user stack
      Test: CQ
      Change-Id: I381c5f2b091d8ca329b16e951cc88d90ef358199
      b615e2f3
    • Ilya Bobyr's avatar
      [fdio][fidl] Use uint8 for DIRENT_TYPE_* constants. · a2caa77c
      Ilya Bobyr authored
      "type" field in these constants are supposed to be used with has type
      uint8.  This is a follow up to
      
        7f36f25d
        [fdio][fidl] Use unaligned dirents for readdir, add ino
      
      where the type of the field was changed but the type of the constants
      was not.
      
      Test:
        $ /system/test/fs/fs-test -f memfs
        CASES:  108     SUCCESS:  108     FAILED:  0
        $ /system/test/fs/fs-test -f minfs
        CASES:  108     SUCCESS:  108     FAILED:  0
      
      Change-Id: I3076a3b295c64b4cb11a3e4d9301d19590d756e1
      a2caa77c
    • Gianfranco Valentino's avatar
      [cobalt-client]: Timer update. · f4e33f39
      Gianfranco Valentino authored
      Previously I had the assumption that we would know what we are logging
      a priori, which is not always true. For example, when Operation A
      has multiple branches and different branches map to different event
      codes, we dont know which branch we are gonna pick until it is picked.
      At this point binding the timer to a specific histogram, is less
      useful than simply providing a fs::Ticker equivalent.
      
      For this reason, removed the histogram as part of the timer,
      and we can do something like:
      Timer timer(is_collecting);
      
      .....
          hitogram.Add(timer.End());
      TESTS= cobalt-client-test
      
      Change-Id: I93731f983112b0a061130c8f6f7bab9d7f98cffc
      f4e33f39
    • Sean Klein's avatar
      [fs][devmgr][fdio] Deprecate zxrio_node_info_t, test OnOpen messages. · 036d0b17
      Sean Klein authored
      A previous iteration of devfs and ulib/fs filesystems transmitted FIDL
      messages which, although parsed by the corresponding client bindings in
      the fdio C library, were technically invalid FIDL. This bug was due to
      the fact that an optional field from the OnOpen event was always
      transmitted, even when it was "FIDL_ALLOC_ABSENT". This arose partially
      because the hand-rolled FIDL bindings have historical origins in a
      non-FIDL protocol, called "RemoteIO", and some artifacts of this
      conversion still exist.
      
      This patch narrows the line between FIDL server implementations and
      their respective auto-generated bindings, removing some leftovers from
      RemoteIO:
      
      - Vnode::GetHandles has been replaced with a version which operates
      on "fuchsia_io_NodeInfo" directly, rather than an opaque "handles,
      type, and zxrio_node_info_t".
      - zxrio_node_info_t has been deprecated in favor of using
      fuchsia_io_NodeInfo directly. This allows us to reomve static assertions
      that the two structures are identical.
      - Some headers have been reshuffled to avoid host-side dependencies
      on FIDL bindings.
      - A test has been added for receiving this open event, on either
      success or failure, to the devfs test suite. This patch also tests
      the ulib/fs filesystems by opening "/boot/lib".
      
      Test: Expanded system/utest/devfs with "TestFidlOpen".
      ZX-2927 #done
      
      Change-Id: I37528a57567ce6c7cb53a76ed28142be9f5dc8fb
      036d0b17
Loading