Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5143725pxb; Sun, 13 Feb 2022 09:17:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7amYpMU6jd/WiD8hnNbxLIfKttuh7F6UdR9pbsODyflthNNu9uaPL9aLaZtQj1Bdu8W3P X-Received: by 2002:a05:6402:239d:: with SMTP id j29mr11552736eda.324.1644772643406; Sun, 13 Feb 2022 09:17:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644772643; cv=none; d=google.com; s=arc-20160816; b=o9HH3FS4b8yohdV1W3K1kBa4ynT6lnzxanNs0qr65188B2HwILmMwKYEtdUSnw8KF6 1MXwKya3OccKUIdfxym8VQlDL3U6GJQ6bOcgNI/vkxZtp04V8w57HGZVLwZW4YQUpn0t SW0XCtSP4jAeLS2q2K7td4q3XRJYSjvIfrSAL+dgcvc4TbuoX5yFS6R01mto0nEQUIrV hA470lxBGqRvyhmUK3c6wtvjCMSGvLX8DdH5QpWrX9jIHJhxl5GaGMMifGHMukkDAuNP gGxBwDyp7FEAVJQLLIq3W0rPwCdAsSSiEPJDbMWmfkBE/CfQZ7HiYa0rmmHI0Tr7+XlQ K8Lw== 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=gxid+VMOks+Z278B3ciU0dNskRK6ktKfaLZmB1Olmd4=; b=C55ewDDDnKnZTuvssyTMLd7nPZba0OdrjgIlXKuRAHwkwhp7Qgus5PaBCxg23kpJMc m4DQRR/vSCNn+ypEG99Od9rkQNMtwCrs//eVErlC2GAzTmOFE44o5cHilyeKJZG3GXZo DSnTiDz9EhL23IWaKQqJ9WsqIDVxvwpvov2N9kmaYMw1BBJHKbQFtMpdcUh8oxq/S+18 2FXOtde/Ig6A0lXHZM72t2bOdbqTx2EKu61Vw9jbuCu4EHujvnv8NoeOIzfLpnV+hjwb bjbuiDJQjKuNh9rGzwJ1pER2PmEp1/shfddK5HMm+dhALEqPKtkYryYERIHeZgMPLhvS nZ8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@swiecki.net header.s=google header.b=Qb939wlv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11si8171898edh.166.2022.02.13.09.17.01; Sun, 13 Feb 2022 09:17:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@swiecki.net header.s=google header.b=Qb939wlv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234049AbiBLLYL (ORCPT + 99 others); Sat, 12 Feb 2022 06:24:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233922AbiBLLYK (ORCPT ); Sat, 12 Feb 2022 06:24:10 -0500 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E554B26130 for ; Sat, 12 Feb 2022 03:24:06 -0800 (PST) Received: by mail-oi1-x231.google.com with SMTP id 4so12359912oil.11 for ; Sat, 12 Feb 2022 03:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=swiecki.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gxid+VMOks+Z278B3ciU0dNskRK6ktKfaLZmB1Olmd4=; b=Qb939wlv4CKlAJ6xVeF8t1o3QQMoZ897DgNU2HRBmPOLq3lYk4thq8Mo0xjNEWQ5Rl xYE0rfcoBeo4i1vKD6mlDF9NhgT9O2ZladUn8mf7uRzEGWKCecJ5Hm6YgEZCl+MtMOXx 5AlWl0A/TKfY6dlLWgFGqNbbc3q5gZm26MNm8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gxid+VMOks+Z278B3ciU0dNskRK6ktKfaLZmB1Olmd4=; b=cvCOFTgACFajy81sKcOow/2ouo2F/3EqlDwTMB08TV9sy3Nn37Vz6YHiZetdhgBTMD 0sAL+7ugsPlyIxIm4NIxQ0Khcg0jn2ypJ8eZ8Nr6rSjvg6YvBhQWxloqqdP0fHsWae5y fXvAjpuVjXDzaQuq6u7qXNHkSgoOtmdcraeEgRYsLWXZAGgOX+ml9gQwmspwAeBL0sMX xKOAtlc7rzsWv5wZ0k6tiCw/VmNyYXJqBbi2Xai7Msp9tNFwr/jmOpNmMHR83I7jE0Jn AxTayrmevsl05dIsH7BaBpv0/+rlcKVXrefjotNoe3/ZXCbO2g7q2mEN2rM0wIbTJAje yFVw== X-Gm-Message-State: AOAM530G/F0R0k/OlCDs9ITHlDEklxWXdbdaC1hq3c1EtWAaMviDzgD3 HirVVLSYH5RV4NJc2WOMRIB7FYOsoxSJJ8VZZ3Dx/g== X-Received: by 2002:a05:6808:19a5:: with SMTP id bj37mr2189889oib.243.1644665046278; Sat, 12 Feb 2022 03:24:06 -0800 (PST) MIME-Version: 1.0 References: <20220212042843.2993537-1-keescook@chromium.org> In-Reply-To: <20220212042843.2993537-1-keescook@chromium.org> From: =?UTF-8?B?Um9iZXJ0IMWad2nEmWNraQ==?= Date: Sat, 12 Feb 2022 12:23:55 +0100 Message-ID: Subject: Re: [RFC] Get siginfo from unreaped task To: Kees Cook Cc: "Eric W. Biederman" , Jann Horn , Andy Lutomirski , Will Drewry , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sob., 12 lut 2022 o 05:28 Kees Cook napisa=C5=82(a)= : > > Make siginfo available through PTRACE_GETSIGINFO after process death, > without needing to have already used PTRACE_ATTACH. Uses 48 more bytes > in task_struct, though I bet there might be somewhere else we could > stash a copy of it? An alternative way of accessing this info could be abusing the waitid() interface, with some additional, custom to Linux, flag waitid(P_ALL, 0, &si, __WCHILDSIGINFO); which would change what is put into si. But maybe ptrace() is better, because it's mostly incompatible with other OSes anyway on the behavior/flag level, while waitd() seems to be POSIX/BSD standard, even if Linux specifies some additional flags. --=20 Robert =C5=9Awi=C4=99cki