mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-13 10:46:49 +00:00
been disabled on the cmdline - Clarify in detail how /proc/cpuinfo is used on x86 - Fix a theoretical overflow in num_digits() -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmWZbXYACgkQEsHwGGHe VUpvDhAAmyvuYTVxWlCwHVfAfsaP9CczhOVTKy72fAIyTAa93if0pzzgNKd83k3f V1g3e2azk9VBGiRqDrexz3jJ6lKgQ4OUSWC3p+ywI5PuFmOWDZt3Xj4tUb6wTitA 5NuBBue/K1tm5AIXHRRX4b0yGCNQnp1nuuDeSci8R/Y8/41+6S1dxzPd4okVoegj 1Fjkn6l3gfTjW11xXP+OHP758xOvsbO1vFpyQFH+i9gHBructV4AN0UpsIFBOOnX ySaVL5w2bd5bVyRoVcJzVuvBvOnRwyLrTDzOmSqn57xnCL1Yc/YvBU9voLjo99XX GUQRd/ezfwOiKjf4EcomZZDnL3yEDyEm9gcmRvTYCq0OBxEaI0TEtmsF87eQig3e xe4qbiiFGRbTNb7VjxqbELmXgELE8+euv7pk6NgScA2DZP36H1SRDKujU7jIiwBM pKYJZwyTMC9JkJ+u9dqK0vHPihLBowFlXwKunuhCmk5iTmpLtXDo5ItesI29P/6Z viuu4ja07/7t91BEXwWaJjnVlsqfJNY28g5NyPNUhwXBMWEV7bHApUIn4XaRjkj0 wGzjD482+1TkfGHe5uIjM8dY9/+xJY/WIAO22liU4oUbGSmR/tFCwM6ZC4XeJfnP Q5aO9tcQBIrpIZMGMNd+eBvX2AnLFZ80l0iOHPayWBUoyhS8Wm8= =lzR+ -----END PGP SIGNATURE----- Merge tag 'x86_misc_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Borislav Petkov: - Add an informational message which gets issued when IA32 emulation has been disabled on the cmdline - Clarify in detail how /proc/cpuinfo is used on x86 - Fix a theoretical overflow in num_digits() * tag 'x86_misc_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ia32: State that IA32 emulation is disabled Documentation/x86: Document what /proc/cpuinfo is for x86/lib: Fix overflow when counting digits
104 lines
2.0 KiB
C
104 lines
2.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_X86_IA32_H
|
|
#define _ASM_X86_IA32_H
|
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
#include <linux/compat.h>
|
|
|
|
/*
|
|
* 32 bit structures for IA32 support.
|
|
*/
|
|
|
|
#include <uapi/asm/sigcontext.h>
|
|
|
|
/* signal.h */
|
|
|
|
struct ucontext_ia32 {
|
|
unsigned int uc_flags;
|
|
unsigned int uc_link;
|
|
compat_stack_t uc_stack;
|
|
struct sigcontext_32 uc_mcontext;
|
|
compat_sigset_t uc_sigmask; /* mask last for extensibility */
|
|
};
|
|
|
|
/* This matches struct stat64 in glibc2.2, hence the absolutely
|
|
* insane amounts of padding around dev_t's.
|
|
*/
|
|
struct stat64 {
|
|
unsigned long long st_dev;
|
|
unsigned char __pad0[4];
|
|
|
|
#define STAT64_HAS_BROKEN_ST_INO 1
|
|
unsigned int __st_ino;
|
|
|
|
unsigned int st_mode;
|
|
unsigned int st_nlink;
|
|
|
|
unsigned int st_uid;
|
|
unsigned int st_gid;
|
|
|
|
unsigned long long st_rdev;
|
|
unsigned char __pad3[4];
|
|
|
|
long long st_size;
|
|
unsigned int st_blksize;
|
|
|
|
long long st_blocks;/* Number 512-byte blocks allocated */
|
|
|
|
unsigned st_atime;
|
|
unsigned st_atime_nsec;
|
|
unsigned st_mtime;
|
|
unsigned st_mtime_nsec;
|
|
unsigned st_ctime;
|
|
unsigned st_ctime_nsec;
|
|
|
|
unsigned long long st_ino;
|
|
} __attribute__((packed));
|
|
|
|
#define IA32_STACK_TOP IA32_PAGE_OFFSET
|
|
|
|
#ifdef __KERNEL__
|
|
struct linux_binprm;
|
|
extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
|
|
unsigned long stack_top, int exec_stack);
|
|
struct mm_struct;
|
|
extern void ia32_pick_mmap_layout(struct mm_struct *mm);
|
|
|
|
#endif
|
|
|
|
extern bool __ia32_enabled;
|
|
|
|
static inline bool ia32_enabled(void)
|
|
{
|
|
return __ia32_enabled;
|
|
}
|
|
|
|
static inline void ia32_disable(void)
|
|
{
|
|
__ia32_enabled = false;
|
|
}
|
|
|
|
#else /* !CONFIG_IA32_EMULATION */
|
|
|
|
static inline bool ia32_enabled(void)
|
|
{
|
|
return IS_ENABLED(CONFIG_X86_32);
|
|
}
|
|
|
|
static inline void ia32_disable(void) {}
|
|
|
|
#endif
|
|
|
|
static inline bool ia32_enabled_verbose(void)
|
|
{
|
|
bool enabled = ia32_enabled();
|
|
|
|
if (IS_ENABLED(CONFIG_IA32_EMULATION) && !enabled)
|
|
pr_notice_once("32-bit emulation disabled. You can reenable with ia32_emulation=on\n");
|
|
|
|
return enabled;
|
|
}
|
|
|
|
#endif /* _ASM_X86_IA32_H */
|