[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87mu8t3mlw.fsf@mid.deneb.enyo.de>
Date: Fri, 06 Mar 2020 09:37:31 +0100
From: Florian Weimer <fw@...eb.enyo.de>
To: Laurent Vivier <laurent@...ier.eu>
Cc: YunQiang Su <syq@...ian.org>, torvalds@...ux-foundation.org,
gregkh@...uxfoundation.org, akpm@...ux-foundation.org,
viro@...iv.linux.org.uk, James.Bottomley@...senpartnership.com,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-api@...r.kernel.org,
libc-alpha@...rceware.org
Subject: Re: [PATCH] binfmt_misc: pass binfmt_misc P flag to the interpreter
* Laurent Vivier:
> Le 06/03/2020 à 09:13, Florian Weimer a écrit :
>> * YunQiang Su:
>>
>>> + if (bprm->interp_flags & BINPRM_FLAGS_PRESERVE_ARGV0)
>>> + flags |= AT_FLAGS_PRESERVE_ARGV0;
>>> + NEW_AUX_ENT(AT_FLAGS, flags);
>>
>> Is it necessary to reuse AT_FLAGS? I think it's cleaner to define a
>> separate AT_ tag dedicated to binfmt_misc.
>
> Not necessary, but it seemed simpler and cleaner to re-use a flag that
> is marked as unused and with a name matching the new role. It avoids to
> patch other packages (like glibc) to add it as it is already defined.
You still need to define AT_FLAGS_PRESERVE_ARGV0. At that point, you
might as well define AT_BINFMT and AT_BINFMT_PRESERVE_ARGV0.
Powered by blists - more mailing lists