binfmt_flat.c (02da283302f7e723a6cef3ea296fbb2313dde992) binfmt_flat.c (1d52dca117434eca9c6efc9c22d24e7a341ad903)
1// SPDX-License-Identifier: GPL-2.0
2/****************************************************************************/
3/*
4 * linux/fs/binfmt_flat.c
5 *
6 * Copyright (C) 2000-2003 David McCullough <davidm@snapgear.com>
7 * Copyright (C) 2002 Greg Ungerer <gerg@snapgear.com>
8 * Copyright (C) 2002 SnapGear, by Paul Dale <pauli@snapgear.com>

--- 474 unchanged lines hidden (view full) ---

483 ret = -ENOEXEC;
484 goto err;
485 }
486
487 /*
488 * fix up the flags for the older format, there were all kinds
489 * of endian hacks, this only works for the simple cases
490 */
1// SPDX-License-Identifier: GPL-2.0
2/****************************************************************************/
3/*
4 * linux/fs/binfmt_flat.c
5 *
6 * Copyright (C) 2000-2003 David McCullough <davidm@snapgear.com>
7 * Copyright (C) 2002 Greg Ungerer <gerg@snapgear.com>
8 * Copyright (C) 2002 SnapGear, by Paul Dale <pauli@snapgear.com>

--- 474 unchanged lines hidden (view full) ---

483 ret = -ENOEXEC;
484 goto err;
485 }
486
487 /*
488 * fix up the flags for the older format, there were all kinds
489 * of endian hacks, this only works for the simple cases
490 */
491 if (rev == OLD_FLAT_VERSION && flat_old_ram_flag(flags))
491 if (rev == OLD_FLAT_VERSION &&
492 (flags || IS_ENABLED(CONFIG_BINFMT_FLAT_OLD_ALWAYS_RAM)))
492 flags = FLAT_FLAG_RAM;
493
494#ifndef CONFIG_BINFMT_ZFLAT
495 if (flags & (FLAT_FLAG_GZIP|FLAT_FLAG_GZDATA)) {
496 pr_err("Support for ZFLAT executables is not enabled.\n");
497 ret = -ENOEXEC;
498 goto err;
499 }

--- 517 unchanged lines hidden ---
493 flags = FLAT_FLAG_RAM;
494
495#ifndef CONFIG_BINFMT_ZFLAT
496 if (flags & (FLAT_FLAG_GZIP|FLAT_FLAG_GZDATA)) {
497 pr_err("Support for ZFLAT executables is not enabled.\n");
498 ret = -ENOEXEC;
499 goto err;
500 }

--- 517 unchanged lines hidden ---