#!/bin/bash # objdiff - a small script for validating that a commit or series of commits # didn't change object code. # # Copyright 2014, Jason Cooper # # Licensed under the terms of the GNU GPL version 2 # usage example: # # $ git checkout COMMIT_A # $ # $ ./scripts/objdiff record path/to/*.o # # $ git checkout COMMIT_B # $ # $ ./scripts/objdiff record path/to/*.o # # $ ./scripts/objdiff diff COMMIT_A COMMIT_B # $ # And to clean up (everything is in .tmp_objdiff/*) # $ ./scripts/objdiff clean all # # Note: 'make mrproper' will also remove .tmp_objdiff SRCTREE=$(cd $(git rev-parse --show-toplevel 2>/dev/null); pwd) if [ -z "$SRCTREE" ]; then echo >&2 "ERROR: Not a git repository." exit 1 fi TMPD=$SRCTREE/.tmp_objdiff usage() { echo >&2 "Usage: $0 " echo >&2 " record " echo >&2 " diff " echo >&2 " clean all | " exit 1 } get_output_dir() { dir=${1%/*} if [ "$dir" = "$1" ]; then dir=. fi dir=$(cd $dir; pwd) echo $TMPD/$CMT${dir#$SRCTREE} } do_objdump() { dir=$(get_output_dir $1) base=${1##*/} dis=$dir/${base%.o}.dis [ ! -d "$dir" ] && mkdir -p $dir # remove addresses for a cleaner diff # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and $OBJDUMP -D $1 | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dis } dorecord() { [ $# -eq 0 ] && usage FILES="$*" CMT="`git rev-parse --short HEAD`" OBJDUMP="${CROSS_COMPILE}objdump" for d in $FILES; do if [ -d "$d" ]; then for f in $(find $d -name '*.o') do do_objdump $f done else do_objdump $d fi done } dodiff() { [ $# -ne 2 ] && [ $# -ne 0 ] && usage if [ $# -eq 0 ]; then SRC="`git rev-parse --short HEAD^`" DST="`git rev-parse --short HEAD`" else SRC="`git rev-parse --short $1`" DST="`git rev-parse --short $2`" fi DIFF="`which colordiff`" if [ ${#DIFF} -eq 0 ] || [ ! -x "$DIFF" ]; then DIFF="`which diff`" fi SRCD="$TMPD/$SRC" DSTD="$TMPD/$DST" if [ ! -d "$SRCD" ]; then echo >&2 "ERROR: $SRCD doesn't exist" exit 1 fi if [ ! -d "$DSTD" ]; then echo >&2 "ERROR: $DSTD doesn't exist" exit 1 fi $DIFF -Nurd $SRCD $DSTD } doclean() { [ $# -eq 0 ] && usage [ $# -gt 1 ] && usage if [ "x$1" = "xall" ]; then rm -rf $TMPD/* else CMT="`git rev-parse --short $1`" if [ -d "$TMPD/$CMT" ]; then rm -rf $TMPD/$CMT else echo >&2 "$CMT not found" fi fi } [ $# -eq 0 ] && usage case "$1" in record) shift dorecord $* ;; diff) shift dodiff $* ;; clean) shift doclean $* ;; *) echo >&2 "Unrecognized command '$1'" exit 1 ;; esac 3.11.y Hosts the 0x221E linux distro kernel.Ubuntu
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2024-12-03PCI/P2PDMA: Constify 'struct bin_attribute'Thomas Weißschuh
2024-11-05sysfs: treewide: constify attribute callback of bin_attribute::mmap()Thomas Weißschuh
2024-02-08PCI/P2PDMA: Fix a sleeping issue in a RCU read sectionChristophe JAILLET
2023-10-23PCI/P2PDMA: Remove redundant gotoTadeusz Struk
2023-10-03PCI/P2PDMA: Fix undefined behavior bug in struct pci_p2pdma_pagemapGustavo A. R. Silva
2023-08-25PCI: Fix typos in docs and commentsBjorn Helgaas
2023-08-14PCI/P2PDMA: Use pci_dev_id() to simplify the codeZheng Zengkai
2023-04-06PCI/P2PDMA: Fix pci_p2pmem_find_many() kernel-docCai Huoqing
2023-02-16PCI/P2PDMA: Annotate RCU dereferenceLogan Gunthorpe
2022-12-13Merge tag 'for-6.2/block-2022-12-08' of git://git.kernel.dk/linuxLinus Torvalds
2022-11-18treewide: use get_random_u32_below() instead of deprecated functionJason A. Donenfeld
2022-11-09PCI/P2PDMA: Allow userspace VMA allocations through sysfsLogan Gunthorpe
2022-09-19PCI/P2PDMA: Use for_each_pci_dev() helperYang Yingliang
2022-07-26PCI/P2PDMA: Remove pci_p2pdma_[un]map_sg()Logan Gunthorpe
2022-07-26PCI/P2PDMA: Introduce helpers for dma_map_sg implementationsLogan Gunthorpe
2022-07-26PCI/P2PDMA: Attempt to set map_type if it has not been setLogan Gunthorpe
2022-04-11PCI/P2PDMA: Whitelist Intel Skylake-E Root Ports at any devfnShlomo Pongratz
2022-02-25PCI/P2PDMA: Add Intel 3rd Gen Intel Xeon Scalable Processors to whitelistMichael J. Ruhl
2022-01-16Merge tag 'pci-v5.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds
2021-12-15PCI/P2PDMA: Use percpu_ref_tryget_live_rcu() inside RCU critical sectionChristophe JAILLET
2021-12-04memremap: remove support for external pgmap refcountsChristoph Hellwig
2021-11-05Merge branch 'pci/sysfs'Bjorn Helgaas
2021-09-28PCI: Use kstrtobool() directly, sans strtobool() wrapperKrzysztof Wilczyński
2021-09-20PCI/P2PDMA: Apply bus offset correctly in DMA address calculationWang Lu
2021-07-06Merge branch 'pci/sysfs'Bjorn Helgaas
2021-07-06PCI/P2PDMA: Finish RCU conversion of pdev->p2pdmaEric Dumazet
2021-06-16PCI/P2PDMA: Simplify distance calculationChristoph Hellwig
2021-06-10PCI/P2PDMA: Avoid pci_get_slot(), which may sleepLogan Gunthorpe
2021-06-10PCI/P2PDMA: Refactor pci_p2pdma_map_type()Logan Gunthorpe
2021-06-10PCI/P2PDMA: Warn if host bridge not in whitelistLogan Gunthorpe
2021-06-10PCI/P2PDMA: Use correct calc_map_type_and_dist() return typeLogan Gunthorpe
2021-06-10PCI/P2PDMA: Collect acs list in stack buffer to avoid sleepingLogan Gunthorpe
2021-06-10PCI/P2PDMA: Rename upstream_bridge_distance() and rework docLogan Gunthorpe
2021-06-03PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functionsKrzysztof Wilczyński
2020-12-16Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdmaLinus Torvalds
2020-11-30PCI: Fix kernel-doc markupMauro Carvalho Chehab
2020-11-17PCI/P2PDMA: Cleanup __pci_p2pdma_map_sg a bitChristoph Hellwig
2020-11-17PCI/P2PDMA: Remove the DMA_VIRT_OPS hacksChristoph Hellwig
2020-10-22Merge tag 'pci-v5.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds
2020-10-13mm/memremap_pages: support multiple ranges per invocationDan Williams
2020-10-13mm/memremap_pages: convert to 'struct range'Dan Williams
2020-09-30PCI/P2PDMA: Drop double zeroing for sg_init_table()Julia Lawall
2020-09-01PCI: Use scnprintf(), not snprintf(), in sysfs "show" functionsKrzysztof Wilczyński
2020-08-17PCI/P2PDMA: Fix build without DMA opsChristoph Hellwig
2020-08-05Merge branch 'pci/peer-to-peer'Bjorn Helgaas
2020-07-30PCI/P2PDMA: Allow P2PDMA on AMD Zen and newer CPUsLogan Gunthorpe
2020-07-10PCI: Cache ACS capability offset in deviceRajat Jain
2020-04-23PCI/P2PDMA: Add AMD Zen Raven and Renoir Root Ports to whitelistAlex Deucher
2020-03-18PCI/P2PDMA: Add Intel Sky Lake-E Root Ports B, C, D to the whitelistAndrew Maier
2019-12-10PCI/P2PDMA: Add Intel SkyLake-E to the whitelistArmen Baloyan