mirror of
https://github.com/openharmony/kernel_linux_common_modules.git
synced 2026-08-27 19:49:56 -04:00
106ffc4b63
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
31 lines
668 B
Bash
Executable File
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
|