Revision d6bd8194e2867e85ac2de63486d3b83ccfae4e62 authored by Michael Ellerman on 26 June 2017, 01:30:57 UTC, committed by Michael Ellerman on 26 June 2017, 13:25:08 UTC
Larry Finger reported that his Powerbook G4 was no longer booting with v4.12-rc,
userspace was up but giving weird errors such as:

  udevd[64]: starting version 175
  udevd[64]: Unable to receive ctrl message: Bad address.
  modprobe: chdir(4.12-rc1): No such file or directory

He bisected the problem to commit 3448890c32c3 ("powerpc: get rid of zeroing,
switch to RAW_COPY_USER").

Al identified that the problem is actually a miscompilation by GCC 4.6.3, which
is exposed by the above commit.

Al also pointed out that inlining copy_to/from_user() is probably of little or
no benefit, which is correct. Using Anton's copy_to_user benchmark, with a
pathological single byte copy, we see a small increase in performance
by *removing* inlining:

  Before (inlined):
  # time ./copy_to_user -w -l 1 -i 10000000	( x 3 )
  real	0m22.063s
  real	0m22.059s
  real	0m22.076s

  After:
  # time ./copy_to_user -w -l 1 -i 10000000	( x 3 )
  real	0m21.325s
  real	0m21.299s
  real	0m21.364s

So as a small performance improvement and to avoid the miscompilation, drop
inlining copy_to/from_user() on 32-bit.

Fixes: 3448890c32c3 ("powerpc: get rid of zeroing, switch to RAW_COPY_USER")
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 797625d
History
File Mode Size
partitions
Kconfig -rw-r--r-- 6.1 KB
Kconfig.iosched -rw-r--r-- 2.7 KB
Makefile -rw-r--r-- 1.4 KB
badblocks.c -rw-r--r-- 14.5 KB
bfq-cgroup.c -rw-r--r-- 30.2 KB
bfq-iosched.c -rw-r--r-- 162.0 KB
bfq-iosched.h -rw-r--r-- 30.7 KB
bfq-wf2q.c -rw-r--r-- 48.9 KB
bio-integrity.c -rw-r--r-- 14.3 KB
bio.c -rw-r--r-- 50.5 KB
blk-cgroup.c -rw-r--r-- 37.6 KB
blk-core.c -rw-r--r-- 91.9 KB
blk-exec.c -rw-r--r-- 2.9 KB
blk-flush.c -rw-r--r-- 16.5 KB
blk-integrity.c -rw-r--r-- 12.1 KB
blk-ioc.c -rw-r--r-- 10.9 KB
blk-lib.c -rw-r--r-- 9.4 KB
blk-map.c -rw-r--r-- 5.9 KB
blk-merge.c -rw-r--r-- 20.0 KB
blk-mq-cpumap.c -rw-r--r-- 2.3 KB
blk-mq-debugfs.c -rw-r--r-- 20.9 KB
blk-mq-debugfs.h -rw-r--r-- 2.1 KB
blk-mq-pci.c -rw-r--r-- 1.5 KB
blk-mq-sched.c -rw-r--r-- 13.9 KB
blk-mq-sched.h -rw-r--r-- 3.7 KB
blk-mq-sysfs.c -rw-r--r-- 8.2 KB
blk-mq-tag.c -rw-r--r-- 11.1 KB
blk-mq-tag.h -rw-r--r-- 2.3 KB
blk-mq-virtio.c -rw-r--r-- 1.7 KB
blk-mq.c -rw-r--r-- 70.4 KB
blk-mq.h -rw-r--r-- 4.4 KB
blk-settings.c -rw-r--r-- 28.8 KB
blk-softirq.c -rw-r--r-- 4.3 KB
blk-stat.c -rw-r--r-- 5.5 KB
blk-stat.h -rw-r--r-- 5.5 KB
blk-sysfs.c -rw-r--r-- 23.1 KB
blk-tag.c -rw-r--r-- 10.0 KB
blk-throttle.c -rw-r--r-- 65.2 KB
blk-timeout.c -rw-r--r-- 5.9 KB
blk-wbt.c -rw-r--r-- 17.6 KB
blk-wbt.h -rw-r--r-- 4.0 KB
blk-zoned.c -rw-r--r-- 7.6 KB
blk.h -rw-r--r-- 10.2 KB
bounce.c -rw-r--r-- 5.8 KB
bsg-lib.c -rw-r--r-- 6.7 KB
bsg.c -rw-r--r-- 22.9 KB
cfq-iosched.c -rw-r--r-- 127.0 KB
cmdline-parser.c -rw-r--r-- 4.9 KB
compat_ioctl.c -rw-r--r-- 20.7 KB
deadline-iosched.c -rw-r--r-- 11.2 KB
elevator.c -rw-r--r-- 26.6 KB
genhd.c -rw-r--r-- 45.6 KB
ioctl.c -rw-r--r-- 15.0 KB
ioprio.c -rw-r--r-- 5.0 KB
kyber-iosched.c -rw-r--r-- 21.0 KB
mq-deadline.c -rw-r--r-- 16.8 KB
noop-iosched.c -rw-r--r-- 2.6 KB
opal_proto.h -rw-r--r-- 9.3 KB
partition-generic.c -rw-r--r-- 16.3 KB
scsi_ioctl.c -rw-r--r-- 19.8 KB
sed-opal.c -rw-r--r-- 57.7 KB
t10-pi.c -rw-r--r-- 4.9 KB

back to top