Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964959AbcDYUiX (ORCPT ); Mon, 25 Apr 2016 16:38:23 -0400 Received: from mail-ob0-f171.google.com ([209.85.214.171]:33541 "EHLO mail-ob0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933455AbcDYUiV (ORCPT ); Mon, 25 Apr 2016 16:38:21 -0400 MIME-Version: 1.0 In-Reply-To: References: <1461600763-3534-1-git-send-email-dsafonov@virtuozzo.com> From: Andy Lutomirski Date: Mon, 25 Apr 2016 13:38:00 -0700 Message-ID: Subject: Re: [RFC 1/3] x86/signal: add SA_{X32,IA32}_ABI sa_flags To: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Dmitry Safonov , "linux-kernel@vger.kernel.org" , Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , X86 ML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1285 Lines: 28 On Mon, Apr 25, 2016 at 1:34 PM, Dmitry Safonov <0x7f454c46@gmail.com> wrote: > 2016-04-25 22:20 GMT+03:00 Andy Lutomirski : >> On Mon, Apr 25, 2016 at 9:12 AM, Dmitry Safonov wrote: >>> Introduce new flags that defines which ABI to use on creating sigframe. >>> Those flags one may set from the userspace, or kernel will set them >>> according to syscall, which sets handler for a signal. >>> So that will drop the dependency on TIF_IA32/TIF_X32 flags on syscall deliver. >>> Those flags will be used only under CONFIG_COMPAT. >>> >>> The same way ARM uses sa_flags to differ in which mode deliver signal >>> for 26-bit applications (look at SA_THIRYTWO). >> >> Hmm. Do we want to make these user-visible at all, or should it be >> purely an in-kernel thing? > > Yes, I'll rework it to not expose to userspace. > I thought about it as a bonus when did it, but yeah, it's better > not reveal a new interfaces until they really needed. > But anyway, I did it for RFC, and I don't know what's better > for hidden flag: reuse sa_flags or invent in ksig a new hidden > member only for the kernel? Either is fine with me. If you hide it in sa_flags, make sure to mask it off in the syscalls. -- Andy Lutomirski AMA Capital Management, LLC