| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2016 IBM Corporation |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Authors: |
|---|
| 5 | 6 | * Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> |
|---|
| 6 | 7 | * 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. |
|---|
| 12 | 8 | */ |
|---|
| 13 | | -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| 14 | 9 | |
|---|
| 15 | 10 | #include <linux/seq_file.h> |
|---|
| 16 | 11 | #include <linux/vmalloc.h> |
|---|
| .. | .. |
|---|
| 106 | 101 | kexec_segment_size = ALIGN(ima_get_binary_runtime_size() + |
|---|
| 107 | 102 | PAGE_SIZE / 2, PAGE_SIZE); |
|---|
| 108 | 103 | if ((kexec_segment_size == ULONG_MAX) || |
|---|
| 109 | | - ((kexec_segment_size >> PAGE_SHIFT) > totalram_pages / 2)) { |
|---|
| 104 | + ((kexec_segment_size >> PAGE_SHIFT) > totalram_pages() / 2)) { |
|---|
| 110 | 105 | pr_err("Binary measurement list too large.\n"); |
|---|
| 111 | 106 | return; |
|---|
| 112 | 107 | } |
|---|