Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4149981ybc; Tue, 26 Nov 2019 04:42:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwrZINwVisUc22SHZE91rfXKEUbojsjYV3eaOQ/0l2mVUU7b3V9QrUdWnP9zcZAwBucuzyo X-Received: by 2002:a17:906:d293:: with SMTP id ay19mr42459408ejb.146.1574772162948; Tue, 26 Nov 2019 04:42:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574772162; cv=none; d=google.com; s=arc-20160816; b=qdHOkVlwHaXsmRjFqmGMXQ1p0QkGtZUOs/ScDi0E3ub1tIkO/ukY2g80BLFJSG9eul gPjPUIBN9semH8CXLnvCM9AA08aMcn0wiLEdKYahVDlybqRcsB5kZINonDzUO8FSDdFJ JuXUJvv2ZhlFroHBcIRjH8ZrlqHGdQGCiiRfMSuJk39dSao2AdGKSTSfRQWVwYtV6VsC HFtBQVohxuoFTTTRkFe/AGjKTjAAy5Wkt6zW0n5CoZtIp6KcDGDRk/wanKrqJozjeDpk rpWxeTZfm7vToenDZVxqn4DgRomcGF2tds/qMqAF+olSpChIZFrwTTZGnMDiGTsuh4JG rMJA== 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; bh=3KZKWTX9PC+iGgk0Bcm8CUM/2Gnar95gCU/vzvL7S1Y=; b=H/OILOej07VNc0ZtyJZg2Pt/ekUxXdi2OocvVoWbQGej8hShmrMQ2PSz2eBOjV6qkV CUBTkcwvrnLl9+30VW9HBn90r410345zbefZLYgDqub8HFJpUzDz11+mF4KfTTkZZOGK O6YFB8/1AvDsWe16/047I6e42HchI4OxUpxApTYyoa3rLo4kssrgOa3o7t+akKELFwqx xyMPKijzeCDwjYP2tktFzJbl15EyxFWM9oBlvyWvVdr/xHzACgJ3ZyxxR4OvAGxyK25M YpzVyl4Wp1417PLiulcT09TiGUUvyREgz7Pb4cIYfoNQx9uM8D4vyC4DjtDMvPXCeUzW F4UA== ARC-Authentication-Results: i=1; mx.google.com; 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 t6si7412365edr.52.2019.11.26.04.42.18; Tue, 26 Nov 2019 04:42:42 -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; 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 S1728085AbfKZL2Y (ORCPT + 99 others); Tue, 26 Nov 2019 06:28:24 -0500 Received: from foss.arm.com ([217.140.110.172]:33144 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbfKZL2X (ORCPT ); Tue, 26 Nov 2019 06:28:23 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4959E1FB; Tue, 26 Nov 2019 03:28:23 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED7903F52E; Tue, 26 Nov 2019 03:28:21 -0800 (PST) Date: Tue, 26 Nov 2019 11:28:16 +0000 From: Mark Rutland To: Wang ShaoBo Cc: cj.chengjian@huawei.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, Christoph Hellwig Subject: Re: [PATCH] sys_personality: Streamline code in sys_personality() Message-ID: <20191126112815.GA32965@lakrids.cambridge.arm.com> 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.11.1+11 (2f07cb52) (2018-12-01) 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. > > Signed-off-by: Wang ShaoBo FWIW, this looks fine to me: Acked-by: Mark Rutland I'm not sure why I didn't do this initially; adding Christoph in case he has any comments. Mark. > --- > kernel/exec_domain.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c > index 33f07c5f2515..f7a0512ddc23 100644 > --- 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); > } > -- > 2.20.1 >