Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 1 | # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | """Tools for reading, verifying and applying Chrome OS update payloads.""" |
| 6 | |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 7 | from __future__ import print_function |
| 8 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 9 | import hashlib |
| 10 | import struct |
| 11 | |
Sen Jiang | c2527f4 | 2017-09-27 16:35:03 -0700 | [diff] [blame^] | 12 | from update_payload import applier |
| 13 | from update_payload import block_tracer |
| 14 | from update_payload import checker |
| 15 | from update_payload import common |
| 16 | from update_payload.error import PayloadError |
| 17 | from update_payload import update_metadata_pb2 |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 18 | |
| 19 | |
| 20 | # |
| 21 | # Helper functions. |
| 22 | # |
| 23 | def _ReadInt(file_obj, size, is_unsigned, hasher=None): |
Gilad Arnold | 5502b56 | 2013-03-08 13:22:31 -0800 | [diff] [blame] | 24 | """Reads a binary-encoded integer from a file. |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 25 | |
| 26 | It will do the correct conversion based on the reported size and whether or |
| 27 | not a signed number is expected. Assumes a network (big-endian) byte |
| 28 | ordering. |
| 29 | |
| 30 | Args: |
| 31 | file_obj: a file object |
| 32 | size: the integer size in bytes (2, 4 or 8) |
| 33 | is_unsigned: whether it is signed or not |
| 34 | hasher: an optional hasher to pass the value through |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 35 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 36 | Returns: |
| 37 | An "unpacked" (Python) integer value. |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 38 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 39 | Raises: |
| 40 | PayloadError if an read error occurred. |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 41 | """ |
Gilad Arnold | 5502b56 | 2013-03-08 13:22:31 -0800 | [diff] [blame] | 42 | return struct.unpack(common.IntPackingFmtStr(size, is_unsigned), |
| 43 | common.Read(file_obj, size, hasher=hasher))[0] |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 44 | |
| 45 | |
| 46 | # |
| 47 | # Update payload. |
| 48 | # |
| 49 | class Payload(object): |
| 50 | """Chrome OS update payload processor.""" |
| 51 | |
| 52 | class _PayloadHeader(object): |
| 53 | """Update payload header struct.""" |
| 54 | |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 55 | # Header constants; sizes are in bytes. |
| 56 | _MAGIC = 'CrAU' |
| 57 | _VERSION_SIZE = 8 |
| 58 | _MANIFEST_LEN_SIZE = 8 |
| 59 | _METADATA_SIGNATURE_LEN_SIZE = 4 |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 60 | |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 61 | def __init__(self): |
| 62 | self.version = None |
| 63 | self.manifest_len = None |
| 64 | self.metadata_signature_len = None |
| 65 | self.size = None |
| 66 | |
| 67 | def ReadFromPayload(self, payload_file, hasher=None): |
| 68 | """Reads the payload header from a file. |
| 69 | |
| 70 | Reads the payload header from the |payload_file| and updates the |hasher| |
| 71 | if one is passed. The parsed header is stored in the _PayloadHeader |
| 72 | instance attributes. |
| 73 | |
| 74 | Args: |
| 75 | payload_file: a file object |
| 76 | hasher: an optional hasher to pass the value through |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 77 | |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 78 | Returns: |
| 79 | None. |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 80 | |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 81 | Raises: |
| 82 | PayloadError if a read error occurred or the header is invalid. |
| 83 | """ |
| 84 | # Verify magic |
| 85 | magic = common.Read(payload_file, len(self._MAGIC), hasher=hasher) |
| 86 | if magic != self._MAGIC: |
| 87 | raise PayloadError('invalid payload magic: %s' % magic) |
| 88 | |
| 89 | self.version = _ReadInt(payload_file, self._VERSION_SIZE, True, |
| 90 | hasher=hasher) |
| 91 | self.manifest_len = _ReadInt(payload_file, self._MANIFEST_LEN_SIZE, True, |
| 92 | hasher=hasher) |
| 93 | self.size = (len(self._MAGIC) + self._VERSION_SIZE + |
| 94 | self._MANIFEST_LEN_SIZE) |
| 95 | self.metadata_signature_len = 0 |
| 96 | |
| 97 | if self.version == common.BRILLO_MAJOR_PAYLOAD_VERSION: |
| 98 | self.size += self._METADATA_SIGNATURE_LEN_SIZE |
| 99 | self.metadata_signature_len = _ReadInt( |
| 100 | payload_file, self._METADATA_SIGNATURE_LEN_SIZE, True, |
| 101 | hasher=hasher) |
| 102 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 103 | |
| 104 | def __init__(self, payload_file): |
| 105 | """Initialize the payload object. |
| 106 | |
| 107 | Args: |
| 108 | payload_file: update payload file object open for reading |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 109 | """ |
| 110 | self.payload_file = payload_file |
| 111 | self.manifest_hasher = None |
| 112 | self.is_init = False |
| 113 | self.header = None |
| 114 | self.manifest = None |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 115 | self.data_offset = None |
| 116 | self.metadata_signature = None |
| 117 | self.metadata_size = None |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 118 | |
| 119 | def _ReadHeader(self): |
| 120 | """Reads and returns the payload header. |
| 121 | |
| 122 | Returns: |
| 123 | A payload header object. |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 124 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 125 | Raises: |
| 126 | PayloadError if a read error occurred. |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 127 | """ |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 128 | header = self._PayloadHeader() |
| 129 | header.ReadFromPayload(self.payload_file, self.manifest_hasher) |
| 130 | return header |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 131 | |
| 132 | def _ReadManifest(self): |
| 133 | """Reads and returns the payload manifest. |
| 134 | |
| 135 | Returns: |
| 136 | A string containing the payload manifest in binary form. |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 137 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 138 | Raises: |
| 139 | PayloadError if a read error occurred. |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 140 | """ |
| 141 | if not self.header: |
| 142 | raise PayloadError('payload header not present') |
| 143 | |
| 144 | return common.Read(self.payload_file, self.header.manifest_len, |
| 145 | hasher=self.manifest_hasher) |
| 146 | |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 147 | def _ReadMetadataSignature(self): |
| 148 | """Reads and returns the metadata signatures. |
| 149 | |
| 150 | Returns: |
| 151 | A string containing the metadata signatures protobuf in binary form or |
| 152 | an empty string if no metadata signature found in the payload. |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 153 | |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 154 | Raises: |
| 155 | PayloadError if a read error occurred. |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 156 | """ |
| 157 | if not self.header: |
| 158 | raise PayloadError('payload header not present') |
| 159 | |
| 160 | return common.Read( |
| 161 | self.payload_file, self.header.metadata_signature_len, |
| 162 | offset=self.header.size + self.header.manifest_len) |
| 163 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 164 | def ReadDataBlob(self, offset, length): |
| 165 | """Reads and returns a single data blob from the update payload. |
| 166 | |
| 167 | Args: |
| 168 | offset: offset to the beginning of the blob from the end of the manifest |
| 169 | length: the blob's length |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 170 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 171 | Returns: |
| 172 | A string containing the raw blob data. |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 173 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 174 | Raises: |
| 175 | PayloadError if a read error occurred. |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 176 | """ |
| 177 | return common.Read(self.payload_file, length, |
| 178 | offset=self.data_offset + offset) |
| 179 | |
| 180 | def Init(self): |
| 181 | """Initializes the payload object. |
| 182 | |
| 183 | This is a prerequisite for any other public API call. |
| 184 | |
| 185 | Raises: |
| 186 | PayloadError if object already initialized or fails to initialize |
| 187 | correctly. |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 188 | """ |
| 189 | if self.is_init: |
| 190 | raise PayloadError('payload object already initialized') |
| 191 | |
| 192 | # Initialize hash context. |
| 193 | # pylint: disable=E1101 |
| 194 | self.manifest_hasher = hashlib.sha256() |
| 195 | |
| 196 | # Read the file header. |
| 197 | self.header = self._ReadHeader() |
| 198 | |
| 199 | # Read the manifest. |
| 200 | manifest_raw = self._ReadManifest() |
| 201 | self.manifest = update_metadata_pb2.DeltaArchiveManifest() |
| 202 | self.manifest.ParseFromString(manifest_raw) |
| 203 | |
Alex Deymo | ef49735 | 2015-10-15 09:14:58 -0700 | [diff] [blame] | 204 | # Read the metadata signature (if any). |
| 205 | metadata_signature_raw = self._ReadMetadataSignature() |
| 206 | if metadata_signature_raw: |
| 207 | self.metadata_signature = update_metadata_pb2.Signatures() |
| 208 | self.metadata_signature.ParseFromString(metadata_signature_raw) |
| 209 | |
| 210 | self.metadata_size = self.header.size + self.header.manifest_len |
| 211 | self.data_offset = self.metadata_size + self.header.metadata_signature_len |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 212 | |
| 213 | self.is_init = True |
| 214 | |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 215 | def Describe(self): |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 216 | """Emits the payload embedded description data to standard output.""" |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 217 | def _DescribeImageInfo(description, image_info): |
Sen Jiang | c2527f4 | 2017-09-27 16:35:03 -0700 | [diff] [blame^] | 218 | """Display info about the image.""" |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 219 | def _DisplayIndentedValue(name, value): |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 220 | print(' {:<14} {}'.format(name+':', value)) |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 221 | |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 222 | print('%s:' % description) |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 223 | _DisplayIndentedValue('Channel', image_info.channel) |
| 224 | _DisplayIndentedValue('Board', image_info.board) |
| 225 | _DisplayIndentedValue('Version', image_info.version) |
| 226 | _DisplayIndentedValue('Key', image_info.key) |
| 227 | |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 228 | if image_info.build_channel != image_info.channel: |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 229 | _DisplayIndentedValue('Build channel', image_info.build_channel) |
| 230 | |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 231 | if image_info.build_version != image_info.version: |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 232 | _DisplayIndentedValue('Build version', image_info.build_version) |
| 233 | |
| 234 | if self.manifest.HasField('old_image_info'): |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 235 | # pylint: disable=E1101 |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 236 | _DescribeImageInfo('Old Image', self.manifest.old_image_info) |
| 237 | |
| 238 | if self.manifest.HasField('new_image_info'): |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 239 | # pylint: disable=E1101 |
Don Garrett | 432d601 | 2013-05-10 15:01:36 -0700 | [diff] [blame] | 240 | _DescribeImageInfo('New Image', self.manifest.new_image_info) |
| 241 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 242 | def _AssertInit(self): |
| 243 | """Raises an exception if the object was not initialized.""" |
| 244 | if not self.is_init: |
| 245 | raise PayloadError('payload object not initialized') |
| 246 | |
| 247 | def ResetFile(self): |
| 248 | """Resets the offset of the payload file to right past the manifest.""" |
| 249 | self.payload_file.seek(self.data_offset) |
| 250 | |
| 251 | def IsDelta(self): |
| 252 | """Returns True iff the payload appears to be a delta.""" |
| 253 | self._AssertInit() |
| 254 | return (self.manifest.HasField('old_kernel_info') or |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 255 | self.manifest.HasField('old_rootfs_info') or |
| 256 | any(partition.HasField('old_partition_info') |
| 257 | for partition in self.manifest.partitions)) |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 258 | |
| 259 | def IsFull(self): |
| 260 | """Returns True iff the payload appears to be a full.""" |
| 261 | return not self.IsDelta() |
| 262 | |
| 263 | def Check(self, pubkey_file_name=None, metadata_sig_file=None, |
| 264 | report_out_file=None, assert_type=None, block_size=0, |
Gilad Arnold | 382df5c | 2013-05-03 12:49:28 -0700 | [diff] [blame] | 265 | rootfs_part_size=0, kernel_part_size=0, allow_unhashed=False, |
| 266 | disabled_tests=()): |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 267 | """Checks the payload integrity. |
| 268 | |
| 269 | Args: |
| 270 | pubkey_file_name: public key used for signature verification |
| 271 | metadata_sig_file: metadata signature, if verification is desired |
| 272 | report_out_file: file object to dump the report to |
| 273 | assert_type: assert that payload is either 'full' or 'delta' |
| 274 | block_size: expected filesystem / payload block size |
Gilad Arnold | 382df5c | 2013-05-03 12:49:28 -0700 | [diff] [blame] | 275 | rootfs_part_size: the size of (physical) rootfs partitions in bytes |
| 276 | kernel_part_size: the size of (physical) kernel partitions in bytes |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 277 | allow_unhashed: allow unhashed operation blobs |
Gilad Arnold | eaed0d1 | 2013-04-30 15:38:22 -0700 | [diff] [blame] | 278 | disabled_tests: list of tests to disable |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 279 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 280 | Raises: |
| 281 | PayloadError if payload verification failed. |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 282 | """ |
| 283 | self._AssertInit() |
| 284 | |
| 285 | # Create a short-lived payload checker object and run it. |
Gilad Arnold | eaed0d1 | 2013-04-30 15:38:22 -0700 | [diff] [blame] | 286 | helper = checker.PayloadChecker( |
| 287 | self, assert_type=assert_type, block_size=block_size, |
| 288 | allow_unhashed=allow_unhashed, disabled_tests=disabled_tests) |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 289 | helper.Run(pubkey_file_name=pubkey_file_name, |
| 290 | metadata_sig_file=metadata_sig_file, |
Gilad Arnold | 382df5c | 2013-05-03 12:49:28 -0700 | [diff] [blame] | 291 | rootfs_part_size=rootfs_part_size, |
| 292 | kernel_part_size=kernel_part_size, |
Gilad Arnold | eaed0d1 | 2013-04-30 15:38:22 -0700 | [diff] [blame] | 293 | report_out_file=report_out_file) |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 294 | |
Gilad Arnold | 1641660 | 2013-05-04 21:40:39 -0700 | [diff] [blame] | 295 | def Apply(self, new_kernel_part, new_rootfs_part, old_kernel_part=None, |
Gilad Arnold | 21a0250 | 2013-08-22 16:59:48 -0700 | [diff] [blame] | 296 | old_rootfs_part=None, bsdiff_in_place=True, bspatch_path=None, |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 297 | truncate_to_expected_size=True): |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 298 | """Applies the update payload. |
| 299 | |
| 300 | Args: |
Gilad Arnold | 1641660 | 2013-05-04 21:40:39 -0700 | [diff] [blame] | 301 | new_kernel_part: name of dest kernel partition file |
| 302 | new_rootfs_part: name of dest rootfs partition file |
| 303 | old_kernel_part: name of source kernel partition file (optional) |
| 304 | old_rootfs_part: name of source rootfs partition file (optional) |
Gilad Arnold | 272a499 | 2013-05-08 13:12:53 -0700 | [diff] [blame] | 305 | bsdiff_in_place: whether to perform BSDIFF operations in-place (optional) |
Gilad Arnold | 21a0250 | 2013-08-22 16:59:48 -0700 | [diff] [blame] | 306 | bspatch_path: path to the bspatch binary (optional) |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 307 | truncate_to_expected_size: whether to truncate the resulting partitions |
| 308 | to their expected sizes, as specified in the |
| 309 | payload (optional) |
Sen Jiang | 349fd29 | 2015-11-16 17:28:09 -0800 | [diff] [blame] | 310 | |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 311 | Raises: |
| 312 | PayloadError if payload application failed. |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 313 | """ |
| 314 | self._AssertInit() |
| 315 | |
| 316 | # Create a short-lived payload applier object and run it. |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 317 | helper = applier.PayloadApplier( |
Gilad Arnold | 21a0250 | 2013-08-22 16:59:48 -0700 | [diff] [blame] | 318 | self, bsdiff_in_place=bsdiff_in_place, bspatch_path=bspatch_path, |
Gilad Arnold | e5fdf18 | 2013-05-23 16:13:38 -0700 | [diff] [blame] | 319 | truncate_to_expected_size=truncate_to_expected_size) |
Gilad Arnold | 1641660 | 2013-05-04 21:40:39 -0700 | [diff] [blame] | 320 | helper.Run(new_kernel_part, new_rootfs_part, |
| 321 | old_kernel_part=old_kernel_part, |
| 322 | old_rootfs_part=old_rootfs_part) |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 323 | |
| 324 | def TraceBlock(self, block, skip, trace_out_file, is_kernel): |
| 325 | """Traces the origin(s) of a given dest partition block. |
| 326 | |
| 327 | The tracing tries to find origins transitively, when possible (it currently |
| 328 | only works for move operations, where the mapping of src/dst is |
| 329 | one-to-one). It will dump a list of operations and source blocks |
| 330 | responsible for the data in the given dest block. |
| 331 | |
| 332 | Args: |
| 333 | block: the block number whose origin to trace |
| 334 | skip: the number of first origin mappings to skip |
| 335 | trace_out_file: file object to dump the trace to |
| 336 | is_kernel: trace through kernel (True) or rootfs (False) operations |
Gilad Arnold | 553b0ec | 2013-01-26 01:00:39 -0800 | [diff] [blame] | 337 | """ |
| 338 | self._AssertInit() |
| 339 | |
| 340 | # Create a short-lived payload block tracer object and run it. |
| 341 | helper = block_tracer.PayloadBlockTracer(self) |
| 342 | helper.Run(block, skip, trace_out_file, is_kernel) |