crdyboot: switch to a newly-released version of uefi-rs

Also added a TODO to use CString16 from uefi-rs once that's in a
release.

BUG=none
TEST=./x.py check

Change-Id: I04698841a3395e865ee39ffecf63ee9fe2f13b6c
Reviewed-on: https://chromium-review.googlesource.com/c/crdyboot/+/3115185
Tested-by: Nicholas Bishop <nicholasbishop@google.com>
Auto-Submit: Nicholas Bishop <nicholasbishop@google.com>
Reviewed-by: Esther Shimanovich <eshimanovich@google.com>
Commit-Queue: Esther Shimanovich <eshimanovich@google.com>
diff --git a/crdyboot/Cargo.lock b/crdyboot/Cargo.lock
index 2a22a2e..a2d0322 100644
--- a/crdyboot/Cargo.lock
+++ b/crdyboot/Cargo.lock
@@ -62,9 +62,9 @@
 
 [[package]]
 name = "bitflags"
-version = "1.2.1"
+version = "1.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
 
 [[package]]
 name = "camino"
@@ -207,9 +207,9 @@
 
 [[package]]
 name = "itoa"
-version = "0.4.7"
+version = "0.4.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
+checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
 
 [[package]]
 name = "lazy_static"
@@ -225,9 +225,9 @@
 
 [[package]]
 name = "libc"
-version = "0.2.98"
+version = "0.2.100"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
+checksum = "a1fa8cddc8fbbee11227ef194b5317ed014b8acbf15139bd716a18ad3fe99ec5"
 
 [[package]]
 name = "libloading"
@@ -250,9 +250,9 @@
 
 [[package]]
 name = "memchr"
-version = "2.4.0"
+version = "2.4.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
+checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
 
 [[package]]
 name = "nom"
@@ -357,18 +357,18 @@
 
 [[package]]
 name = "serde"
-version = "1.0.127"
+version = "1.0.128"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
+checksum = "1056a0db1978e9dbf0f6e4fca677f6f9143dc1c19de346f22cac23e422196834"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.127"
+version = "1.0.128"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc"
+checksum = "13af2fbb8b60a8950d6c72a56d2095c28870367cc8e10c55e9745bac4995a2c4"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -400,9 +400,9 @@
 
 [[package]]
 name = "syn"
-version = "1.0.74"
+version = "1.0.75"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c"
+checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -438,8 +438,9 @@
 
 [[package]]
 name = "uefi"
-version = "0.11.0"
-source = "git+https://github.com/rust-osdev/uefi-rs.git?branch=master#c4ab6ae100b22b88161f1203f25090cb5910074b"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4f8451cf8ee8c9c6219a0eb57e4045f6212976888e5295ebca1afccbf65ae9f4"
 dependencies = [
  "bitflags",
  "log",
@@ -449,9 +450,9 @@
 
 [[package]]
 name = "uefi-macros"
-version = "0.3.3"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3dcca10ca861f34a320d178f3fdb29ffbf05087fc2c70d2a99860e3329bee1a8"
+checksum = "e012a5bc55f3fd92ba8f3444b97fdc4a73afb8bd9edd0ac5a9c3d5d6182090ea"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -460,8 +461,9 @@
 
 [[package]]
 name = "uefi-services"
-version = "0.8.0"
-source = "git+https://github.com/rust-osdev/uefi-rs.git?branch=master#c4ab6ae100b22b88161f1203f25090cb5910074b"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27a0cbced83770da404e6f42995c991796d217f8a6f2f7a79fd401630b65f832"
 dependencies = [
  "cfg-if",
  "log",
diff --git a/crdyboot/Cargo.toml b/crdyboot/Cargo.toml
index f39ecd5..51a00fe 100644
--- a/crdyboot/Cargo.toml
+++ b/crdyboot/Cargo.toml
@@ -9,18 +9,11 @@
 
 [dependencies]
 log = "0.4"
-
-# TODO: the current 0.11.0 release doesn't everything we need yet, once a
-# new release is out switch these two deps back to crates.io.
-uefi = { git = "https://github.com/rust-osdev/uefi-rs.git", branch = "master", features = ["exts", "ignore-logger-errors"] }
-uefi-services = { git = "https://github.com/rust-osdev/uefi-rs.git", branch = "master" }
+uefi = { version = "0.12", features = ["exts", "ignore-logger-errors"] }
+uefi-services = "0.9"
 
 vboot = { path = "../vboot" }
 
-[patch.crates-io]
-# This is needed to fix uefi-services' dep on uefi
-uefi = { git = "https://github.com/rust-osdev/uefi-rs.git", branch = "master" }
-
 [features]
 # If enabled, a test key in the repo will be used to validate the kernel. If
 # disabled (the default), a key must be provided in this file (relative to
diff --git a/crdyboot/src/linux.rs b/crdyboot/src/linux.rs
index 718ac97..eead976 100644
--- a/crdyboot/src/linux.rs
+++ b/crdyboot/src/linux.rs
@@ -20,7 +20,8 @@
         other => panic!("invalid size of usize: {}", other),
     }
 }
-
+// TODO: once a version of uefi-rs with 58ae6a401 is released, drop this
+// function and use CString16.
 fn str_to_uefi_str(input: &str) -> Result<Vec<Char16>> {
     // Expect two bytes for each byte of the input, plus a null byte.
     let mut output = Vec::with_capacity(input.len() + 1);