Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp489645rdg; Tue, 10 Oct 2023 17:15:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHzpmO/7cugopzdToNQtCTa3egrswu0Tmtk1t/qbq7mkTEvqubC8UYyh7SgsOcU65twh0X1 X-Received: by 2002:a17:902:a604:b0:1c7:37e2:13fb with SMTP id u4-20020a170902a60400b001c737e213fbmr18599062plq.55.1696983300728; Tue, 10 Oct 2023 17:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696983300; cv=none; d=google.com; s=arc-20160816; b=mF1IF8W5Mu94xjHIzrL1ERCCTxWADIyMxiITUewv5FGrszSLNmZ8Q8s32OUNHoP1M6 9BBeiJXLMvATkClBnu60558rF84RZbG7qKh96pN0C5JpiWL1a1YAYZH9Eso6z4J0nbdX cyVT1eEBIaELrg813V6GfBFNbPsIZFGTrTu8n31l4JIOIrE6z1biZum2eVr7ouITjU16 RyZDxaxhwOzmhCrIuRBXvmmlB48eHV6G2b3M/2WZ79N0IvmKLQ3nSzN5wDy0h1rqlszy MgouwGQkHrKzNhNmbwHcvuruGLuSGhzWIG0wjJL9OYRPYCCKbwODntEBTD3bCKZFAEnv xKeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VUCeSJPd8HQSJUW/ehPZETplrqc/WZGCTN4su2s0Zbg=; fh=OP+7TAWqZCSpoz/llh4+/bsJ1XsL3oLSKO8+dmCeG84=; b=HGr9z52kLAxBRsAgOkrzhgS/wa/znXJhs2XtkYYE79gV/NueaRLdUO8NKdmA2/SojQ m78+Y/9N57Mr/jHzfkTtBAV12UDVT5CcMAtF79sJ3ODoFTcfxxoq/MhXlNzsOwPq1V6Q pWUM5XpQaseu93Skoaln1r6QVoTtla6DItP6t14auqBWkcAf1eJc0Cf4jTD/cyFhTKOw 8o1DRstppasNT0Lq9w9Y1tTgr6Pv4o4S/+RsbfTLHT9jM26TU/8xiMNGlLgPutaXFC3K FcBuJL2lx2XJ6xUI+PCS/UA7cLoyzfLBnePDSDQl3klwsGxBZ+7dKczIkKm4uhcknRCy iqfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mfVp80U1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id d14-20020a170903230e00b001bc079974dbsi14185864plh.355.2023.10.10.17.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 17:15:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mfVp80U1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9E93482E2976; Tue, 10 Oct 2023 17:14:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344291AbjJKAOw (ORCPT + 99 others); Tue, 10 Oct 2023 20:14:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344229AbjJKAOv (ORCPT ); Tue, 10 Oct 2023 20:14:51 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A130D9D for ; Tue, 10 Oct 2023 17:14:48 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-69fc829d7b1so3139196b3a.1 for ; Tue, 10 Oct 2023 17:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696983288; x=1697588088; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VUCeSJPd8HQSJUW/ehPZETplrqc/WZGCTN4su2s0Zbg=; b=mfVp80U1B7KBJ71IzevXg/i3MVsyIy7mOuOu/Pr5I6FD3SUAO0nI93uGktOFHVC8c4 iBGAKXIvcc0qvOyXRPetyyqTxq45xB3TUH9TjXUmdJUCaGxzXbSSdeqRG4ThNOWHYwwh 9os+jMtkkZIVkjA9hhsQKLsL6UadgNVptM7oQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696983288; x=1697588088; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VUCeSJPd8HQSJUW/ehPZETplrqc/WZGCTN4su2s0Zbg=; b=PtZdTB84y8IhtGrDC4oLn+sNRgzMFGoE0p3dYZj27vKAazG7fRyHN8pVHZnAvHBQ3N uwwJukN1Vmy1hmdRA1KSbk+mLsr57EXcxuNZrxcQjVFaH7nr4B+T6A/1KLiw+kz5cP2j mJ5f+CRLmy8pTiD25T5fBPXgqciI1AKzwWlkt4KmbggFkjhQUi5Q7PLsa3kVkFHqaZaC dJHXPQV9t4OPW2KAyZefYMH93bZRSzZ8u7qhrSn43QXRA99EjtYkeP2MiG+Bt0uUT6aj nVz09Aow4arD5Zbvpibl0XqzytuY0EA4syopbL+D8w08GbwBnFtofS06fs8a7Zl/BkL1 sOLA== X-Gm-Message-State: AOJu0Yznic5/QAETIANI55f/2PJGqoBc/+2GE2AG+q7rT0nf60OSKoLr WiEqUzJpo+/XADK+coleXHx41w== X-Received: by 2002:a05:6a20:5483:b0:16b:80f2:c234 with SMTP id i3-20020a056a20548300b0016b80f2c234mr18020146pzk.59.1696983288122; Tue, 10 Oct 2023 17:14:48 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id e1-20020a63aa01000000b0057ab7d42a4dsm10695323pgf.86.2023.10.10.17.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 17:14:47 -0700 (PDT) Date: Tue, 10 Oct 2023 17:14:45 -0700 From: Kees Cook To: Hengqi Chen Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, luto@amacapital.net, wad@chromium.org, alexyonghe@tencent.com Subject: Re: [PATCH 1/4] seccomp: Refactor filter copy/create for reuse Message-ID: <202310101714.FFBD84BE@keescook> References: <20231009124046.74710-1-hengqi.chen@gmail.com> <20231009124046.74710-2-hengqi.chen@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231009124046.74710-2-hengqi.chen@gmail.com> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 17:14:58 -0700 (PDT) X-Spam-Level: ** On Mon, Oct 09, 2023 at 12:40:43PM +0000, Hengqi Chen wrote: > This extracts two helpers for reuse in subsequent additions. > No functional change intended, just a prep work. > > Signed-off-by: Hengqi Chen Thanks! This looks like a clean refactoring. I actually think the error handling is more obvious now too. :) -- Kees Cook