Files
kernel_linux_common_modules/memory_security/apply_hideaddr.sh
c30043414 106ffc4b63 memory_security: Hide the render process JIT anonymous executable memory address
Output: The anonymized executable memory address of the JIT region of the rendering process cannot be queried through cat proc/pid/maps
A new memory security enhancement module has been added to the rendering, and this submission is a custom function that can perform memory address hiding for the rendering process

Signed-off-by: caobaolong <caobaolong5@huawei.com>

Change-Id: I302f45f92d41d0df3db0e54c018247890d244028
2023-10-19 11:27:42 +08:00

31 lines
668 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022 Huawei Device Co., Ltd.
#
#Description: Create a symbolic link for memory_security in Linux 5.10
#
set -e
OHOS_SOURCE_ROOT=$1
KERNEL_BUILD_ROOT=$2
PRODUCT_NAME=$3
KERNEL_VERSION=$4
MEMORY_SECURITY_SOURCE_ROOT=$OHOS_SOURCE_ROOT/kernel/linux/common_modules/memory_security
function main()
{
pushd .
if [ ! -d "$KERNEL_BUILD_ROOT/fs/proc/memory_security" ]; then
mkdir $KERNEL_BUILD_ROOT/fs/proc/memory_security
fi
cd $KERNEL_BUILD_ROOT/fs/proc/memory_security
ln -s -f $(realpath --relative-to=$KERNEL_BUILD_ROOT/fs/proc/memory_security/ $MEMORY_SECURITY_SOURCE_ROOT)/* ./
popd
}
main