-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl7qK2gACgkQONu9yGCS aT4kaw/8Cknc9G64S1SWchxFj4LnSYzrpeFGXOZBlHBtcCyD12JNGjA6SG6DoGLY /s/1fjBwJWrWpkI36CGNZowNPYtzRMOhyBGj7QHTpEj0vjMTKYXhVieMquQSHwRP zcrYl8f/xWJKo6XNjR1YLh5PWeD6B9dWD1RcvBZ0jCez84jyVT1EyWMWGiodkLMx gmJITO2DBaekelU0yyZJIFePO5DJpcXspf5lrPgkPG9u/U4hZf94AAGMYbXJZ5Rn BDcqGEGQe+mtcG6lq6DGRDH5VVMG4k13MrZJBfrVAhkGU+g6nKQbOXCcdcRjoM6N 9NL8RbcpL0NhphNmrKwjNcYd4kZxYgTQb87FZi+qDxwGQIWIxcET6gL5t/vqAev1 v/uKFLlt5x/2tNtpC8aY8EwdyGcXfeBXEl9AjP7HUWC/KzB8I9vLnokcMvOMYDIg 3wNIsKMYLcLzuLL8oJ7FvDkBO+H/RjSvF4UvQyLOPOJtWSV5uKbLfKIU9sw90G3i t8qo3lNC/J4saJ+jx+O7XoHjFw6biJFATvs0+HtpCkwi0aJm2SGW+OvXuZCGZPnz TW2YsGFCCwL/RPtceJVkGfV3kr7SUB5AGXjueXdC+4QWfmi3POWojjgheQrleS+3 OLxRsUVbQ6hOqEgLAaV6HhzvykkTjDj2Gq8P3I+1Y/eiRHjlpdU= =WYnW -----END PGP SIGNATURE----- Merge 5.4.47 into android-5.4-stable Changes in 5.4.47 ipv6: fix IPV6_ADDRFORM operation logic mlxsw: core: Use different get_trend() callbacks for different thermal zones net_failover: fixed rollback in net_failover_open() tun: correct header offsets in napi frags mode bridge: Avoid infinite loop when suppressing NS messages with invalid options vxlan: Avoid infinite loop when suppressing NS messages with invalid options bpf: Support llvm-objcopy for vmlinux BTF elfnote: mark all .note sections SHF_ALLOC Input: mms114 - fix handling of mms345l ARM: 8977/1: ptrace: Fix mask for thumb breakpoint hook sched/fair: Don't NUMA balance for kthreads Input: synaptics - add a second working PNP_ID for Lenovo T470s csky: Fixup abiv2 syscall_trace break a4 & a5 gfs2: Even more gfs2_find_jhead fixes drivers/net/ibmvnic: Update VNIC protocol version reporting powerpc/xive: Clear the page tables for the ESB IO mapping spi: dw: Fix native CS being unset ath9k_htc: Silence undersized packet warnings smack: avoid unused 'sip' variable warning RDMA/uverbs: Make the event_queue fds return POLLERR when disassociated padata: add separate cpuhp node for CPUHP_PADATA_DEAD s390/pci: Log new handle in clp_disable_fh() x86/cpu/amd: Make erratum #1054 a legacy erratum KVM: x86: only do L1TF workaround on affected processors PCI/PM: Adjust pcie_wait_for_link_delay() for caller delay perf probe: Accept the instance number of kretprobe event mm: add kvfree_sensitive() for freeing sensitive data objects selftests: fix flower parent qdisc fanotify: fix ignore mask logic for events on child and on dir aio: fix async fsync creds ipv4: fix a RCU-list lock in fib_triestat_seq_show iwlwifi: mvm: fix NVM check for 3168 devices sctp: fix possibly using a bad saddr with a given dst sctp: fix refcount bug in sctp_wfree x86_64: Fix jiffies ODR violation x86/PCI: Mark Intel C620 MROMs as having non-compliant BARs x86/speculation: Prevent rogue cross-process SSBD shutdown x86/speculation: Avoid force-disabling IBPB based on STIBP and enhanced IBRS. x86/speculation: PR_SPEC_FORCE_DISABLE enforcement for indirect branches. x86/reboot/quirks: Add MacBook6,1 reboot quirk perf/x86/intel: Add more available bits for OFFCORE_RESPONSE of Intel Tremont KVM: x86/mmu: Set mmio_value to '0' if reserved #PF can't be generated KVM: x86: respect singlestep when emulating instruction KVM: x86: Fix APIC page invalidation race powerpc/ptdump: Properly handle non standard page size ASoC: max9867: fix volume controls io_uring: use kvfree() in io_sqe_buffer_register() efi/efivars: Add missing kobject_put() in sysfs entry creation error path smb3: fix incorrect number of credits when ioctl MaxOutputResponse > 64K smb3: add indatalen that can be a non-zero value to calculation of credit charge in smb2 ioctl watchdog: imx_sc_wdt: Fix reboot on crash ALSA: es1688: Add the missed snd_card_free() ALSA: fireface: fix configuration error for nominal sampling transfer frequency ALSA: hda/realtek - add a pintbl quirk for several Lenovo machines ALSA: pcm: disallow linking stream to itself ALSA: pcm: fix snd_pcm_link() lockdep splat ALSA: usb-audio: Fix inconsistent card PM state after resume ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt Dock ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile() ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe() ACPI: GED: add support for _Exx / _Lxx handler methods ACPI: PM: Avoid using power resources if there are none for D0 arm64: acpi: fix UBSAN warning lib/lzo: fix ambiguous encoding bug in lzo-rle nilfs2: fix null pointer dereference at nilfs_segctor_do_construct() spi: dw: Fix controller unregister order spi: Fix controller unregister order spi: pxa2xx: Fix controller unregister order spi: pxa2xx: Fix runtime PM ref imbalance on probe error spi: bcm2835: Fix controller unregister order spi: bcm2835aux: Fix controller unregister order spi: bcm-qspi: Handle clock probe deferral spi: bcm-qspi: when tx/rx buffer is NULL set to 0 PM: runtime: clk: Fix clk_pm_runtime_get() error path gup: document and work around "COW can break either way" issue crypto: cavium/nitrox - Fix 'nitrox_get_first_device()' when ndevlist is fully iterated crypto: algapi - Avoid spurious modprobe on LOADED crypto: drbg - fix error return code in drbg_alloc_state() x86/{mce,mm}: Unmap the entire page if the whole page is affected and poisoned firmware: imx: warn on unexpected RX firmware: imx-scu: Support one TX and one RX firmware: imx: scu: Fix corruption of header crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req() crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req() crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req() dccp: Fix possible memleak in dccp_init and dccp_fini selftests/net: in rxtimestamp getopt_long needs terminating null entry net/mlx5: drain health workqueue in case of driver load error net/mlx5: Fix fatal error handling during device load net/mlx5e: Fix repeated XSK usage on one channel ovl: initialize error in ovl_copy_xattr proc: Use new_inode not new_inode_pseudo remoteproc: Fall back to using parent memory pool if no dedicated available remoteproc: Fix and restore the parenting hierarchy for vdev cpufreq: Fix up cpufreq_boost_set_sw() EDAC/skx: Use the mcmtr register to retrieve close_pg/bank_xor_enable video: vt8500lcdfb: fix fallthrough warning video: fbdev: w100fb: Fix a potential double free. KVM: nVMX: Skip IBPB when switching between vmcs01 and vmcs02 KVM: nSVM: fix condition for filtering async PF KVM: nSVM: leave ASID aside in copy_vmcb_control_area KVM: nVMX: Consult only the "basic" exit reason when routing nested exit KVM: MIPS: Define KVM_ENTRYHI_ASID to cpu_asid_mask(&boot_cpu_data) KVM: MIPS: Fix VPN2_MASK definition for variable cpu_vmbits KVM: arm64: Stop writing aarch32's CSSELR into ACTLR KVM: arm64: Make vcpu_cp1x() work on Big Endian hosts scsi: megaraid_sas: TM command refire leads to controller firmware crash scsi: lpfc: Fix negation of else clause in lpfc_prep_node_fc4type selftests/ftrace: Return unsupported if no error_log file ath9k: Fix use-after-free Read in htc_connect_service ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx ath9k: Fix use-after-free Write in ath9k_htc_rx_msg ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb Smack: slab-out-of-bounds in vsscanf drm/vkms: Hold gem object while still in-use mm/slub: fix a memory leak in sysfs_slab_add() fat: don't allow to mount if the FAT length == 0 perf: Add cond_resched() to task_function_call() agp/intel: Reinforce the barrier after GTT updates mmc: sdhci-msm: Clear tuning done flag while hs400 tuning mmc: mmci_sdmmc: fix DMA API warning overlapping mappings mmc: tmio: Further fixup runtime PM management at remove mmc: uniphier-sd: call devm_request_irq() after tmio_mmc_host_probe() ARM: dts: at91: sama5d2_ptc_ek: fix sdmmc0 node description mmc: sdio: Fix potential NULL pointer error in mmc_sdio_init_card() mmc: sdio: Fix several potential memory leaks in mmc_sdio_init_card() block/floppy: fix contended case in floppy_queue_rq() xen/pvcalls-back: test for errors when calling backend_connect() KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception KVM: arm64: Save the host's PtrAuth keys in non-preemptible context Linux 5.4.47 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I3fb3216abdbc080b4ac7b827b35ff6a813e28eb8
99 lines
3.5 KiB
C
99 lines
3.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_ELFNOTE_H
|
|
#define _LINUX_ELFNOTE_H
|
|
/*
|
|
* Helper macros to generate ELF Note structures, which are put into a
|
|
* PT_NOTE segment of the final vmlinux image. These are useful for
|
|
* including name-value pairs of metadata into the kernel binary (or
|
|
* modules?) for use by external programs.
|
|
*
|
|
* Each note has three parts: a name, a type and a desc. The name is
|
|
* intended to distinguish the note's originator, so it would be a
|
|
* company, project, subsystem, etc; it must be in a suitable form for
|
|
* use in a section name. The type is an integer which is used to tag
|
|
* the data, and is considered to be within the "name" namespace (so
|
|
* "FooCo"'s type 42 is distinct from "BarProj"'s type 42). The
|
|
* "desc" field is the actual data. There are no constraints on the
|
|
* desc field's contents, though typically they're fairly small.
|
|
*
|
|
* All notes from a given NAME are put into a section named
|
|
* .note.NAME. When the kernel image is finally linked, all the notes
|
|
* are packed into a single .notes section, which is mapped into the
|
|
* PT_NOTE segment. Because notes for a given name are grouped into
|
|
* the same section, they'll all be adjacent the output file.
|
|
*
|
|
* This file defines macros for both C and assembler use. Their
|
|
* syntax is slightly different, but they're semantically similar.
|
|
*
|
|
* See the ELF specification for more detail about ELF notes.
|
|
*/
|
|
|
|
#ifdef __ASSEMBLER__
|
|
/*
|
|
* Generate a structure with the same shape as Elf{32,64}_Nhdr (which
|
|
* turn out to be the same size and shape), followed by the name and
|
|
* desc data with appropriate padding. The 'desctype' argument is the
|
|
* assembler pseudo op defining the type of the data e.g. .asciz while
|
|
* 'descdata' is the data itself e.g. "hello, world".
|
|
*
|
|
* e.g. ELFNOTE(XYZCo, 42, .asciz, "forty-two")
|
|
* ELFNOTE(XYZCo, 12, .long, 0xdeadbeef)
|
|
*/
|
|
#define ELFNOTE_START(name, type, flags) \
|
|
.pushsection .note.name, flags,@note ; \
|
|
.balign 4 ; \
|
|
.long 2f - 1f /* namesz */ ; \
|
|
.long 4484f - 3f /* descsz */ ; \
|
|
.long type ; \
|
|
1:.asciz #name ; \
|
|
2:.balign 4 ; \
|
|
3:
|
|
|
|
#define ELFNOTE_END \
|
|
4484:.balign 4 ; \
|
|
.popsection ;
|
|
|
|
#define ELFNOTE(name, type, desc) \
|
|
ELFNOTE_START(name, type, "a") \
|
|
desc ; \
|
|
ELFNOTE_END
|
|
|
|
#else /* !__ASSEMBLER__ */
|
|
#include <uapi/linux/elf.h>
|
|
/*
|
|
* Use an anonymous structure which matches the shape of
|
|
* Elf{32,64}_Nhdr, but includes the name and desc data. The size and
|
|
* type of name and desc depend on the macro arguments. "name" must
|
|
* be a literal string, and "desc" must be passed by value. You may
|
|
* only define one note per line, since __LINE__ is used to generate
|
|
* unique symbols.
|
|
*/
|
|
#define _ELFNOTE_PASTE(a,b) a##b
|
|
#define _ELFNOTE(size, name, unique, type, desc) \
|
|
static const struct { \
|
|
struct elf##size##_note _nhdr; \
|
|
unsigned char _name[sizeof(name)] \
|
|
__attribute__((aligned(sizeof(Elf##size##_Word)))); \
|
|
typeof(desc) _desc \
|
|
__attribute__((aligned(sizeof(Elf##size##_Word)))); \
|
|
} _ELFNOTE_PASTE(_note_, unique) \
|
|
__used \
|
|
__attribute__((section(".note." name), \
|
|
aligned(sizeof(Elf##size##_Word)), \
|
|
unused)) = { \
|
|
{ \
|
|
sizeof(name), \
|
|
sizeof(desc), \
|
|
type, \
|
|
}, \
|
|
name, \
|
|
desc \
|
|
}
|
|
#define ELFNOTE(size, name, type, desc) \
|
|
_ELFNOTE(size, name, __LINE__, type, desc)
|
|
|
|
#define ELFNOTE32(name, type, desc) ELFNOTE(32, name, type, desc)
|
|
#define ELFNOTE64(name, type, desc) ELFNOTE(64, name, type, desc)
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif /* _LINUX_ELFNOTE_H */
|