Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2548619pxu; Sat, 28 Nov 2020 18:56:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrK0i2QY+C/zwPzoaaV9pwMoOj9qcjyovWY4YmTQZ2hXfipXm1xA0wNw3gXtQsqiweDeDq X-Received: by 2002:a17:906:7a57:: with SMTP id i23mr15250241ejo.74.1606618571264; Sat, 28 Nov 2020 18:56:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606618571; cv=none; d=google.com; s=arc-20160816; b=Y9IXTgI7L2HIlwahOiYWE+0npEzx2pJ0+HosU+TNCYbUlBA8t5znkGRumNMGcrsQ74 eej95YKxdy9o8FBjL3wOJntuRYL+3p5zkMZpWqaSEsJZWQAz7BoVjlE7Bb2NDQ6McmTJ AiPWKPsqnk+F17Qo9ljQppWv1T+9nM7CbbRh1+wIK+GZEaAAosNP2fEM9cDZ35mmA5PG y59mbePgK2h4YAapa71MsjstlDs0mBKG+Nwb9hp8A/Z7IXvwD+dx+LoqV9GEutPES90m y7ktIYOvkYgbUbEQdswW6IgJ6g9N5QOLruKY4HzJgNb3x+mIRRXt63L3DR2UcFD8QiY+ PhOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Z0lqPkiUKcw4hoWEb756wuRPxVLj2QZ6yrKh9T2kOgI=; b=QVvIHb8Ljyqq+udU8xbLlxDriZgnstJXl22rEJw77pE1rYXWhVZVWOhKZNamS6E1HT irmplJGSgPc2f1hIVJqXM1mezr22aa+iHTjI/zZhFtkMVApLwiCZU0YArttXJvnHTE+C CkOFmWcV3XnXjsY3oN1ZOT6E6tb8ZXZkJ4v++cAETUbSgDuoc54Otx0cPxg4Om3SksGG czddmXZKdWIh0nElCtKlzDpnjrxW+d7MzLy/86qk6MhT83IhoB96D6eINeHg/dzgW6t6 /uHzfC7P6FhCz5YdaNzr1HqUfbnpLogxo4eyHSbkav6D83SAGCMJqssFIqFz4KGYUmLg xlyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@drummond.us header.s=google header.b="X/bkx06Y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=drummond.us Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si5686536eds.509.2020.11.28.18.55.48; Sat, 28 Nov 2020 18:56:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@drummond.us header.s=google header.b="X/bkx06Y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=drummond.us Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726186AbgK2Cxu (ORCPT + 99 others); Sat, 28 Nov 2020 21:53:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725294AbgK2Cxu (ORCPT ); Sat, 28 Nov 2020 21:53:50 -0500 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07E16C0613D1 for ; Sat, 28 Nov 2020 18:53:09 -0800 (PST) Received: by mail-lj1-x244.google.com with SMTP id f18so11152938ljg.9 for ; Sat, 28 Nov 2020 18:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=drummond.us; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Z0lqPkiUKcw4hoWEb756wuRPxVLj2QZ6yrKh9T2kOgI=; b=X/bkx06YJ3v398ihXZjgVhDZnmGs9qoPF2jx2MPLzwQS8kEfGrj9Pu48mEj2DNtE0V 79bFSnZfzr19HDT/cMKNMesFey32MGn59mJdbEjJwqsTUKIntj2CBjgCADfKrgZbl6tM hplxd3adosuecyMlyhisyZ4oOsiXMB0dHjZuw4r8kQ5c1Ar+60d8htYEGw25qu++xZI0 obKvB53JK6XggA0taW3TS3zoSjP2gg32Yk5joNJDGml/619etKHB9m1Zcfyo0Jy4uOF+ Xn3zbWxid1ICt2tdlq1a2fCAor5m1RJ0NZ/BXwfFc09RgetnxiHiQpXpa5fG8nUW0Rt+ cLpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Z0lqPkiUKcw4hoWEb756wuRPxVLj2QZ6yrKh9T2kOgI=; b=NbeS/2pzFGXzLEmC/U4S7yAx/TA/Z50ePCkiKsmxJF9YLhMCZ2IgtIz5yWW3uxUwoT BsBIM7fV8UpG7tkF2fkTo0gUZfBdFHk7GhyURIJnPZrjpfpas8cT1d4LONiupYvLnDCU 7DRc+KFWLY/eN2lnNvnqL0Uar5az8F39KAq/76zVlPTRWI4FJ2YQ/pU0ooGFeNk6ljCJ rDACXff+BSjO7+Z1WyzFiUrBM421JZ83KAvombKoETIjt9uEx8e+f/I6joZGL5WzbrF2 eSzyxUTjyFb1QrzeblahwzlTKjDDgdCiEbpcHOC3qjZUjpzB1PxlBGESzfo6JKuodD8y Qlpg== X-Gm-Message-State: AOAM533Y5vcP4fRISsM64kbzRgZAFYSmX2vJMTABBk6PKybuOcpzox1R JGaz3aNn5qGI5/hjc0ax+HYwlnQ0X5naHPXPF+Sssw== X-Received: by 2002:a05:651c:1195:: with SMTP id w21mr6591270ljo.427.1606618388217; Sat, 28 Nov 2020 18:53:08 -0800 (PST) MIME-Version: 1.0 References: <20201119221132.1515696-1-walt@drummond.us> <20201128052317.GY3576660@ZenIV.linux.org.uk> In-Reply-To: From: Walt Drummond Date: Sat, 28 Nov 2020 18:52:57 -0800 Message-ID: Subject: Re: [PATCH] x86/signals: Fix save/restore signal stack to correctly support sigset_t To: Al Viro Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, brgerst@gmail.com, linux@dominikbrodowski.net, gustavoars@kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (Sorry, resending as Gmail decided to ignore "Plaintext mode") Thanks Al. I want to understand the nuance, so please bear with me as I reason this out. The cast in stone nature of this is due to both the need to keep userspace and kernel space in sync (ie, you'd have to coordinate libc and kernel changes super tightly to pull this off), and any change in the size of struct rt_sigframe would break backwards compatibility with older binaries, is that correct? Thanks, appreciate the help here. --Walt On Sat, Nov 28, 2020 at 6:19 PM Walt Drummond wrote: > > Thanks Al. I want to understand the nuance, so please bear with me as I = reason this out. The cast in stone nature of this is due to both the need= to keep userspace and kernel space in sync (ie, you'd have to coordinate l= ibc and kernel changes super tightly to pull this off), and any change in t= he size of struct rt_sigframe would break backwards compatibility with olde= r binaries, is that correct? > > Thanks, appreciate the help here. > --Walt > > > On Fri, Nov 27, 2020 at 9:23 PM Al Viro wrote: >> >> On Thu, Nov 19, 2020 at 02:11:33PM -0800, Walt Drummond wrote: >> > The macro unsafe_put_sigmask() only handles the first 64 bits of the >> > sigmask_t, which works today. However, if the definition of the >> > sigset_t structure ever changed, >> >> ... existing userland would get fucked over, since sigset_t is >> present in user-visible data structures. Including the ones >> we are using that thing for - struct rt_sigframe, for starters. >> >> Layout of those suckers is very much cast in stone. We *can't* >> change it, no matter what we do kernel-side. >> >> NAKed-by: Al Viro