Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1664831pxy; Mon, 2 Aug 2021 07:23:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygjxhojQysi85OlYLm8dsoN7wCC8Bnnxwft0rCNo2TerNtSWCXUGA2kDTPLbL0QzOx7TF9 X-Received: by 2002:a02:2a07:: with SMTP id w7mr15107149jaw.96.1627914211741; Mon, 02 Aug 2021 07:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627914211; cv=none; d=google.com; s=arc-20160816; b=EVPX78EJNTfdDCnnUrUYujwQGK14+3M1fxWWf9qxzVasWimI+CvmMzmW8UKSOsae7W Z8y8WDBGuPJeN5ij8oS6pMXyJmK+9/1eIWsKsVLvrSUFseKdldHxqJHFHxDXje56s/aI 4vQWJElrRwPPSkyQgyEr2J3AsbgX5TsyaMik4XSPgCeu0iBin8AgZ/rHRxbf1SHvWove PH3lOG5eTU5z/2NLCyG4l5HNNY5JaTZoSiDK2CpjGXT5n+cSONSpfBzw6hysD0lOPN0y iq5BF9fzHFv2IeB8iMpTY/hDagrW8aaQ5cgKXhzAyhx5K68GfJm+q3dM0HubxUTGye8w 5OyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/1RlFtOczU7bqdeC9+xI0lJWMN+h+lumUpCgvelVcrA=; b=xrUh9bOg2/T5Pc7JwtrL09x5fVtBVdbsUtHVAAYtQ/XPNliNujn6maqnc8q6lMyPOb zh3aMO7gMrwI+WEF6Hfm80/JMgrLctm8HidsFZxLbglj4VtstHWA9oTXHc3UwHD+sunT MlBH+jJqUJTXs7euaEvouZyny5EQIdnyReTS6IpI0ulo/nYBVZ9ihUDQsX65Md6QLLmG OONjOnJPgk96OqJy99vy4wVhe7rXjufzAYltJrTsOS1oI34mvfZOyIoQLcN6nXlr1MLp OeATgq7ON/6dM8We8Adu5/IEFEnsh0+x71yIMNAqx74ncEicpKtXuelzW8YxO9F6w9iB egIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=sicBxFjA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si11830688ils.106.2021.08.02.07.23.19; Mon, 02 Aug 2021 07:23:31 -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=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=sicBxFjA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236281AbhHBOVm (ORCPT + 99 others); Mon, 2 Aug 2021 10:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236421AbhHBOVb (ORCPT ); Mon, 2 Aug 2021 10:21:31 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58CAAC061798 for ; Mon, 2 Aug 2021 07:04:35 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id x11so30158339ejj.8 for ; Mon, 02 Aug 2021 07:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/1RlFtOczU7bqdeC9+xI0lJWMN+h+lumUpCgvelVcrA=; b=sicBxFjABTilN0mVRBL8M8lqKLzZcUdNbBrYstWs/mIx4KMF7R94fbC76LVGZZxG3a TTyE6cLj86gVEFEMoT0QnxZeST7Ko76Dpx7Ne6Qt0UJroBr2DABQRqCTyRh/IaxmU5Wh gZsFgkXHMVmWx2jL7nRI+tb4Gh25KPitoZJPrRam8n9/4E/IpWACCqKX50Nhw4ylC0v1 CDhQwzSLpMILSsEKhN4YLsr1K8sfJ6xTEkWYR+OY6Vhrawg7Ux19AZj1dDG0hIUmQgZb 40IwzYQbe2WIraeQwxi6y3CS6nQGxYqhbe6VRIF3iiS89Q/QtmkYlI/AfeSxn6JPaloo 6Teg== 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; bh=/1RlFtOczU7bqdeC9+xI0lJWMN+h+lumUpCgvelVcrA=; b=cnbFygYr28jBqdrcGdl7Ax7gGN0vb6oZPifAalgbSilPZYmWYraEoOzGEBSkhXmOYD /8v4y2KRD2DQsmMeaYAhwjQW7Jhoxq6XvGP7dZ9/hJS+6tvUJtuFWZYIUxLxbTdhwPBd 40xkv/MKu+i3aogNOz9DAnyRBBZyq9juXfZeyhlwdo3vvznJbivozSKGsCvbp5Q5CT7l NHrPLT7+A7WNYa9enCN/vz2SBZCo4Bagav5VZ9Xtr/qYeQzyiS2Dmt5fIfe+SzOKHLvA c4hCqxkfBlXIp855ulC2QvW18CX4j6vV1n7ONsoDOOQD2tgTyNoyDt86byTtNQnB9Q7p aZtQ== X-Gm-Message-State: AOAM530j4I+IPxQUeu+yTtQYyASC6RCyT34osAuF6wsEQklGHognWo0z wwpHgo1VJauvWmPsjO4E2PRw+XuCzAoTI/30Par6 X-Received: by 2002:a17:907:3345:: with SMTP id yr5mr15563499ejb.542.1627913073888; Mon, 02 Aug 2021 07:04:33 -0700 (PDT) MIME-Version: 1.0 References: <20210729031644.47679-1-xiujianfeng@huawei.com> In-Reply-To: <20210729031644.47679-1-xiujianfeng@huawei.com> From: Paul Moore Date: Mon, 2 Aug 2021 10:04:23 -0400 Message-ID: Subject: Re: [PATCH -next, v2] selinux: correct the return value when loads initial sids To: Xiu Jianfeng Cc: Stephen Smalley , Eric Paris , selinux@vger.kernel.org, linux-kernel@vger.kernel.org, wangweiyang2@huawei.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 11:15 PM Xiu Jianfeng wrote: > > It should not return 0 when SID 0 is assigned to isids. > This patch fixes it. > > v2: remove the "out" label and return directly. > > Fixes: e3e0b582c321a ("selinux: remove unused initial SIDs and improve handling") > Signed-off-by: Xiu Jianfeng > --- > security/selinux/ss/policydb.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) Thanks, this looks much better. I decided this is worth sending up to Linus as a fix for the 5.14-rcX series so I've merged it into selinux/stable-5.14 and I'll send it up to Linus later this week. -- paul moore www.paul-moore.com