From: James Hogan <james.hogan@imgtec.com>
To: Yury Norov <ynorov@caviumnetworks.com>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org, Vineet Gupta <vgupta@synopsys.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Mark Salter <msalter@redhat.com>,
Aurelien Jacquiot <a-jacquiot@ti.com>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Richard Kuo <rkuo@codeaurora.org>,
Ley Foon Tan <lftan@altera.com>, Jonas Bonn <jonas@southpole.se>,
Chen Liqin <liqin.linux@gmail.com>,
Lennox Wu <lennox.wu@gmail.com>,
Chris Metcalf <cmetcalf@mellanox.com>,
Guan Xuetao <gxt@mprc.pku.edu.cn>,
Andrew Pinski <Andrew.Pinski@cavium.com>,
linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-c6x-dev@linux-c6x.org,
uclinux-h8-devel@lists.sourceforge.jp,
linux-hexagon@vger.kernel.org, linux-metag@vger.kernel.org,
nios2-dev@lists.rocketboards.org
Subject: Re: [PATCH] asm-generic: Drop getrlimit and setrlimit syscalls from default list
Date: Sun, 30 Oct 2016 00:06:07 +0100 [thread overview]
Message-ID: <0B167874-4C33-4FEC-80AA-DC936AA56E4D@imgtec.com> (raw)
In-Reply-To: <20161029214541.GA20037@yury-N73SV>
On 29 October 2016 22:45:41 BST, Yury Norov <ynorov@caviumnetworks.com> wrote:
>On Sat, Oct 29, 2016 at 11:02:40PM +0200, Arnd Bergmann wrote:
>> On Saturday, October 22, 2016 3:14:04 PM CEST Yury Norov wrote:
>> > The newer prlimit64 syscall provides all the functionality provided
>by
>> > the getrlimit and setrlimit syscalls and adds the pid of target
>process,
>> > so future architectures won't need to include getrlimit and
>setrlimit.
>> >
>> > Therefore drop getrlimit and setrlimit syscalls from the generic
>syscall
>> > list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the
>architecture's
>> > unistd.h prior to including asm-generic/unistd.h, and adjust all
>> > architectures using the generic syscall list to define it so that
>no
>> > in-tree architectures are affected.
>>
>> The patch looks good, but shouldn't we also hide the actual syscall
>> implementation if the symbol is not set? It's just dead code
>otherwise
>> for new architectures.
>
>I was thinking on it. The patch of James Hogan, b0da6d4415
>(asm-generic:
>Drop renameat syscall from default list) doesn't do it for renameat(),
>so
>I decided not to do it too. It's not so easy to disable syscalls
>because arch
>may support few ABIs, and some of them may require the syscall. For
>example,
>arm64 supports lp64, aarch32 and ilp32, and first two ABIs need
>renameat()
>and getrlimit/setrlimit.
>
>At now there's no arches that doesn't need renameat() and
>getrlimit/setrlimit,
>and there will be no such arch in nearest future. So there will be no
>dead code.
>
>But I agree with you that we need make that implementations
>conditional. If I understand it correctly, we need something like
>__ARCH_WANT_SET_GET_RLIMIT in all existing Kconfigs, correct?
>
>I think this patch may be applied as is, and if needed I can send
>another patch that disables renameat() and getrlimit/setrlimit soon.
>
>James, what do you think?
For renameat my main concern was the ABI, and I didn't think it was worth the effort or slightly increased complexity to ifdef the implementation since it was such a trivial wrapper around renameat2. Getrlimit and setrlimit aren't much more complex, just a user copy in addition to the standard doprlimit, so i probably wouldn't have bothered for them either.
cheers
James Hogan
next prev parent reply other threads:[~2016-10-29 23:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-22 12:14 Yury Norov
2016-10-23 20:57 ` Vineet Gupta
2016-10-24 9:09 ` James Hogan
2016-10-25 0:47 ` Ley Foon Tan
2016-10-25 12:51 ` Stafford Horne
2016-10-29 21:02 ` Arnd Bergmann
2016-10-29 21:45 ` Yury Norov
2016-10-29 21:52 ` Arnd Bergmann
2016-10-29 23:06 ` James Hogan [this message]
2016-10-29 21:54 ` Arnd Bergmann
2016-10-29 22:05 ` Yury Norov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0B167874-4C33-4FEC-80AA-DC936AA56E4D@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=Andrew.Pinski@cavium.com \
--cc=a-jacquiot@ti.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=cmetcalf@mellanox.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=jonas@southpole.se \
--cc=lennox.wu@gmail.com \
--cc=lftan@altera.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-c6x-dev@linux-c6x.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-metag@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=liqin.linux@gmail.com \
--cc=msalter@redhat.com \
--cc=nios2-dev@lists.rocketboards.org \
--cc=rkuo@codeaurora.org \
--cc=uclinux-h8-devel@lists.sourceforge.jp \
--cc=vgupta@synopsys.com \
--cc=will.deacon@arm.com \
--cc=ynorov@caviumnetworks.com \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®