diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-29 16:32:35 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-29 16:32:35 -0500 |
commit | 33edcf133ba93ecba2e4b6472e97b689895d805c (patch) | |
tree | 327d7a20acef64005e7c5ccbfa1265be28aeb6ac /arch/ia64 | |
parent | be4d638c1597580ed2294d899d9f1a2cd10e462c (diff) | |
parent | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/Kconfig | 2 | ||||
-rw-r--r-- | arch/ia64/hp/sim/Kconfig | 1 | ||||
-rw-r--r-- | arch/ia64/hp/sim/simeth.c | 25 | ||||
-rw-r--r-- | arch/ia64/ia32/sys_ia32.c | 7 | ||||
-rw-r--r-- | arch/ia64/kernel/mca_drv.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 43 | ||||
-rw-r--r-- | arch/ia64/kernel/signal.c | 4 |
7 files changed, 50 insertions, 34 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 6bd91ed7cd03..7fa8f615ba6e 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -99,7 +99,7 @@ config GENERIC_IOMAP | |||
99 | bool | 99 | bool |
100 | default y | 100 | default y |
101 | 101 | ||
102 | config SCHED_NO_NO_OMIT_FRAME_POINTER | 102 | config SCHED_OMIT_FRAME_POINTER |
103 | bool | 103 | bool |
104 | default y | 104 | default y |
105 | 105 | ||
diff --git a/arch/ia64/hp/sim/Kconfig b/arch/ia64/hp/sim/Kconfig index f92306bbedb8..8d513a8c5266 100644 --- a/arch/ia64/hp/sim/Kconfig +++ b/arch/ia64/hp/sim/Kconfig | |||
@@ -4,6 +4,7 @@ menu "HP Simulator drivers" | |||
4 | 4 | ||
5 | config HP_SIMETH | 5 | config HP_SIMETH |
6 | bool "Simulated Ethernet " | 6 | bool "Simulated Ethernet " |
7 | depends on NET | ||
7 | 8 | ||
8 | config HP_SIMSERIAL | 9 | config HP_SIMSERIAL |
9 | bool "Simulated serial driver support" | 10 | bool "Simulated serial driver support" |
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c index 3d47839a0c48..e4d8fde68103 100644 --- a/arch/ia64/hp/sim/simeth.c +++ b/arch/ia64/hp/sim/simeth.c | |||
@@ -167,6 +167,15 @@ netdev_read(int fd, unsigned char *buf, unsigned int len) | |||
167 | return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV); | 167 | return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV); |
168 | } | 168 | } |
169 | 169 | ||
170 | static const struct net_device_ops simeth_netdev_ops = { | ||
171 | .ndo_open = simeth_open, | ||
172 | .ndo_stop = simeth_close, | ||
173 | .ndo_start_xmit = simeth_tx, | ||
174 | .ndo_get_stats = simeth_get_stats, | ||
175 | .ndo_set_multicast_list = set_multicast_list, /* not yet used */ | ||
176 | |||
177 | }; | ||
178 | |||
170 | /* | 179 | /* |
171 | * Function shared with module code, so cannot be in init section | 180 | * Function shared with module code, so cannot be in init section |
172 | * | 181 | * |
@@ -206,14 +215,10 @@ simeth_probe1(void) | |||
206 | 215 | ||
207 | memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr)); | 216 | memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr)); |
208 | 217 | ||
209 | local = dev->priv; | 218 | local = netdev_priv(dev); |
210 | local->simfd = fd; /* keep track of underlying file descriptor */ | 219 | local->simfd = fd; /* keep track of underlying file descriptor */ |
211 | 220 | ||
212 | dev->open = simeth_open; | 221 | dev->netdev_ops = &simeth_netdev_ops; |
213 | dev->stop = simeth_close; | ||
214 | dev->hard_start_xmit = simeth_tx; | ||
215 | dev->get_stats = simeth_get_stats; | ||
216 | dev->set_multicast_list = set_multicast_list; /* no yet used */ | ||
217 | 222 | ||
218 | err = register_netdev(dev); | 223 | err = register_netdev(dev); |
219 | if (err) { | 224 | if (err) { |
@@ -325,7 +330,7 @@ simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr) | |||
325 | * we get DOWN then UP. | 330 | * we get DOWN then UP. |
326 | */ | 331 | */ |
327 | 332 | ||
328 | local = dev->priv; | 333 | local = netdev_priv(dev); |
329 | /* now do it for real */ | 334 | /* now do it for real */ |
330 | r = event == NETDEV_UP ? | 335 | r = event == NETDEV_UP ? |
331 | netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)): | 336 | netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)): |
@@ -380,7 +385,7 @@ frame_print(unsigned char *from, unsigned char *frame, int len) | |||
380 | static int | 385 | static int |
381 | simeth_tx(struct sk_buff *skb, struct net_device *dev) | 386 | simeth_tx(struct sk_buff *skb, struct net_device *dev) |
382 | { | 387 | { |
383 | struct simeth_local *local = dev->priv; | 388 | struct simeth_local *local = netdev_priv(dev); |
384 | 389 | ||
385 | #if 0 | 390 | #if 0 |
386 | /* ensure we have at least ETH_ZLEN bytes (min frame size) */ | 391 | /* ensure we have at least ETH_ZLEN bytes (min frame size) */ |
@@ -443,7 +448,7 @@ simeth_rx(struct net_device *dev) | |||
443 | int len; | 448 | int len; |
444 | int rcv_count = SIMETH_RECV_MAX; | 449 | int rcv_count = SIMETH_RECV_MAX; |
445 | 450 | ||
446 | local = dev->priv; | 451 | local = netdev_priv(dev); |
447 | /* | 452 | /* |
448 | * the loop concept has been borrowed from other drivers | 453 | * the loop concept has been borrowed from other drivers |
449 | * looks to me like it's a throttling thing to avoid pushing to many | 454 | * looks to me like it's a throttling thing to avoid pushing to many |
@@ -507,7 +512,7 @@ simeth_interrupt(int irq, void *dev_id) | |||
507 | static struct net_device_stats * | 512 | static struct net_device_stats * |
508 | simeth_get_stats(struct net_device *dev) | 513 | simeth_get_stats(struct net_device *dev) |
509 | { | 514 | { |
510 | struct simeth_local *local = dev->priv; | 515 | struct simeth_local *local = netdev_priv(dev); |
511 | 516 | ||
512 | return &local->stats; | 517 | return &local->stats; |
513 | } | 518 | } |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 5e92ae00bdbb..16ef61a91d95 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -1767,25 +1767,24 @@ groups16_from_user(struct group_info *group_info, short __user *grouplist) | |||
1767 | asmlinkage long | 1767 | asmlinkage long |
1768 | sys32_getgroups16 (int gidsetsize, short __user *grouplist) | 1768 | sys32_getgroups16 (int gidsetsize, short __user *grouplist) |
1769 | { | 1769 | { |
1770 | const struct cred *cred = current_cred(); | ||
1770 | int i; | 1771 | int i; |
1771 | 1772 | ||
1772 | if (gidsetsize < 0) | 1773 | if (gidsetsize < 0) |
1773 | return -EINVAL; | 1774 | return -EINVAL; |
1774 | 1775 | ||
1775 | get_group_info(current->group_info); | 1776 | i = cred->group_info->ngroups; |
1776 | i = current->group_info->ngroups; | ||
1777 | if (gidsetsize) { | 1777 | if (gidsetsize) { |
1778 | if (i > gidsetsize) { | 1778 | if (i > gidsetsize) { |
1779 | i = -EINVAL; | 1779 | i = -EINVAL; |
1780 | goto out; | 1780 | goto out; |
1781 | } | 1781 | } |
1782 | if (groups16_to_user(grouplist, current->group_info)) { | 1782 | if (groups16_to_user(grouplist, cred->group_info)) { |
1783 | i = -EFAULT; | 1783 | i = -EFAULT; |
1784 | goto out; | 1784 | goto out; |
1785 | } | 1785 | } |
1786 | } | 1786 | } |
1787 | out: | 1787 | out: |
1788 | put_group_info(current->group_info); | ||
1789 | return i; | 1788 | return i; |
1790 | } | 1789 | } |
1791 | 1790 | ||
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index fab1d21a4f2c..f94aaa86933f 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -158,7 +158,7 @@ mca_handler_bh(unsigned long paddr, void *iip, unsigned long ipsr) | |||
158 | ia64_mlogbuf_dump(); | 158 | ia64_mlogbuf_dump(); |
159 | printk(KERN_ERR "OS_MCA: process [cpu %d, pid: %d, uid: %d, " | 159 | printk(KERN_ERR "OS_MCA: process [cpu %d, pid: %d, uid: %d, " |
160 | "iip: %p, psr: 0x%lx,paddr: 0x%lx](%s) encounters MCA.\n", | 160 | "iip: %p, psr: 0x%lx,paddr: 0x%lx](%s) encounters MCA.\n", |
161 | raw_smp_processor_id(), current->pid, current->uid, | 161 | raw_smp_processor_id(), current->pid, current_uid(), |
162 | iip, ipsr, paddr, current->comm); | 162 | iip, ipsr, paddr, current->comm); |
163 | 163 | ||
164 | spin_lock(&mca_bh_lock); | 164 | spin_lock(&mca_bh_lock); |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 6543a5547c84..0e499757309b 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2220,8 +2220,8 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2220 | DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode)); | 2220 | DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode)); |
2221 | 2221 | ||
2222 | inode->i_mode = S_IFCHR|S_IRUGO; | 2222 | inode->i_mode = S_IFCHR|S_IRUGO; |
2223 | inode->i_uid = current->fsuid; | 2223 | inode->i_uid = current_fsuid(); |
2224 | inode->i_gid = current->fsgid; | 2224 | inode->i_gid = current_fsgid(); |
2225 | 2225 | ||
2226 | sprintf(name, "[%lu]", inode->i_ino); | 2226 | sprintf(name, "[%lu]", inode->i_ino); |
2227 | this.name = name; | 2227 | this.name = name; |
@@ -2399,22 +2399,33 @@ error_kmem: | |||
2399 | static int | 2399 | static int |
2400 | pfm_bad_permissions(struct task_struct *task) | 2400 | pfm_bad_permissions(struct task_struct *task) |
2401 | { | 2401 | { |
2402 | const struct cred *tcred; | ||
2403 | uid_t uid = current_uid(); | ||
2404 | gid_t gid = current_gid(); | ||
2405 | int ret; | ||
2406 | |||
2407 | rcu_read_lock(); | ||
2408 | tcred = __task_cred(task); | ||
2409 | |||
2402 | /* inspired by ptrace_attach() */ | 2410 | /* inspired by ptrace_attach() */ |
2403 | DPRINT(("cur: uid=%d gid=%d task: euid=%d suid=%d uid=%d egid=%d sgid=%d\n", | 2411 | DPRINT(("cur: uid=%d gid=%d task: euid=%d suid=%d uid=%d egid=%d sgid=%d\n", |
2404 | current->uid, | 2412 | uid, |
2405 | current->gid, | 2413 | gid, |
2406 | task->euid, | 2414 | tcred->euid, |
2407 | task->suid, | 2415 | tcred->suid, |
2408 | task->uid, | 2416 | tcred->uid, |
2409 | task->egid, | 2417 | tcred->egid, |
2410 | task->sgid)); | 2418 | tcred->sgid)); |
2411 | 2419 | ||
2412 | return ((current->uid != task->euid) | 2420 | ret = ((uid != tcred->euid) |
2413 | || (current->uid != task->suid) | 2421 | || (uid != tcred->suid) |
2414 | || (current->uid != task->uid) | 2422 | || (uid != tcred->uid) |
2415 | || (current->gid != task->egid) | 2423 | || (gid != tcred->egid) |
2416 | || (current->gid != task->sgid) | 2424 | || (gid != tcred->sgid) |
2417 | || (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE); | 2425 | || (gid != tcred->gid)) && !capable(CAP_SYS_PTRACE); |
2426 | |||
2427 | rcu_read_unlock(); | ||
2428 | return ret; | ||
2418 | } | 2429 | } |
2419 | 2430 | ||
2420 | static int | 2431 | static int |
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index e12500a9c443..e1821ca4c7df 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c | |||
@@ -229,7 +229,7 @@ ia64_rt_sigreturn (struct sigscratch *scr) | |||
229 | si.si_errno = 0; | 229 | si.si_errno = 0; |
230 | si.si_code = SI_KERNEL; | 230 | si.si_code = SI_KERNEL; |
231 | si.si_pid = task_pid_vnr(current); | 231 | si.si_pid = task_pid_vnr(current); |
232 | si.si_uid = current->uid; | 232 | si.si_uid = current_uid(); |
233 | si.si_addr = sc; | 233 | si.si_addr = sc; |
234 | force_sig_info(SIGSEGV, &si, current); | 234 | force_sig_info(SIGSEGV, &si, current); |
235 | return retval; | 235 | return retval; |
@@ -326,7 +326,7 @@ force_sigsegv_info (int sig, void __user *addr) | |||
326 | si.si_errno = 0; | 326 | si.si_errno = 0; |
327 | si.si_code = SI_KERNEL; | 327 | si.si_code = SI_KERNEL; |
328 | si.si_pid = task_pid_vnr(current); | 328 | si.si_pid = task_pid_vnr(current); |
329 | si.si_uid = current->uid; | 329 | si.si_uid = current_uid(); |
330 | si.si_addr = addr; | 330 | si.si_addr = addr; |
331 | force_sig_info(SIGSEGV, &si, current); | 331 | force_sig_info(SIGSEGV, &si, current); |
332 | return 0; | 332 | return 0; |