Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5298051ybc; Wed, 27 Nov 2019 01:44:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyFnbIqz2eXxeez76KGAboOvlOlr1OKXe7dBsFb3I3MgTSdXX/x7AP/KGdcFgA9LK7yhg15 X-Received: by 2002:a05:6402:3cf:: with SMTP id t15mr30421428edw.21.1574847887216; Wed, 27 Nov 2019 01:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574847887; cv=none; d=google.com; s=arc-20160816; b=nHCPfEk+BjaoK+f6FblKLdNmLjuurx0VLwtWfmu4zIqBINwr2ivckQXT06lYJFyRNA qiNigoeSxLThVAiB4JhX4546wpqVrL0MFaFM+IKjqRJH9/l06mB4FpKH+TObpTIRXEQC 0xGfdiOa+KLgacncZF0zIJyommGdcaHr2HeWhnQD/PbzSkF3aDbYT9vJJD6kC+v2s8Yn PKOneC5ntVo3X2Pv7SDiS2p+LxWNmIM8D3L64gQyT9g9NLFVWjW8fr335/qioJHu1p17 t7cvTIWCnmxPF1qsAeKjp81KOLcLEW/LfLRrn0zxf1dWxn55nIipMQu41qaXHknENjPa rRQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=V23rkTkin1c7zTfEuGjtB9skoVvrhOmzur8foUlLMFA=; b=QkQ0yOl+HA1CQ7fwkNN6HWgrjPfCguP041MuECRvRQtT/P1jwPmIbma8QCh6ZbpeB8 gBssdWZmFkR+gURNr9ZuQo5U+Ixg95FnO1go1VbwZD/kELpzL0/slCPzXO2FfyrmYPvK X8Y+T2p/UAgAF4BBp9JSoGT585GfCsIUoHzfA6ku+3+jUcqL0nI5HKlmN2Qm9MlL7MqW zEtv0ZMPlG9IzpMYAEBZrJLPyALJv1CKNoMDjREcmXSyOhHGcQnSWA1S8w0tzzU+EQDx 2Y6uYQI/+YlLaoZdb8Gnc7RJCaLe/jiM9jDa8AJ0xVdtMnxEBxdHHxO7KB6SO7sUtQyW fjpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cdJmMbKM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8si2917694edv.432.2019.11.27.01.44.22; Wed, 27 Nov 2019 01:44:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cdJmMbKM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbfK0JnU (ORCPT + 99 others); Wed, 27 Nov 2019 04:43:20 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:33964 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726252AbfK0JnT (ORCPT ); Wed, 27 Nov 2019 04:43:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=V23rkTkin1c7zTfEuGjtB9skoVvrhOmzur8foUlLMFA=; b=cdJmMbKMq+6OdoqhmMoN9Vvcq kQ9AMkd7iYn8pFO2djNXBBs6E6PiLzipr69oVywUwjc8eHxIMDnkJBCTdTrzxS3WiTg/IeLWwCdhL 2iA32ZYWu5f20LwrTjl7BXUr5We6FkMLc3XnnlY8muMK1pj0E6GHbRcUmDdmHSLZJhhg8NQOUOkPx zx3bQXfYiFB3cAsgxF0EIb6em3vVzUgo9IJUnx9wOnpMjE7BqAJMn8v4g0/vp9iOg+rau62A/5If1 e4mD88IU2d/RVD4IMHIeOuw14j9yFc3W2xSB5TqtyuQPCCCtnz3MF0f0C7828fH14uvJXcs9Egsff s0t0YXSRA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZtqr-0005QK-S8; Wed, 27 Nov 2019 09:43:13 +0000 Date: Wed, 27 Nov 2019 01:43:13 -0800 From: Christoph Hellwig To: Wang ShaoBo Cc: cj.chengjian@huawei.com, mark.rutland@arm.com, huawei.libin@huawei.com, guohanjun@huawei.com, xiexiuqi@huawei.com, wcohen@redhat.com, linux-kernel@vger.kernel.org, mtk.manpages@gmail.com, wezhang@redhat.com Subject: Re: [PATCH] sys_personality: Streamline code in sys_personality() Message-ID: <20191127094313.GA11668@infradead.org> References: <20191126094045.134654-1-bobo.shaobowang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191126094045.134654-1-bobo.shaobowang@huawei.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 26, 2019 at 05:40:45PM +0800, Wang ShaoBo wrote: > SYSCALL_DEFINE1 in kernel/exec_domain.c looks like verbose, > ksys_personality() can make it more concise. What do you try to say with this sentence? I can't really parse it. > --- a/kernel/exec_domain.c > +++ b/kernel/exec_domain.c > @@ -37,10 +37,5 @@ module_init(proc_execdomains_init); > > SYSCALL_DEFINE1(personality, unsigned int, personality) > { > - unsigned int old = current->personality; > - > - if (personality != 0xffffffff) > - set_personality(personality); > - > - return old; > + return ksys_personality(personality); This looks ok, but I'd much rather just kill ksys_personality and add an optional arch hook to reject personality settings for the arm64 special case.