lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 7 Dec 2015 15:22:06 -0800
From:	Andy Lutomirski <luto@...capital.net>
To:	X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Dmitry V. Levin" <ldv@...linux.org>,
	lvira Khabirova <lineprinter0@...il.com>
Subject: Re: [PATCH] x86/signal: fix restart_syscall number for x32 tasks

[not real reply because I'm using a bad internet connection right now
and I'm not set up with my usual Gmane reply hack right now]

The new code is (whitespace-damaged):

static inline unsigned long get_nr_restart_syscall(const struct pt_regs *regs)
{
#if defined(CONFIG_X86_32) || !defined(CONFIG_X86_64)
 return __NR_restart_syscall;
#else /* !CONFIG_X86_32 && CONFIG_X86_64 */
 return test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall :
 __NR_restart_syscall | (regs->orig_ax & __X32_SYSCALL_BIT);
#endif /* CONFIG_X86_32 || !CONFIG_X86_64 */
}

This is IMO awful.  This use of TIF_IA32 is wrong, and this is
otherwise gross.  Can we do it for real:

if (is_ia32_task())
  return __NR_ia32_restart_syscall;
else
  return __NR_restart_syscall | (regs->orig_ax & __X32_SYSCALL_BIT);
/* preserve x32 bit */

I'd send the patch myself, but you apparently have a good test case
for this, and I don't.

(this isn't a regression, and I'm not suggesting any change for 4.4 or
for stable.  But for 4.5, can we do it right, please?)

And yes, I'll send a patch to rename is_ia32_task, but that's orthogonal.

--Andy

P.S. I'm still hoping to kill TIF_IA32 entirely some time soon.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ