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

Commit 555e5986 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull parisc updates from Helge Deller:
 "Changes include:
   - wire up the bpf syscall
   - remove CONFIG_64BIT usage from some userspace-exported header files
   - use compat functions for msgctl, shmat, shmctl and semtimedop
     syscalls"

* 'parisc-3.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Avoid using CONFIG_64BIT in userspace exported headers
  parisc: Use compat layer for msgctl, shmat, shmctl and semtimedop syscalls
  parisc: Use BUILD_BUG() instead of undefined functions
  parisc: Wire up bpf syscall
parents ec7de656 d8f5457a
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
#include <asm/errno.h>
#include <asm-generic/uaccess-unaligned.h>

#include <linux/bug.h>

#define VERIFY_READ 0
#define VERIFY_WRITE 1

@@ -28,11 +30,6 @@
 * that put_user is the same as __put_user, etc.
 */

extern int __get_kernel_bad(void);
extern int __get_user_bad(void);
extern int __put_kernel_bad(void);
extern int __put_user_bad(void);

static inline long access_ok(int type, const void __user * addr,
		unsigned long size)
{
@@ -43,8 +40,8 @@ static inline long access_ok(int type, const void __user * addr,
#define get_user __get_user

#if !defined(CONFIG_64BIT)
#define LDD_KERNEL(ptr)		__get_kernel_bad();
#define LDD_USER(ptr)		__get_user_bad();
#define LDD_KERNEL(ptr)		BUILD_BUG()
#define LDD_USER(ptr)		BUILD_BUG()
#define STD_KERNEL(x, ptr)	__put_kernel_asm64(x,ptr)
#define STD_USER(x, ptr)	__put_user_asm64(x,ptr)
#define ASM_WORD_INSN		".word\t"
@@ -94,7 +91,7 @@ struct exception_data {
	    case 2: __get_kernel_asm("ldh",ptr); break; \
	    case 4: __get_kernel_asm("ldw",ptr); break; \
	    case 8: LDD_KERNEL(ptr); break;		\
	    default: __get_kernel_bad(); break;         \
	    default: BUILD_BUG(); break;		\
	    }                                           \
	}                                               \
	else {                                          \
@@ -103,7 +100,7 @@ struct exception_data {
	    case 2: __get_user_asm("ldh",ptr); break;   \
	    case 4: __get_user_asm("ldw",ptr); break;   \
	    case 8: LDD_USER(ptr);  break;		\
	    default: __get_user_bad(); break;           \
	    default: BUILD_BUG(); break;		\
	    }                                           \
	}                                               \
							\
@@ -136,7 +133,7 @@ struct exception_data {
	    case 2: __put_kernel_asm("sth",__x,ptr); break;     \
	    case 4: __put_kernel_asm("stw",__x,ptr); break;     \
	    case 8: STD_KERNEL(__x,ptr); break;			\
	    default: __put_kernel_bad(); break;			\
	    default: BUILD_BUG(); break;			\
	    }                                                   \
	}                                                       \
	else {                                                  \
@@ -145,7 +142,7 @@ struct exception_data {
	    case 2: __put_user_asm("sth",__x,ptr); break;       \
	    case 4: __put_user_asm("stw",__x,ptr); break;       \
	    case 8: STD_USER(__x,ptr); break;			\
	    default: __put_user_bad(); break;			\
	    default: BUILD_BUG(); break;			\
	    }                                                   \
	}                                                       \
								\
+1 −7
Original line number Diff line number Diff line
#ifndef __ASM_PARISC_BITSPERLONG_H
#define __ASM_PARISC_BITSPERLONG_H

/*
 * using CONFIG_* outside of __KERNEL__ is wrong,
 * __LP64__ was also removed from headers, so what
 * is the right approach on parisc?
 *	-arnd
 */
#if (defined(__KERNEL__) && defined(CONFIG_64BIT)) || defined (__LP64__)
#if defined(__LP64__)
#define __BITS_PER_LONG 64
#define SHIFT_PER_LONG 6
#else
+5 −3
Original line number Diff line number Diff line
#ifndef _PARISC_MSGBUF_H
#define _PARISC_MSGBUF_H

#include <asm/bitsperlong.h>

/* 
 * The msqid64_ds structure for parisc architecture, copied from sparc.
 * Note extra padding because this structure is passed back and forth
@@ -13,15 +15,15 @@

struct msqid64_ds {
	struct ipc64_perm msg_perm;
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int   __pad1;
#endif
	__kernel_time_t msg_stime;	/* last msgsnd time */
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int   __pad2;
#endif
	__kernel_time_t msg_rtime;	/* last msgrcv time */
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int   __pad3;
#endif
	__kernel_time_t msg_ctime;	/* last change time */
+4 −2
Original line number Diff line number Diff line
#ifndef _PARISC_SEMBUF_H
#define _PARISC_SEMBUF_H

#include <asm/bitsperlong.h>

/* 
 * The semid64_ds structure for parisc architecture.
 * Note extra padding because this structure is passed back and forth
@@ -13,11 +15,11 @@

struct semid64_ds {
	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int	__pad1;
#endif
	__kernel_time_t	sem_otime;		/* last semop time */
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int	__pad2;
#endif
	__kernel_time_t	sem_ctime;		/* last change time */
+15 −20
Original line number Diff line number Diff line
#ifndef _PARISC_SHMBUF_H
#define _PARISC_SHMBUF_H

#include <asm/bitsperlong.h>

/* 
 * The shmid64_ds structure for parisc architecture.
 * Note extra padding because this structure is passed back and forth
@@ -13,19 +15,19 @@

struct shmid64_ds {
	struct ipc64_perm	shm_perm;	/* operation perms */
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int		__pad1;
#endif
	__kernel_time_t		shm_atime;	/* last attach time */
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int		__pad2;
#endif
	__kernel_time_t		shm_dtime;	/* last detach time */
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int		__pad3;
#endif
	__kernel_time_t		shm_ctime;	/* last change time */
#ifndef CONFIG_64BIT
#if __BITS_PER_LONG != 64
	unsigned int		__pad4;
#endif
	size_t			shm_segsz;	/* size of segment (bytes) */
@@ -36,23 +38,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 */
Loading