kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #183720
[Bug 1572624] Re: Backport patch to abort syscalls in active transactions
------- Comment From shgwei@xxxxxxxxxx 2016-06-12 23:14 EDT-------
(In reply to comment #13)
> Default Comment by Bridge
>
> This patch does not work for a 3.13 kernel.
>
> ubuntu-trusty/arch/powerpc/include/asm/tm.h: Assembler messages:
> ubuntu-trusty/arch/powerpc/include/asm/tm.h:11: Error: unrecognized opcode:
> `extern'
(In reply to comment #14)
> Tim,
>
> I suspect you're using the first version of the patch.
> The last version is available in comment #2 and is called
> 0001-powerpc-tm-backport-b4b56f-to-Abort-syscalls-in-acti.patch
>
> > This patch does not work for a 3.13 kernel.
> >
> > ubuntu-trusty/arch/powerpc/include/asm/tm.h: Assembler messages:
> > ubuntu-trusty/arch/powerpc/include/asm/tm.h:11: Error: unrecognized opcode:
> > `extern'
>
> It seems that CONFIG_PPC_TRANSACTIONAL_MEM started to be defined.
> Could you provide more context on this error message, please?
>
> Wei, any suggestions how to proceed with this?
The error was fixed by following line(commit e4e38121):
#include <uapi/asm/tm.h>
+#ifndef __ASSEMBLY__
+
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
extern void do_load_up_transact_fpu(struct thread_struct *thread);
Since the tm.h can be included by an assembly and GAS will fail to parse
the C specific identifier like "extern".
I doubt why we need to compile against 3.13 since Ubuntu14.04.3 is
already with kernel 3.19 ( and 3.19 includes e4e38121).
I guess we are OK now per comment 15# (compile against 3.19). But please
let me know if I have some misunderstanding.
** Tags added: bugnameltc-137710 severity-medium verification-done-vivid
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1572624
Title:
Backport patch to abort syscalls in active transactions
Status in linux package in Ubuntu:
Fix Released
Status in linux source package in Trusty:
In Progress
Status in linux source package in Vivid:
Fix Released
Status in linux source package in Wily:
Fix Released
Status in linux source package in Xenial:
Fix Released
Status in linux source package in Yakkety:
Fix Released
Bug description:
== Comment: #0 - Tulio Magno Quites Machado Filho - 2016-02-23 12:47:09 ==
---Problem Description---
This is happening on Ubuntu 14.04.3.
User is creating stack structure using C++ transactional memory extension:
int Pop(int)
{
int ret = 0;
__transaction_atomic
{
if(!stack_.empty())
{
ret = stack_.top();
stack_.pop();
} else
ret = -1;
}
return ret;
}
While evaluating if(!stack_.empty()), this code calls a libitm function (GCC code), which calls malloc (glibc code) which ends up calling futex (a syscall).
A syscall inside a transaction is forbidden by the kernel, but there is nothing the user can do to avoid this syscall.
This will hang the user application inside the malloc(), which would
be waiting for the futex to return.
Ubuntu 14.04 provides glibc 2.19, which is too old to know about HTM.
And this is probably happening with other libraries as well.
Backporting commit b4b56f9e would solve this issue.
---uname output---
Linux 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 16:06:09 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
---Steps to Reproduce---
Start a transaction, make a syscall.
== Comment: #1 - Wei Guo - 2016-02-24 02:33:03 ==
I already verfied that kernel with patch b4b56f9e (on Ubuntu14.04) will work.
== Comment: #2 - Wei Guo - 2016-02-26 04:20:37 ==
Backport patch for commit b4b56f9e is attached. The patch is based on tag Ubuntu-lts-3.19.0-25.26_14.04.1.
Tested based on Ubuntu 14.04.4 LTS ( 3.19.0-25-generic).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1572624/+subscriptions