Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp406131rdb; Thu, 25 Jan 2024 21:37:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEYsYewOdaBj7AB6jF9dh6Tcs7wTibJc1fFKzQ7GPqp0aIP+LBvi1mro5Lt9bTFJdjaaDc X-Received: by 2002:a05:6830:71aa:b0:6dd:eebc:da3f with SMTP id el42-20020a05683071aa00b006ddeebcda3fmr1158335otb.23.1706247479070; Thu, 25 Jan 2024 21:37:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706247479; cv=pass; d=google.com; s=arc-20160816; b=itxn5hbUCDLlSh0+vLSTVAfm4vVD61mqthGWJy0+N9NyUHCFkcS6fnb8lXoyR2MNAI fpTyymDP7WyIs88W0kf8NCKZUITSXevhJz2mh2sGcBZX08Fi3J++CxVK8LnCu135TRYQ auou/g4kWB5LjaA9Nqk/MJT8K/ZR5pWRFEhxJFzFstZzn9ZKLem1ZqTGO4fLnCszJvrP LpmOduyzdxWUW4UnoXZFDbvWiHMbC4h4QBmTIjt685KQWarPVQFdFKmGg5AsxmHgZHfI QouK+HEYP3jVsfDzgGrbdHevx7U7AeEImhihx2BY2KRemgyF4AKMd1b6TdSuB+sq7mjf rPGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=XyYVbzGwJ++15XNLH4Iqo256HAgYaFZy9WwSMTxvpPg=; fh=Ty/VZH6I/mJgaduGwwUCSA9h8QScHyn8kw8RuLsvvd8=; b=Wbz2j9Vqj9hC1N8nX+ZjSzVbQ8i0kq316pQBqK7pB6LNI6q5nSW5aWU11sAMO+3/FO tbh2pmY2lJBE9ofmuu5Hh4aP8NOTTXQkKC7BbNtELC84LO737ydyf1b85adPtBAfLBIm SAkk4aBBQmnLP2vK44Ju2ARj8PnZCnfvjfTZMpX8WdqcF4cHNGDJ7QP5l12UOrhcxHde bKaoxy1AdIqZLaSfZyapwvIKyqzaCxekvcicEV9juSsTgZk1K60zp2rTQPbsvr/kGMQ1 MqwsG2DEsYnKgKrXcqc7/aYEZM1WskxoEO4xpIabEbr3MaYT8njXnGPrF8UX99nBk7YX rsfw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-crypto+bounces-1639-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1639-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k28-20020a63ba1c000000b005c606792120si536431pgf.107.2024.01.25.21.37.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 21:37:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1639-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-crypto+bounces-1639-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1639-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B4EDB28A06B for ; Fri, 26 Jan 2024 05:37:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84EEABA57; Fri, 26 Jan 2024 05:37:55 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8FE8BA33; Fri, 26 Jan 2024 05:37:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706247475; cv=none; b=iU1Mh5OnUw2YADF6+1ER8fKhSQK13V3XBFQElddn8zN4gFK2zejq+YVT5F/QwOrlhLqsSFOMjhhdO9WhwprqtV+azw6eI9g8a09p/P6Ti0SSX5CoFtl5+Dw+UJ5+JeB/Q7PIbYt77obPcjLWScylpSSeqSQ0I5CBLLigMs2NDIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706247475; c=relaxed/simple; bh=S0K5VFn4XkEj6LucTmHHkt4xJ4B4YZkO2Nf6C4KQQ8s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aKhyTrOWaG6tJvfXKGYKbDId2ZaypOMbu27Bq3cRDOMMrbhmFnTZtgyk22bUe5xTEsoQm3OGoFfuv+/8Uat0Y1lYPZ/bd/qbtyNm74abL558FgZne2CSz7e2VcdmuC7bUIKbGuwJEsBLdrii3DvRHi1hpPV35tMIUN1wXan+O9w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rTEtv-006Chw-FO; Fri, 26 Jan 2024 13:37:16 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 26 Jan 2024 13:37:28 +0800 Date: Fri, 26 Jan 2024 13:37:28 +0800 From: Herbert Xu To: Lukas Wunner Cc: David Howells , "David S. Miller" , Jonathan Cameron , keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, Andy Shevchenko , Peter Zijlstra , Dan Williams , Ard Biesheuvel Subject: Re: [PATCH] X.509: Introduce scope-based x509_certificate allocation Message-ID: References: <70ecd3904a70d2b92f8f1e04365a2b9ce66fac25.1705857475.git.lukas@wunner.de> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70ecd3904a70d2b92f8f1e04365a2b9ce66fac25.1705857475.git.lukas@wunner.de> On Sun, Jan 21, 2024 at 06:50:39PM +0100, Lukas Wunner wrote: > > * x509_cert_parse() now checks that "cert" is not an ERR_PTR() before > calling x509_free_certificate() at end of scope. The compiler doesn't > know that kzalloc() never returns an ERR_PTR(). How about moving the IS_ERR_OR_NULL check into x509_free_certificate itself so that you can always call it? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt