https://github.com/torvalds/linux
Revision 545aabcbdcec6c88faa3dfde506ad1931d119f52 authored by Linus Torvalds on 15 February 2019, 16:20:33 UTC, committed by Linus Torvalds on 15 February 2019, 16:20:33 UTC
Pull drm fixes from Dave Airlie: "Usual pull request, little larger than I'd like but nothing too strange in it. Willy found an bug in the lease ioctl calculations, but it's a drm master only ioctl which makes it harder to mess with. i915: - combo phy programming fix - opregion version check fix for VBT RVDA lookup - gem mmap ioctl race fix - fbdev hpd during suspend fix - array size bounds check fix in pmu amdgpu: - Vega20 psp fix - Add vrr range to debugfs for freesync debugging sched: - Scheduler race fix vkms: - license header fixups imx: - Fix CSI register offsets for i.MX51 and i.MX53. - Fix delayed page flip completion events on i.MX6QP due to unexpected behaviour of the PRE when issuing NOP buffer updates to the same buffer address. - Stop throwing errors for plane updates on disabled CRTCs when a userspace process is killed while a plane update is pending. - Add missing of_node_put cleanup in imx_ldb_bind" * tag 'drm-fixes-2019-02-15-1' of git://anongit.freedesktop.org/drm/drm: drm: Use array_size() when creating lease drm/amdgpu/psp11: TA firmware is optional (v3) drm/i915/opregion: rvda is relative from opregion base in opregion 2.1+ drm/i915/opregion: fix version check drm/i915: Prevent a race during I915_GEM_MMAP ioctl with WC set drm/i915: Block fbdev HPD processing during suspend drm/i915/pmu: Fix enable count array size and bounds checking drm/i915/cnl: Fix CNL macros for Voltage Swing programming drm/i915/icl: combo port vswing programming changes per BSPEC drm/vkms: Fix license inconsistent drm/amd/display: Expose connector VRR range via debugfs drm/sched: Always trace the dependencies we wait on, to fix a race. gpu: ipu-v3: pre: don't trigger update if buffer address doesn't change gpu: ipu-v3: Fix CSI offsets for imx53 drm/imx: imx-ldb: add missing of_node_puts gpu: ipu-v3: Fix i.MX51 CSI control registers offset drm/imx: ignore plane updates on disabled crtcs
Tip revision: 545aabcbdcec6c88faa3dfde506ad1931d119f52 authored by Linus Torvalds on 15 February 2019, 16:20:33 UTC
Merge tag 'drm-fixes-2019-02-15-1' of git://anongit.freedesktop.org/drm/drm
Merge tag 'drm-fixes-2019-02-15-1' of git://anongit.freedesktop.org/drm/drm
Tip revision: 545aabc
compat.c
// SPDX-License-Identifier: GPL-2.0
/*
* 32 bit compatibility code for System V IPC
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
* Copyright (C) 1999 Arun Sharma <arun.sharma@intel.com>
* Copyright (C) 2000 VA Linux Co
* Copyright (C) 2000 Don Dugger <n0ano@valinux.com>
* Copyright (C) 2000 Hewlett-Packard Co.
* Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com>
* Copyright (C) 2000 Gerhard Tonn (ton@de.ibm.com)
* Copyright (C) 2000-2002 Andi Kleen, SuSE Labs (x86-64 port)
* Copyright (C) 2000 Silicon Graphics, Inc.
* Copyright (C) 2001 IBM
* Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Copyright (C) 2004 Arnd Bergmann (arnd@arndb.de)
*
* This code is collected from the versions for sparc64, mips64, s390x, ia64,
* ppc64 and x86_64, all of which are based on the original sparc64 version
* by Jakub Jelinek.
*
*/
#include <linux/compat.h>
#include <linux/errno.h>
#include <linux/highuid.h>
#include <linux/init.h>
#include <linux/msg.h>
#include <linux/shm.h>
#include <linux/syscalls.h>
#include <linux/ptrace.h>
#include <linux/mutex.h>
#include <linux/uaccess.h>
#include "util.h"
int get_compat_ipc64_perm(struct ipc64_perm *to,
struct compat_ipc64_perm __user *from)
{
struct compat_ipc64_perm v;
if (copy_from_user(&v, from, sizeof(v)))
return -EFAULT;
to->uid = v.uid;
to->gid = v.gid;
to->mode = v.mode;
return 0;
}
int get_compat_ipc_perm(struct ipc64_perm *to,
struct compat_ipc_perm __user *from)
{
struct compat_ipc_perm v;
if (copy_from_user(&v, from, sizeof(v)))
return -EFAULT;
to->uid = v.uid;
to->gid = v.gid;
to->mode = v.mode;
return 0;
}
void to_compat_ipc64_perm(struct compat_ipc64_perm *to, struct ipc64_perm *from)
{
to->key = from->key;
to->uid = from->uid;
to->gid = from->gid;
to->cuid = from->cuid;
to->cgid = from->cgid;
to->mode = from->mode;
to->seq = from->seq;
}
void to_compat_ipc_perm(struct compat_ipc_perm *to, struct ipc64_perm *from)
{
to->key = from->key;
SET_UID(to->uid, from->uid);
SET_GID(to->gid, from->gid);
SET_UID(to->cuid, from->cuid);
SET_GID(to->cgid, from->cgid);
to->mode = from->mode;
to->seq = from->seq;
}
Computing file changes ...