Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4189406pxk; Tue, 8 Sep 2020 13:03:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydsUnyZRELC9swENig6mr3niYCRCdxuhxeYTey0oeyGhQPpkwhxbgBjEqeR6LzuWNEv02y X-Received: by 2002:aa7:c419:: with SMTP id j25mr724739edq.109.1599595419307; Tue, 08 Sep 2020 13:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599595419; cv=none; d=google.com; s=arc-20160816; b=NO7TKbXy4o5mzoEx0oefh+kxa8bp/AtJL8zGJlGS4EtmsrfV0/lUoRP9BFvrYhwz7T OMabDL4uFC4y/ffiljnTxoe1VMVQ+lMRX/X/3eLpq/0fJtmioKRM0KThJia7JGuFc4sy eB2ri/f9bGkYWCJ5t7sQAL7cXNPZze2k/j2j1rTwaFTX7jLsiZF4yuRRDId0Yuk0Mki4 7iX1KP/CjT6u7dvnjpeKxlB0ttBAAkiPI2Vt4qhYyj6pDKKk25PZAkMIawab+fX+E4i9 8UwO4F7gH1eUTAa59uO6ZA8h5afHWnrMXf0y3d33ZBmxQhynY4fKuR6fkv9SDHhG4vju oUvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x+Aniqm426lptxXBdTzT7j62mGC/+JOEvzDp+hYSZVE=; b=cygBmuQCOJdov/T3Rd38SMvFSaT9dUuKcOOT4WJ4hV/+023kByBqxFIMWnrTQQ/jy0 8BQnYqP6GEUoSfR4tlq1qHT1M3n4SsZvte21sDqOSGyn0jkiDP1MQIK0Y26Q7XMlpCDm J+zDX5D5JPf+n6AxaBHBlGpuzZ2CRtpaGj9ZDIMYd8b+I0VasWn7D6ytW6sq1DB2N+R/ 50+Y6iyAGa1y5r+5RuM9PSkJIlRY77LeqzLQN9Fxtqre/z45aaLoI+r84hhV4ha7mNxZ 0igs+yb5YTYSvms4PSQm79E2mDgq+wanHRkV/MjoZEx3umTwEmuNpgIxcYSrdtntjHHZ lqtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Q+Q2YAWK; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si28627ejp.78.2020.09.08.13.03.16; Tue, 08 Sep 2020 13:03:39 -0700 (PDT) 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=@chromium.org header.s=google header.b=Q+Q2YAWK; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731249AbgIHUCp (ORCPT + 99 others); Tue, 8 Sep 2020 16:02:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730493AbgIHUCb (ORCPT ); Tue, 8 Sep 2020 16:02:31 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEA19C061573 for ; Tue, 8 Sep 2020 13:02:30 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id v196so199422pfc.1 for ; Tue, 08 Sep 2020 13:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x+Aniqm426lptxXBdTzT7j62mGC/+JOEvzDp+hYSZVE=; b=Q+Q2YAWKZWzPyO2iLJ6cCUDcS76R8NyoRA/UeDzkGVM8aeee0koguncinCMH0wyH/m e7/X+wiDsS2IXv+P4RvgdRcnrfuQ9ScLSwWyYC+LdQ3Yd3fqbP2WaokF07yqvmuIe0R+ 0oSdXCiGrNzQwKyxEmage7UCpoRwQHF5c35ng= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x+Aniqm426lptxXBdTzT7j62mGC/+JOEvzDp+hYSZVE=; b=bpkk/SOLRYfo3jUn19ImkZc9tc4pZKyI3sFKGsbn6gjfZ+e2qyK8l7LbmBLPOYPZVF PltbKjjSOT7W++aN3B/9b/FP6M5+waSQngo5qgav8hV5KTqwar9PnEZx9GpvU+Fu2dkb nBAg/TCGkGzrJL8gi6uEGXLaLXj3ZqLNli5mxFpD2XPsxWlpbuNF223jB1p7+syRzulv sciLpdmPYXOu++OjsbAupBQs1XAse4i7ooLxWi51H65Npk4yTH8d3ZIWXJaGdyQgOTe+ GZcCQ/KZB1Y6hlfIeZIlXqJB0cqzu2+MnCRu//l1l1TkE1hl8xbgaKqJGUiK+rFaiO0m c/Rg== X-Gm-Message-State: AOAM5333edw7sHCMV2jVftLopS5KdKi82NyDmmw2AjYVCFBhEmzqr/6S st7HMKyemxRfx5rHwtqSsSjh3OnJmKh+dQ== X-Received: by 2002:a63:4f66:: with SMTP id p38mr304001pgl.284.1599595350176; Tue, 08 Sep 2020 13:02:30 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z9sm240221pfk.118.2020.09.08.13.02.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 13:02:28 -0700 (PDT) From: Kees Cook To: Denis Efremov Cc: Kees Cook , linux-kernel@vger.kernel.org, Andy Lutomirski , Will Drewry Subject: Re: [PATCH] seccomp: Use current_pt_regs() Date: Tue, 8 Sep 2020 13:01:00 -0700 Message-Id: <159959525269.1676241.9638891402851121567.b4-ty@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200824125921.488311-1-efremov@linux.com> References: <20200824125921.488311-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 24 Aug 2020 15:59:21 +0300, Denis Efremov wrote: > Modify seccomp_do_user_notification(), __seccomp_filter(), > __secure_computing() to use current_pt_regs(). Applied, thanks! [1/1] seccomp: Use current_pt_regs() instead of task_pt_regs(current) https://git.kernel.org/kees/c/4484dbacd7b6 I reworded your commit based on the thread and added one comment for a weird case where task == current, hopefully that looks correct: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/seccomp&id=4484dbacd7b61eaa4e21332c0a044dedce732ebb -- Kees Cook