Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69c0067a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull misc fixes from Al Viro:
 "Loose ends and regressions from the last merge window.

  Strictly speaking, only binfmt_flat thing is a build regression per
  se - the rest is 'only sparse cares about that' stuff"

[ This came in before the 4.13 release and could have gone there, but it
  was late in the release and nothing seemed critical enough to care, so
  I'm pulling it in the 4.14 merge window instead  - Linus ]

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  binfmt_flat: fix arch/m32r and arch/microblaze flat_put_addr_at_rp()
  compat_hdio_ioctl: Fix a declaration
  <linux/uaccess.h>: Fix copy_in_user() declaration
  annotate RWF_... flags
  teach SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE to handle __bitwise arguments
parents 569dbb88 b38e51cd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ static inline unsigned long m32r_flat_get_addr_from_rp (u32 *rp,
	return ~0;      /* bogus value */
}

static inline void flat_put_addr_at_rp(u32 *rp, u32 addr, u32 relval)
static inline int flat_put_addr_at_rp(u32 *rp, u32 addr, u32 relval)
{
        unsigned int reloc = flat_m32r_get_reloc_type (relval);
	if (reloc & 0xf0) {
@@ -133,6 +133,7 @@ static inline void flat_put_addr_at_rp(u32 *rp, u32 addr, u32 relval)
			break;
		}
	}
	return 0;
}

// kludge - text_len is a local variable in the only user.
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
 * unaligned.
 */

static inline void
static inline int
flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 relval)
{
	u32 *p = (__force u32 *)rp;
+3 −2
Original line number Diff line number Diff line
@@ -8,11 +8,12 @@
#include <linux/sched/task_stack.h>
#include <linux/thread_info.h>

#define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p(typeof(0?(t)0:0ULL), u64))
#define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p( \
				typeof(0?(__force t)0:0ULL), u64))

#define __SC_DELOUSE(t,v) ({ \
	BUILD_BUG_ON(sizeof(t) > 4 && !__TYPE_IS_PTR(t)); \
	(t)(__TYPE_IS_PTR(t) ? ((v) & 0x7fffffff) : (v)); \
	(__force t)(__TYPE_IS_PTR(t) ? ((v) & 0x7fffffff) : (v)); \
})

#define PSW32_MASK_PER		0x40000000UL
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ static int compat_hdio_getgeo(struct gendisk *disk, struct block_device *bdev,
static int compat_hdio_ioctl(struct block_device *bdev, fmode_t mode,
		unsigned int cmd, unsigned long arg)
{
	unsigned long *__user p;
	unsigned long __user *p;
	int error;

	p = compat_alloc_user_space(sizeof(unsigned long));
+1 −1
Original line number Diff line number Diff line
@@ -969,7 +969,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
	int			use_wgather;
	loff_t			pos = offset;
	unsigned int		pflags = current->flags;
	int			flags = 0;
	rwf_t			flags = 0;

	if (test_bit(RQ_LOCAL, &rqstp->rq_flags))
		/*
Loading