forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/security/integrity/ima/ima_kexec.c
....@@ -1,16 +1,11 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2016 IBM Corporation
34 *
45 * Authors:
56 * Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
67 * Mimi Zohar <zohar@linux.vnet.ibm.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
128 */
13
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
149
1510 #include <linux/seq_file.h>
1611 #include <linux/vmalloc.h>
....@@ -106,7 +101,7 @@
106101 kexec_segment_size = ALIGN(ima_get_binary_runtime_size() +
107102 PAGE_SIZE / 2, PAGE_SIZE);
108103 if ((kexec_segment_size == ULONG_MAX) ||
109
- ((kexec_segment_size >> PAGE_SHIFT) > totalram_pages / 2)) {
104
+ ((kexec_segment_size >> PAGE_SHIFT) > totalram_pages() / 2)) {
110105 pr_err("Binary measurement list too large.\n");
111106 return;
112107 }