Snap for 11889377 from 577261cf25
to 24Q3-release
Change-Id: I3e1d339ff25e74460ce6b12739578ab1517cc6ee
This commit is contained in:
commit
7cde84dc36
7 changed files with 19 additions and 34 deletions
|
@ -449,7 +449,16 @@ static bool GetGuestRegistersFromCrashedProcess([[maybe_unused]] pid_t tid,
|
|||
|
||||
if (ptrace(PTRACE_GETREGSET, tid, NT_ARM_TLS, &pt_iov) != 0) {
|
||||
PLOG(ERROR) << "failed to read thread register for thread " << tid;
|
||||
return false;
|
||||
}
|
||||
#elif defined(__riscv)
|
||||
struct user_regs_struct regs;
|
||||
struct iovec pt_iov = {.iov_base = ®s, .iov_len = sizeof(regs)};
|
||||
if (ptrace(PTRACE_GETREGSET, tid, NT_PRSTATUS, &pt_iov) != 0) {
|
||||
PLOG(ERROR) << "failed to read thread register for thread " << tid;
|
||||
return false;
|
||||
}
|
||||
base = reinterpret_cast<uintptr_t>(regs.tp);
|
||||
#else
|
||||
// TODO(b/339287219): Add case for Riscv host.
|
||||
return false;
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "libsnapshot/cow_format.h"
|
||||
|
||||
namespace android {
|
||||
|
@ -50,4 +52,4 @@ class ICompressor {
|
|||
const uint32_t block_size_;
|
||||
};
|
||||
} // namespace snapshot
|
||||
} // namespace android
|
||||
} // namespace android
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <memory>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <libsnapshot/cow_format.h>
|
||||
|
|
|
@ -127,9 +127,6 @@ class DeviceHandler : public UeventHandler {
|
|||
virtual ~DeviceHandler() = default;
|
||||
|
||||
void HandleUevent(const Uevent& uevent) override;
|
||||
void ColdbootDone() override;
|
||||
|
||||
std::vector<std::string> GetBlockDeviceSymlinks(const Uevent& uevent) const;
|
||||
|
||||
// `androidboot.partition_map` allows associating a partition name for a raw block device
|
||||
// through a comma separated and semicolon deliminated list. For example,
|
||||
|
@ -138,11 +135,13 @@ class DeviceHandler : public UeventHandler {
|
|||
static std::string GetPartitionNameForDevice(const std::string& device);
|
||||
|
||||
private:
|
||||
void ColdbootDone() override;
|
||||
bool FindPlatformDevice(std::string path, std::string* platform_device_path) const;
|
||||
std::tuple<mode_t, uid_t, gid_t> GetDevicePermissions(
|
||||
const std::string& path, const std::vector<std::string>& links) const;
|
||||
void MakeDevice(const std::string& path, bool block, int major, int minor,
|
||||
const std::vector<std::string>& links) const;
|
||||
std::vector<std::string> GetBlockDeviceSymlinks(const Uevent& uevent) const;
|
||||
void HandleDevice(const std::string& action, const std::string& devpath, bool block, int major,
|
||||
int minor, const std::vector<std::string>& links) const;
|
||||
void FixupSysPermissions(const std::string& upath, const std::string& subsystem) const;
|
||||
|
|
|
@ -68,10 +68,6 @@ static const struct fs_path_config android_dirs[] = {
|
|||
{ 01771, AID_SYSTEM, AID_MISC, 0, "data/misc" },
|
||||
{ 00775, AID_MEDIA_RW, AID_MEDIA_RW, 0, "data/media/Music" },
|
||||
{ 00775, AID_MEDIA_RW, AID_MEDIA_RW, 0, "data/media" },
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "data/nativetest" },
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "data/nativetest64" },
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "data/benchmarktest" },
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "data/benchmarktest64" },
|
||||
{ 00775, AID_ROOT, AID_ROOT, 0, "data/preloads" },
|
||||
{ 00771, AID_SYSTEM, AID_SYSTEM, 0, "data" },
|
||||
{ 00755, AID_ROOT, AID_SYSTEM, 0, "mnt" },
|
||||
|
@ -143,12 +139,6 @@ static const struct fs_path_config android_files[] = {
|
|||
{ 00644, AID_SYSTEM, AID_SYSTEM, 0, "data/app-private/*" },
|
||||
{ 00644, AID_APP, AID_APP, 0, "data/data/*" },
|
||||
{ 00644, AID_MEDIA_RW, AID_MEDIA_RW, 0, "data/media/*" },
|
||||
{ 00640, AID_ROOT, AID_SHELL, 0, "data/nativetest/tests.txt" },
|
||||
{ 00640, AID_ROOT, AID_SHELL, 0, "data/nativetest64/tests.txt" },
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "data/nativetest/*" },
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "data/nativetest64/*" },
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "data/benchmarktest/*" },
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "data/benchmarktest64/*" },
|
||||
{ 00600, AID_ROOT, AID_ROOT, 0, "default.prop" }, // legacy
|
||||
{ 00600, AID_ROOT, AID_ROOT, 0, "system/etc/prop.default" },
|
||||
{ 00600, AID_ROOT, AID_ROOT, 0, "odm/build.prop" }, // legacy; only for P release
|
||||
|
|
|
@ -117,3 +117,7 @@ prebuilt_etc {
|
|||
llndk_libraries_txt {
|
||||
name: "llndk.libraries.txt",
|
||||
}
|
||||
|
||||
sanitizer_libraries_txt {
|
||||
name: "sanitizer.libraries.txt",
|
||||
}
|
|
@ -210,26 +210,6 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in
|
|||
$(hide) sed -i -e 's?%EXPORT_GLOBAL_HWASAN_OPTIONS%?$(EXPORT_GLOBAL_HWASAN_OPTIONS)?g' $@
|
||||
$(hide) sed -i -e 's?%EXPORT_GLOBAL_SCUDO_ALLOCATION_RING_BUFFER_SIZE%?$(EXPORT_GLOBAL_SCUDO_ALLOCATION_RING_BUFFER_SIZE)?g' $@
|
||||
|
||||
#######################################
|
||||
# sanitizer.libraries.txt
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sanitizer.libraries.txt
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
|
||||
LOCAL_MODULE_STEM := $(LOCAL_MODULE)
|
||||
include $(BUILD_SYSTEM)/base_rules.mk
|
||||
$(LOCAL_BUILT_MODULE): PRIVATE_SANITIZER_RUNTIME_LIBRARIES := \
|
||||
$(SANITIZER_STEMS) \
|
||||
$(2ND_SANITIZER_STEMS)
|
||||
$(LOCAL_BUILT_MODULE):
|
||||
@echo "Generate: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) echo -n > $@
|
||||
$(hide) $(foreach lib,$(PRIVATE_SANITIZER_RUNTIME_LIBRARIES), \
|
||||
echo $(lib) >> $@;)
|
||||
|
||||
#######################################
|
||||
# ramdisk_node_list
|
||||
include $(CLEAR_VARS)
|
||||
|
|
Loading…
Reference in a new issue