7af9a48231
Changes in 4.19.155 objtool: Support Clang non-section symbols in ORC generation scripts/setlocalversion: make git describe output more reliable arm64: Run ARCH_WORKAROUND_1 enabling code on all CPUs arm64: link with -z norelro regardless of CONFIG_RELOCATABLE x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled efivarfs: Replace invalid slashes with exclamation marks in dentries. chelsio/chtls: fix deadlock issue chelsio/chtls: fix memory leaks in CPL handlers chelsio/chtls: fix tls record info to user gtp: fix an use-before-init in gtp_newlink() mlxsw: core: Fix memory leak on module removal netem: fix zero division in tabledist ravb: Fix bit fields checking in ravb_hwtstamp_get() tcp: Prevent low rmem stalls with SO_RCVLOWAT. tipc: fix memory leak caused by tipc_buf_append() r8169: fix issue with forced threading in combination with shared interrupts cxgb4: set up filter action after rewrites arch/x86/amd/ibs: Fix re-arming IBS Fetch x86/xen: disable Firmware First mode for correctable memory errors fuse: fix page dereference after free bpf: Fix comment for helper bpf_current_task_under_cgroup() evm: Check size of security.evm before using it p54: avoid accessing the data mapped to streaming DMA cxl: Rework error message for incompatible slots RDMA/addr: Fix race with netevent_callback()/rdma_addr_cancel() mtd: lpddr: Fix bad logic in print_drs_error serial: pl011: Fix lockdep splat when handling magic-sysrq interrupt ata: sata_rcar: Fix DMA boundary mask fscrypt: return -EXDEV for incompatible rename or link into encrypted dir fscrypt: clean up and improve dentry revalidation fscrypt: fix race allowing rename() and link() of ciphertext dentries fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory fscrypt: only set dentry_operations on ciphertext dentries fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext Revert "block: ratelimit handle_bad_sector() message" xen/events: don't use chip_data for legacy IRQs xen/events: avoid removing an event channel while handling it xen/events: add a proper barrier to 2-level uevent unmasking xen/events: fix race in evtchn_fifo_unmask() xen/events: add a new "late EOI" evtchn framework xen/blkback: use lateeoi irq binding xen/netback: use lateeoi irq binding xen/scsiback: use lateeoi irq binding xen/pvcallsback: use lateeoi irq binding xen/pciback: use lateeoi irq binding xen/events: switch user event channels to lateeoi model xen/events: use a common cpu hotplug hook for event channels xen/events: defer eoi in case of excessive number of events xen/events: block rogue events for some time x86/unwind/orc: Fix inactive tasks with stack pointer in %sp on GCC 10 compiled kernels mlxsw: core: Fix use-after-free in mlxsw_emad_trans_finish() RDMA/qedr: Fix memory leak in iWARP CM ata: sata_nv: Fix retrieving of active qcs futex: Fix incorrect should_fail_futex() handling powerpc/powernv/smp: Fix spurious DBG() warning mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM sparc64: remove mm_cpumask clearing to fix kthread_use_mm race f2fs: add trace exit in exception path f2fs: fix uninit-value in f2fs_lookup f2fs: fix to check segment boundary during SIT page readahead um: change sigio_spinlock to a mutex ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses power: supply: bq27xxx: report "not charging" on all types xfs: fix realtime bitmap/summary file truncation when growing rt volume video: fbdev: pvr2fb: initialize variables ath10k: start recovery process when payload length exceeds max htc length for sdio ath10k: fix VHT NSS calculation when STBC is enabled drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly media: videodev2.h: RGB BT2020 and HSV are always full range media: platform: Improve queue set up flow for bug fixing usb: typec: tcpm: During PR_SWAP, source caps should be sent only after tSwapSourceStart media: tw5864: check status of tw5864_frameinterval_get media: imx274: fix frame interval handling mmc: via-sdmmc: Fix data race bug drm/bridge/synopsys: dsi: add support for non-continuous HS clock arm64: topology: Stop using MPIDR for topology information printk: reduce LOG_BUF_SHIFT range for H8300 ia64: kprobes: Use generic kretprobe trampoline handler kgdb: Make "kgdbcon" work properly with "kgdb_earlycon" media: uvcvideo: Fix dereference of out-of-bound list iterator riscv: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO cpufreq: sti-cpufreq: add stih418 support USB: adutux: fix debugging uio: free uio id after uio file node is freed usb: xhci: omit duplicate actions when suspending a runtime suspended host. arm64/mm: return cpu_all_mask when node is NUMA_NO_NODE xfs: don't free rt blocks when we're doing a REMAP bunmapi call ACPI: Add out of bounds and numa_off protections to pxm_to_node() drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values bus/fsl_mc: Do not rely on caller to provide non NULL mc_io power: supply: test_power: add missing newlines when printing parameters by sysfs drm/amd/display: HDMI remote sink need mode validation for Linux btrfs: fix replace of seed device md/bitmap: md_bitmap_get_counter returns wrong blocks bnxt_en: Log unknown link speed appropriately. rpmsg: glink: Use complete_all for open states clk: ti: clockdomain: fix static checker warning net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid drivers: watchdog: rdc321x_wdt: Fix race condition bugs ext4: Detect already used quota file early gfs2: add validation checks for size of superblock cifs: handle -EINTR in cifs_setattr arm64: dts: renesas: ulcb: add full-pwr-cycle-in-suspend into eMMC nodes ARM: dts: omap4: Fix sgx clock rate for 4430 memory: emif: Remove bogus debugfs error handling ARM: dts: s5pv210: remove DMA controller bus node name to fix dtschema warnings ARM: dts: s5pv210: move PMU node out of clock controller ARM: dts: s5pv210: remove dedicated 'audio-subsystem' node nbd: make the config put is called before the notifying the waiter sgl_alloc_order: fix memory leak nvme-rdma: fix crash when connect rejected md/raid5: fix oops during stripe resizing mmc: sdhci-acpi: AMDI0040: Set SDHCI_QUIRK2_PRESET_VALUE_BROKEN perf/x86/amd/ibs: Don't include randomized bits in get_ibs_op_count() perf/x86/amd/ibs: Fix raw sample data accumulation leds: bcm6328, bcm6358: use devres LED registering function media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect fs: Don't invalidate page buffers in block_write_full_page() NFS: fix nfs_path in case of a rename retry ACPI: button: fix handling lid state changes when input device closed ACPI / extlog: Check for RDMSR failure ACPI: video: use ACPI backlight for HP 635 Notebook ACPI: debug: don't allow debugging when ACPI is disabled acpi-cpufreq: Honor _PSD table setting on new AMD CPUs w1: mxc_w1: Fix timeout resolution problem leading to bus error scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() scsi: qla2xxx: Fix crash on session cleanup with unload btrfs: qgroup: fix wrong qgroup metadata reserve for delayed inode btrfs: improve device scanning messages btrfs: reschedule if necessary when logging directory items btrfs: send, recompute reference path after orphanization of a directory btrfs: use kvzalloc() to allocate clone_roots in btrfs_ioctl_send() btrfs: cleanup cow block on error btrfs: fix use-after-free on readahead extent after failure to create it usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC usb: dwc3: ep0: Fix ZLP for OUT ep0 requests usb: dwc3: gadget: Check MPS of the request length usb: dwc3: core: add phy cleanup for probe error handling usb: dwc3: core: don't trigger runtime pm when remove driver usb: cdc-acm: fix cooldown mechanism usb: typec: tcpm: reset hard_reset_count for any disconnect usb: host: fsl-mph-dr-of: check return of dma_set_mask() drm/i915: Force VT'd workarounds when running as a guest OS vt: keyboard, simplify vt_kdgkbsent vt: keyboard, extend func_buf_lock to readers HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery udf: Fix memory leak when mounting dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status iio:light:si1145: Fix timestamp alignment and prevent data leak. iio:adc:ti-adc0832 Fix alignment issue with timestamp iio:adc:ti-adc12138 Fix alignment issue with timestamp iio:gyro:itg3200: Fix timestamp alignment and prevent data leak. powerpc/drmem: Make lmb_size 64 bit s390/stp: add locking to sysfs functions powerpc/rtas: Restrict RTAS requests from userspace powerpc: Warn about use of smt_snooze_delay powerpc/powernv/elog: Fix race while processing OPAL error log event. powerpc: Fix undetected data corruption with P9N DD2.1 VSX CI load emulation NFSv4.2: support EXCHGID4_FLAG_SUPP_FENCE_OPS 4.2 EXCHANGE_ID flag NFSD: Add missing NFSv2 .pc_func methods ubifs: dent: Fix some potential memory leaks while iterating entries perf python scripting: Fix printable strings in python3 scripts ubi: check kthread_should_stop() after the setting of task state ia64: fix build error with !COREDUMP i2c: imx: Fix external abort on interrupt in exit paths drm/amdgpu: don't map BO in reserved region drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally ceph: promote to unsigned long long before shifting libceph: clear con->out_msg on Policy::stateful_server faults 9P: Cast to loff_t before multiplying ring-buffer: Return 0 on success from ring_buffer_resize() vringh: fix __vringh_iov() when riov and wiov are different ext4: fix leaking sysfs kobject after failed mount ext4: fix error handling code in add_new_gdb ext4: fix invalid inode checksum drm/ttm: fix eviction valuable range check. rtc: rx8010: don't modify the global rtc ops tty: make FONTX ioctl use the tty pointer they were actually passed arm64: berlin: Select DW_APB_TIMER_OF cachefiles: Handle readpage error correctly hil/parisc: Disable HIL driver when it gets stuck arm: dts: mt7623: add missing pause for switchport ARM: samsung: fix PM debug build with DEBUG_LL but !MMU ARM: s3c24xx: fix missing system reset device property: Keep secondary firmware node secondary by type device property: Don't clear secondary pointer for shared primary firmware node KVM: arm64: Fix AArch32 handling of DBGD{CCINT,SCRext} and DBGVCR staging: comedi: cb_pcidas: Allow 2-channel commands for AO subdevice staging: octeon: repair "fixed-link" support staging: octeon: Drop on uncorrectable alignment or FCS error Linux 4.19.155 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I18fefb5bfaa4d05772c61c2975340d0f089b8e3e
218 lines
5.3 KiB
Bash
Executable file
218 lines
5.3 KiB
Bash
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# This scripts adds local version information from the version
|
|
# control systems git, mercurial (hg) and subversion (svn).
|
|
#
|
|
# If something goes wrong, send a mail the kernel build mailinglist
|
|
# (see MAINTAINERS) and CC Nico Schottelius
|
|
# <nico-linuxsetlocalversion -at- schottelius.org>.
|
|
#
|
|
#
|
|
|
|
usage() {
|
|
echo "Usage: $0 [--save-scmversion] [srctree] [branch] [kmi-generation]" >&2
|
|
exit 1
|
|
}
|
|
|
|
scm_only=false
|
|
srctree=.
|
|
android_release=
|
|
kmi_generation=
|
|
if test "$1" = "--save-scmversion"; then
|
|
scm_only=true
|
|
shift
|
|
fi
|
|
if test $# -gt 0; then
|
|
srctree=$1
|
|
shift
|
|
fi
|
|
if test $# -gt 0; then
|
|
# Extract the Android release version. If there is no match, then return 255
|
|
# and clear the var $android_release
|
|
android_release=`echo "$1" | sed -e '/android[0-9]\{2,\}/!{q255}; \
|
|
s/^\(android[0-9]\{2,\}\)-.*/\1/'`
|
|
if test $? -ne 0; then
|
|
android_release=
|
|
fi
|
|
shift
|
|
|
|
if test $# -gt 0; then
|
|
kmi_generation=$1
|
|
[ $(expr $kmi_generation : '^[0-9]\+$') -eq 0 ] && usage
|
|
shift
|
|
else
|
|
usage
|
|
fi
|
|
fi
|
|
if test $# -gt 0 -o ! -d "$srctree"; then
|
|
usage
|
|
fi
|
|
|
|
scm_version()
|
|
{
|
|
local short
|
|
short=false
|
|
|
|
cd "$srctree"
|
|
if test -e .scmversion; then
|
|
cat .scmversion
|
|
return
|
|
fi
|
|
if test "$1" = "--short"; then
|
|
short=true
|
|
fi
|
|
|
|
# Check for git and a git repo.
|
|
if test -z "$(git rev-parse --show-cdup 2>/dev/null)" &&
|
|
head=$(git rev-parse --verify HEAD 2>/dev/null); then
|
|
|
|
if [ -n "$android_release" ] && [ -n "$kmi_generation" ]; then
|
|
printf '%s' "-$android_release-$kmi_generation"
|
|
fi
|
|
|
|
# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
|
|
# it, because this version is defined in the top level Makefile.
|
|
if [ -z "`git describe --exact-match 2>/dev/null`" ]; then
|
|
|
|
# If only the short version is requested, don't bother
|
|
# running further git commands
|
|
if $short; then
|
|
echo "+"
|
|
return
|
|
fi
|
|
# If we are past a tagged commit (like
|
|
# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
|
|
#
|
|
# Ensure the abbreviated sha1 has exactly 12
|
|
# hex characters, to make the output
|
|
# independent of git version, local
|
|
# core.abbrev settings and/or total number of
|
|
# objects in the current repository - passing
|
|
# --abbrev=12 ensures a minimum of 12, and the
|
|
# awk substr() then picks the 'g' and first 12
|
|
# hex chars.
|
|
if atag="$(git describe --abbrev=12 2>/dev/null)"; then
|
|
echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),substr($(NF),0,13))}'
|
|
|
|
# If we don't have a tag at all we print -g{commitish},
|
|
# again using exactly 12 hex chars.
|
|
else
|
|
head="$(echo $head | cut -c1-12)"
|
|
printf '%s%s' -g $head
|
|
fi
|
|
fi
|
|
|
|
# Is this git on svn?
|
|
if git config --get svn-remote.svn.url >/dev/null; then
|
|
printf -- '-svn%s' "`git svn find-rev $head`"
|
|
fi
|
|
|
|
# Check for uncommitted changes.
|
|
# First, with git-status, but --no-optional-locks is only
|
|
# supported in git >= 2.14, so fall back to git-diff-index if
|
|
# it fails. Note that git-diff-index does not refresh the
|
|
# index, so it may give misleading results. See
|
|
# git-update-index(1), git-diff-index(1), and git-status(1).
|
|
if {
|
|
git --no-optional-locks status -uno --porcelain 2>/dev/null ||
|
|
git diff-index --name-only HEAD
|
|
} | grep -qvE '^(.. )?scripts/package'; then
|
|
printf '%s' -dirty
|
|
fi
|
|
|
|
# All done with git
|
|
return
|
|
fi
|
|
|
|
# Check for mercurial and a mercurial repo.
|
|
if test -d .hg && hgid=`hg id 2>/dev/null`; then
|
|
# Do we have an tagged version? If so, latesttagdistance == 1
|
|
if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
|
|
id=`hg log -r . --template '{latesttag}'`
|
|
printf '%s%s' -hg "$id"
|
|
else
|
|
tag=`printf '%s' "$hgid" | cut -d' ' -f2`
|
|
if [ -z "$tag" -o "$tag" = tip ]; then
|
|
id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
|
|
printf '%s%s' -hg "$id"
|
|
fi
|
|
fi
|
|
|
|
# Are there uncommitted changes?
|
|
# These are represented by + after the changeset id.
|
|
case "$hgid" in
|
|
*+|*+\ *) printf '%s' -dirty ;;
|
|
esac
|
|
|
|
# All done with mercurial
|
|
return
|
|
fi
|
|
|
|
# Check for svn and a svn repo.
|
|
if rev=`LANG= LC_ALL= LC_MESSAGES=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then
|
|
rev=`echo $rev | awk '{print $NF}'`
|
|
printf -- '-svn%s' "$rev"
|
|
|
|
# All done with svn
|
|
return
|
|
fi
|
|
}
|
|
|
|
collect_files()
|
|
{
|
|
local file res
|
|
|
|
for file; do
|
|
case "$file" in
|
|
*\~*)
|
|
continue
|
|
;;
|
|
esac
|
|
if test -e "$file"; then
|
|
res="$res$(cat "$file")"
|
|
fi
|
|
done
|
|
echo "$res"
|
|
}
|
|
|
|
if $scm_only; then
|
|
if test ! -e .scmversion; then
|
|
res=$(scm_version)
|
|
echo "$res" >.scmversion
|
|
fi
|
|
exit
|
|
fi
|
|
|
|
if test -e include/config/auto.conf; then
|
|
. include/config/auto.conf
|
|
else
|
|
echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# localversion* files in the build and source directory
|
|
res="$(collect_files localversion*)"
|
|
if test ! "$srctree" -ef .; then
|
|
res="$res$(collect_files "$srctree"/localversion*)"
|
|
fi
|
|
|
|
# CONFIG_LOCALVERSION and LOCALVERSION (if set)
|
|
res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"
|
|
|
|
# scm version string if not at a tagged commit
|
|
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
|
|
# full scm version string
|
|
res="$res$(scm_version)"
|
|
else
|
|
# append a plus sign if the repository is not in a clean
|
|
# annotated or signed tagged state (as git describe only
|
|
# looks at signed or annotated tags - git tag -a/-s) and
|
|
# LOCALVERSION= is not specified
|
|
if test "${LOCALVERSION+set}" != "set"; then
|
|
scm=$(scm_version --short)
|
|
res="$res${scm:++}"
|
|
fi
|
|
fi
|
|
|
|
echo "$res"
|