linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Helge Deller <deller@gmx.de>,
	John David Anglin <dave.anglin@bell.net>
Subject: [PATCH 3.14 051/122] parisc: Use compat layer for msgctl, shmat, shmctl and semtimedop syscalls
Date: Wed, 19 Nov 2014 12:51:41 -0800	[thread overview]
Message-ID: <20141119205210.499243090@linuxfoundation.org> (raw)
In-Reply-To: <20141119205208.812884198@linuxfoundation.org>

3.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Helge Deller <deller@gmx.de>

commit 2fe749f50b0bec07650ef135b29b1f55bf543869 upstream.

Switch over the msgctl, shmat, shmctl and semtimedop syscalls to use the compat
layer. The problem was found with the debian procenv package, which called
	shmctl(0, SHM_INFO, &info);
in which the shmctl syscall then overwrote parts of the surrounding areas on
the stack on which the info variable was stored and thus lead to a segfault
later on.

Additionally fix the definition of struct shminfo64 to use unsigned longs like
the other architectures. This has no impact on userspace since we only have a
32bit userspace up to now.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/parisc/include/uapi/asm/shmbuf.h |   25 +++++++++----------------
 arch/parisc/kernel/syscall_table.S    |    8 ++++----
 2 files changed, 13 insertions(+), 20 deletions(-)

--- a/arch/parisc/include/uapi/asm/shmbuf.h
+++ b/arch/parisc/include/uapi/asm/shmbuf.h
@@ -36,23 +36,16 @@ struct shmid64_ds {
 	unsigned int		__unused2;
 };
 
-#ifdef CONFIG_64BIT
-/* The 'unsigned int' (formerly 'unsigned long') data types below will
- * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on
- * a wide kernel, but if some of these values are meant to contain pointers
- * they may need to be 'long long' instead. -PB XXX FIXME
- */
-#endif
 struct shminfo64 {
-	unsigned int	shmmax;
-	unsigned int	shmmin;
-	unsigned int	shmmni;
-	unsigned int	shmseg;
-	unsigned int	shmall;
-	unsigned int	__unused1;
-	unsigned int	__unused2;
-	unsigned int	__unused3;
-	unsigned int	__unused4;
+	unsigned long	shmmax;
+	unsigned long	shmmin;
+	unsigned long	shmmni;
+	unsigned long	shmseg;
+	unsigned long	shmall;
+	unsigned long	__unused1;
+	unsigned long	__unused2;
+	unsigned long	__unused3;
+	unsigned long	__unused4;
 };
 
 #endif /* _PARISC_SHMBUF_H */
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -286,11 +286,11 @@
 	ENTRY_COMP(msgsnd)
 	ENTRY_COMP(msgrcv)
 	ENTRY_SAME(msgget)		/* 190 */
-	ENTRY_SAME(msgctl)
-	ENTRY_SAME(shmat)
+	ENTRY_COMP(msgctl)
+	ENTRY_COMP(shmat)
 	ENTRY_SAME(shmdt)
 	ENTRY_SAME(shmget)
-	ENTRY_SAME(shmctl)		/* 195 */
+	ENTRY_COMP(shmctl)		/* 195 */
 	ENTRY_SAME(ni_syscall)		/* streams1 */
 	ENTRY_SAME(ni_syscall)		/* streams2 */
 	ENTRY_SAME(lstat64)
@@ -323,7 +323,7 @@
 	ENTRY_SAME(epoll_ctl)		/* 225 */
 	ENTRY_SAME(epoll_wait)
  	ENTRY_SAME(remap_file_pages)
-	ENTRY_SAME(semtimedop)
+	ENTRY_COMP(semtimedop)
 	ENTRY_COMP(mq_open)
 	ENTRY_SAME(mq_unlink)		/* 230 */
 	ENTRY_COMP(mq_timedsend)



  parent reply	other threads:[~2014-11-19 21:58 UTC|newest]

Thread overview: 123+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 20:50 [PATCH 3.14 000/122] 3.14.25-stable review Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 001/122] Revert "drivers/net: Disable UFO through virtio" Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 002/122] ip6_tunnel: Use ip6_tnl_dev_init as the ndo_init function Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 003/122] vti6: Use vti6_dev_init " Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 004/122] sit: Use ipip6_tunnel_init " Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 005/122] gre6: Move the setting of dev->iflink into the ndo_init functions Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 006/122] vxlan: Do not reuse sockets for a different address family Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 007/122] net: sctp: fix NULL pointer dereference in af->from_addr_param on malformed packet Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 008/122] net: sctp: fix memory leak in auth key management Greg Kroah-Hartman
2014-11-19 20:50 ` [PATCH 3.14 009/122] smsc911x: power-up phydev before doing a software reset Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 010/122] sunvdc: add cdrom and v1.1 protocol support Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 011/122] sunvdc: compute vdisk geometry from capacity Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 012/122] sunvdc: limit each sg segment to a page Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 013/122] vio: fix reuse of vio_dring slot Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 014/122] sunvdc: dont call VD_OP_GET_VTOC Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 015/122] sparc64: Fix crashes in schizo_pcierr_intr_other() Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 016/122] sparc64: Do irq_{enter,exit}() around generic_smp_call_function*() Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 017/122] sparc32: Implement xchg and atomic_xchg using ATOMIC_HASH locks Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 018/122] zram: avoid kunmap_atomic() of a NULL pointer Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 019/122] crypto: caam - fix missing dma unmap on error path Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 020/122] crypto: caam - remove duplicated sg copy functions Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 021/122] hwrng: pseries - port to new read API and fix stack corruption Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 022/122] tun: Fix csum_start with VLAN acceleration Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 023/122] x86, x32, audit: Fix x32s AUDIT_ARCH wrt audit Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 024/122] audit: correct AUDIT_GET_FEATURE return message type Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 025/122] audit: AUDIT_FEATURE_CHANGE message format missing delimiting space Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 026/122] audit: keep inode pinned Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 027/122] ahci: Add Device IDs for Intel Sunrise Point PCH Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 028/122] ahci: disable MSI instead of NCQ on Samsung pci-e SSDs on macbooks Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 029/122] ALSA: usb-audio: Fix memory leak in FTU quirk Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 030/122] xtensa: re-wire umount syscall to sys_oldumount Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 031/122] libceph: do not crash on large auth tickets Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 032/122] macvtap: Fix csum_start when VLAN tags are present Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 033/122] mac80211_hwsim: release driver when ieee80211_register_hw fails Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 034/122] mac80211: properly flush delayed scan work on interface removal Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 035/122] mac80211: use secondary channel offset IE also beacons during CSA Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 036/122] mac80211: schedule the actual switch of the station before CSA count 0 Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 037/122] mac80211: fix use-after-free in defragmentation Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 038/122] drm/radeon: set correct CE ram size for CIK Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 039/122] drm/radeon: make sure mode init is complete in bandwidth_update Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 040/122] drm/radeon: add missing crtc unlock when setting up the MC Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 042/122] ARM: 8191/1: decompressor: ensure I-side picks up relocated code Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 043/122] pinctrl: dra: dt-bindings: Fix output pull up/down Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 044/122] dm thin: grab a virtual cell before looking up the mapping Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 046/122] firewire: cdev: prevent kernel stack leaking into ioctl arguments Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 047/122] ata: sata_rcar: Disable DIPM mode for r8a7790 ES1 Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 048/122] nfs: fix pnfs direct write memory leak Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 049/122] Correct the race condition in aarch64_insn_patch_text_sync() Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 050/122] scsi: only re-lock door after EH on devices that were reset Greg Kroah-Hartman
2014-11-19 20:51 ` Greg Kroah-Hartman [this message]
2014-11-19 20:51 ` [PATCH 3.14 052/122] block: Fix computation of merged request priority Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 053/122] dm bufio: change __GFP_IO to __GFP_FS in shrinker callbacks Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 054/122] dm btree: fix a recursion depth bug in btree walking code Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 055/122] dm raid: ensure superblocks size matches devices logical block size Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 056/122] Input: synaptics - add min/max quirk for Lenovo T440s Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 060/122] power: charger-manager: Fix accessing invalidated power supply after fuel gauge unbind Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 061/122] power: charger-manager: Fix accessing invalidated power supply after charger unbind Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 062/122] power: bq2415x_charger: Properly handle ENODEV from power_supply_get_by_phandle Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 063/122] power: bq2415x_charger: Fix memory leak on DTS parsing error Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 064/122] x86, microcode, AMD: Fix early ucode loading on 32-bit Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 065/122] x86, microcode, AMD: Fix ucode patch stashing " Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 066/122] x86, kaslr: Prevent .bss from overlaping initrd Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 067/122] md: Always set RECOVERY_NEEDED when clearing RECOVERY_FROZEN Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 068/122] NFSv4: Ensure that we remove NFSv4.0 delegations when state has expired Greg Kroah-Hartman
2014-11-19 20:51 ` [PATCH 3.14 069/122] NFS: Dont try to reclaim delegation open state if recovery failed Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 070/122] nfs: Fix use of uninitialized variable in nfs_getattr() Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 071/122] NFSv4: Fix races between nfs_remove_bad_delegation() and delegation return Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 072/122] NFSv4.1: nfs41_clear_delegation_stateid shouldnt trust NFS_DELEGATED_STATE Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 073/122] media: ttusb-dec: buffer overflow in ioctl Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 074/122] memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 075/122] vmcore: Remove "weak" from function declarations Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 076/122] kgdb: Remove "weak" from kgdb_arch_pc() declaration Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 077/122] clocksource: Remove "weak" from clocksource_default_clock() declaration Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 078/122] IB/core: Clear AH attr variable to prevent garbage data Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 079/122] ipc: always handle a new value of auto_msgmni Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 080/122] netfilter: ipset: off by one in ip_set_nfnl_get_byindex() Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 081/122] netfilter: nf_log: account for size of NLMSG_DONE attribute Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 082/122] netfilter: nfnetlink_log: fix maximum packet length logged to userspace Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 083/122] netfilter: nf_log: release skbuff on nlmsg put failure Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 084/122] netfilter: nft_compat: fix wrong target lookup in nft_target_select_ops() Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 085/122] netfilter: xt_bpf: add mising opaque struct sk_filter definition Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 086/122] ARM: probes: fix instruction fetch order with <asm/opcodes.h> Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 087/122] GFS2: Fix address space from page function Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 088/122] rcu: Make callers awaken grace-period kthread Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 089/122] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 091/122] perf: Handle compat ioctl Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 092/122] perf/x86/intel: Use proper dTLB-load-misses event on IvyBridge Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 093/122] KVM: x86: Dont report guest userspace emulation error to userspace Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 094/122] net: sctp: fix remote memory pressure from excessive queueing Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 095/122] net: sctp: fix panic on duplicate ASCONF chunks Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 096/122] net: sctp: fix skb_over_panic when receiving malformed " Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 097/122] iwlwifi: configure the LTR Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 098/122] regmap: fix kernel hang on regmap_bulk_write with zero val_count Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 099/122] lib: radix-tree: add radix_tree_delete_item() Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 100/122] mm: shmem: save one radix tree lookup when truncating swapped pages Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 101/122] mm: filemap: move radix tree hole searching here Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 102/122] mm + fs: prepare for non-page entries in page cache radix trees Greg Kroah-Hartman
2014-11-20 15:49   ` Johannes Weiner
2014-11-20 16:20     ` Greg Kroah-Hartman
2014-11-20 16:21     ` Mel Gorman
2014-11-20 20:39       ` Johannes Weiner
2014-11-19 20:52 ` [PATCH 3.14 103/122] mm: madvise: fix MADV_WILLNEED on shmem swapouts Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 104/122] mm: remove read_cache_page_async() Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 105/122] callers of iov_copy_from_user_atomic() dont need pagecache_disable() Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 106/122] mm/readahead.c: inline ra_submit Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 107/122] mm/compaction: clean up unused code lines Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 108/122] mm/compaction: cleanup isolate_freepages() Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 109/122] mm, migration: add destination page freeing callback Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 110/122] mm, compaction: return failed migration target pages back to freelist Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 111/122] mm, compaction: add per-zone migration pfn cache for async compaction Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 112/122] mm, compaction: embed migration mode in compact_control Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 113/122] mm, compaction: terminate async compaction when rescheduling Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 114/122] mm/compaction: do not count migratepages when unnecessary Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 115/122] mm/compaction: avoid rescanning pageblocks in isolate_freepages Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 116/122] mm, compaction: properly signal and act upon lock and need_sched() contention Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 117/122] x86/mm: In the PTE swapout page reclaim case clear the accessed bit instead of flushing the TLB Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 118/122] mm: fix direct reclaim writeback regression Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 119/122] fs/superblock: unregister sb shrinker before ->kill_sb() Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 120/122] fs/superblock: avoid locking counting inodes and dentries before reclaiming them Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 121/122] mm: vmscan: use proportional scanning during direct reclaim and full scan at DEF_PRIORITY Greg Kroah-Hartman
2014-11-19 20:52 ` [PATCH 3.14 122/122] mm/page_alloc: prevent MIGRATE_RESERVE pages from being misplaced Greg Kroah-Hartman
2014-11-20  5:32 ` [PATCH 3.14 000/122] 3.14.25-stable review Guenter Roeck
2014-11-21  1:37 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141119205210.499243090@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=dave.anglin@bell.net \
    --cc=deller@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).