From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD770C433E1 for ; Tue, 19 May 2020 12:32:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A6D2620825 for ; Tue, 19 May 2020 12:32:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728612AbgESMc2 (ORCPT ); Tue, 19 May 2020 08:32:28 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:53264 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgESMc2 (ORCPT ); Tue, 19 May 2020 08:32:28 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jb1Q2-0000vi-W0; Tue, 19 May 2020 06:32:27 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1jb1Q2-0007fz-6K; Tue, 19 May 2020 06:32:26 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Andreas Schwab Cc: Christian Brauner , Jann Horn , Kees Cook , Al Viro , Andrew Morton , Tetsuo Handa , Eric Biggers , Dmitry Vyukov , linux-fsdevel , linux-security-module , Linux API , kernel list References: <20200518055457.12302-1-keescook@chromium.org> <20200518055457.12302-2-keescook@chromium.org> <20200518130251.zih2s32q2rxhxg6f@wittgenstein> <20200518144627.sv5nesysvtgxwkp7@wittgenstein> <87blmk3ig4.fsf@x220.int.ebiederm.org> <87mu64uxq1.fsf@igel.home> <87sgfwuoi3.fsf@x220.int.ebiederm.org> <87eergunqs.fsf@igel.home> Date: Tue, 19 May 2020 07:28:46 -0500 In-Reply-To: <87eergunqs.fsf@igel.home> (Andreas Schwab's message of "Tue, 19 May 2020 14:12:59 +0200") Message-ID: <87ftbwun0h.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1jb1Q2-0007fz-6K;;;mid=<87ftbwun0h.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/TJHeqM7kG/mxWux7jgYWK9a5y1fosOwQ= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH 1/4] exec: Change uselib(2) IS_SREG() failure to EACCES X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org Andreas Schwab writes: > On Mai 19 2020, Eric W. Biederman wrote: > >> I am wondering if there are source trees for libc4 or libc5 around >> anywhere that we can look at to see how usage of uselib evolved. > > libc5 is available from archive.debian.org. > > http://archive.debian.org/debian-archive/debian/pool/main/libc/libc/libc_5.4.46.orig.tar.gz Interesting. It appears that the old a.out code to make use of uselib remained in the libc5 sources but it was all conditional on the being compiled not to use ELF. libc5 did provide a wrapper for the uselib system call. It appears glibc also provides a wrapper for the uselib system call named: uselib@GLIBC_2.2.5. I don't see a glibc header file that provides a declaration for uselib though. So the question becomes did anyone use those glibc wrappers. Eric