mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-01-30 23:02:18 +00:00
84ba5b15ac
* Enhance GPIO addon for Noctua Fans for the Qortector upcoming case. This will put PWM signal to real-time. * Fixed RDP not letting a user login if not logged out on Cinnamon release (reported by Crowetic) * Update i2c sensor db * Fixed DRM broadcast over HDMI 2+ * Ease up DHCP security only to prevent Brooklyn blocking routers. * Add possibility to add extra memory for Cinnamon Desktop Release * Fix error message of Software Render mode on Cinnamon Desktop * Add proper offset for HD screens for pixel array *Fixed HDMI jitter for videocore4 GPU * Enable all radios (including Bluetooth)
47 lines
971 B
C
47 lines
971 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <linux/init.h>
|
|
#include <linux/fs.h>
|
|
#include <linux/file.h>
|
|
#include <linux/mm_types.h>
|
|
#include <linux/binfmts.h>
|
|
#include <linux/a.out.h>
|
|
|
|
static int load_binary(struct linux_binprm *bprm)
|
|
{
|
|
struct exec *eh = (struct exec *)bprm->buf;
|
|
unsigned long loader;
|
|
struct file *file;
|
|
int retval;
|
|
|
|
if (eh->fh.f_magic != 0x183 || (eh->fh.f_flags & 0x3000) != 0x3000)
|
|
return -ENOEXEC;
|
|
|
|
if (bprm->loader)
|
|
return -ENOEXEC;
|
|
|
|
loader = bprm->vma->vm_end - sizeof(void *);
|
|
|
|
file = open_exec("/sbin/loader");
|
|
retval = PTR_ERR(file);
|
|
if (IS_ERR(file))
|
|
return retval;
|
|
|
|
/* Remember if the application is TASO. */
|
|
bprm->taso = eh->ah.entry < 0x100000000UL;
|
|
|
|
bprm->interpreter = file;
|
|
bprm->loader = loader;
|
|
return 0;
|
|
}
|
|
|
|
static struct linux_binfmt loader_format = {
|
|
.load_binary = load_binary,
|
|
};
|
|
|
|
static int __init init_loader_binfmt(void)
|
|
{
|
|
insert_binfmt(&loader_format);
|
|
return 0;
|
|
}
|
|
arch_initcall(init_loader_binfmt);
|