Revision 9b4fe5fb0bdd8f31f24cbfe77e38ec8155c250c5 authored by Neil Horman on 12 July 2013, 17:35:33 UTC, committed by David S. Miller on 12 July 2013, 23:28:02 UTC
this bug: https://bugzilla.redhat.com/show_bug.cgi?id=951695 Reported a dma debug backtrace: WARNING: at lib/dma-debug.c:937 check_unmap+0x47d/0x930() Hardware name: To Be Filled By O.E.M. via-rhine 0000:00:12.0: DMA-API: device driver failed to check map error[device address=0x0000000075a837b2] [size=90 bytes] [mapped as single] Modules linked in: ip6_tables gspca_spca561 gspca_main videodev media snd_hda_codec_realtek snd_hda_intel i2c_viapro snd_hda_codec snd_hwdep snd_seq ppdev mperf via_rhine coretemp snd_pcm mii microcode snd_page_alloc snd_timer snd_mpu401 snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore parport_pc parport shpchp ata_generic pata_acpi radeon i2c_algo_bit drm_kms_helper ttm drm pata_via sata_via i2c_core uinput Pid: 295, comm: systemd-journal Not tainted 3.9.0-0.rc6.git2.1.fc20.x86_64 #1 Call Trace: <IRQ> [<ffffffff81068dd0>] warn_slowpath_common+0x70/0xa0 [<ffffffff81068e4c>] warn_slowpath_fmt+0x4c/0x50 [<ffffffff8137ec6d>] check_unmap+0x47d/0x930 [<ffffffff810ace9f>] ? local_clock+0x5f/0x70 [<ffffffff8137f17f>] debug_dma_unmap_page+0x5f/0x70 [<ffffffffa0225edc>] ? rhine_ack_events.isra.14+0x3c/0x50 [via_rhine] [<ffffffffa02275f8>] rhine_napipoll+0x1d8/0xd80 [via_rhine] [<ffffffff815d3d51>] ? net_rx_action+0xa1/0x380 [<ffffffff815d3e22>] net_rx_action+0x172/0x380 [<ffffffff8107345f>] __do_softirq+0xff/0x400 [<ffffffff81073925>] irq_exit+0xb5/0xc0 [<ffffffff81724cd6>] do_IRQ+0x56/0xc0 [<ffffffff81719ff2>] common_interrupt+0x72/0x72 <EOI> [<ffffffff8170ff57>] ? __slab_alloc+0x4c2/0x526 [<ffffffff811992e0>] ? mmap_region+0x2b0/0x5a0 [<ffffffff810d5807>] ? __lock_is_held+0x57/0x80 [<ffffffff811992e0>] ? mmap_region+0x2b0/0x5a0 [<ffffffff811bf1bf>] kmem_cache_alloc+0x2df/0x360 [<ffffffff811992e0>] mmap_region+0x2b0/0x5a0 [<ffffffff811998e6>] do_mmap_pgoff+0x316/0x3d0 [<ffffffff81183ca0>] vm_mmap_pgoff+0x90/0xc0 [<ffffffff81197d6c>] sys_mmap_pgoff+0x4c/0x190 [<ffffffff81367d7e>] ? trace_hardirqs_on_thunk+0x3a/0x3f [<ffffffff8101eb42>] sys_mmap+0x22/0x30 [<ffffffff81722fd9>] system_call_fastpath+0x16/0x1b Usual problem with the usual fix, add the appropriate calls to dma_mapping_error where appropriate Untested, as I don't have hardware, but its pretty straightforward Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: David S. Miller <davem@davemloft.net> CC: Roger Luethi <rl@hellgate.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 352900b
SAK.txt
Linux 2.4.2 Secure Attention Key (SAK) handling
18 March 2001, Andrew Morton
An operating system's Secure Attention Key is a security tool which is
provided as protection against trojan password capturing programs. It
is an undefeatable way of killing all programs which could be
masquerading as login applications. Users need to be taught to enter
this key sequence before they log in to the system.
From the PC keyboard, Linux has two similar but different ways of
providing SAK. One is the ALT-SYSRQ-K sequence. You shouldn't use
this sequence. It is only available if the kernel was compiled with
sysrq support.
The proper way of generating a SAK is to define the key sequence using
`loadkeys'. This will work whether or not sysrq support is compiled
into the kernel.
SAK works correctly when the keyboard is in raw mode. This means that
once defined, SAK will kill a running X server. If the system is in
run level 5, the X server will restart. This is what you want to
happen.
What key sequence should you use? Well, CTRL-ALT-DEL is used to reboot
the machine. CTRL-ALT-BACKSPACE is magical to the X server. We'll
choose CTRL-ALT-PAUSE.
In your rc.sysinit (or rc.local) file, add the command
echo "control alt keycode 101 = SAK" | /bin/loadkeys
And that's it! Only the superuser may reprogram the SAK key.
NOTES
=====
1: Linux SAK is said to be not a "true SAK" as is required by
systems which implement C2 level security. This author does not
know why.
2: On the PC keyboard, SAK kills all applications which have
/dev/console opened.
Unfortunately this includes a number of things which you don't
actually want killed. This is because these applications are
incorrectly holding /dev/console open. Be sure to complain to your
Linux distributor about this!
You can identify processes which will be killed by SAK with the
command
# ls -l /proc/[0-9]*/fd/* | grep console
l-wx------ 1 root root 64 Mar 18 00:46 /proc/579/fd/0 -> /dev/console
Then:
# ps aux|grep 579
root 579 0.0 0.1 1088 436 ? S 00:43 0:00 gpm -t ps/2
So `gpm' will be killed by SAK. This is a bug in gpm. It should
be closing standard input. You can work around this by finding the
initscript which launches gpm and changing it thusly:
Old:
daemon gpm
New:
daemon gpm < /dev/null
Vixie cron also seems to have this problem, and needs the same treatment.
Also, one prominent Linux distribution has the following three
lines in its rc.sysinit and rc scripts:
exec 3<&0
exec 4>&1
exec 5>&2
These commands cause *all* daemons which are launched by the
initscripts to have file descriptors 3, 4 and 5 attached to
/dev/console. So SAK kills them all. A workaround is to simply
delete these lines, but this may cause system management
applications to malfunction - test everything well.
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...