From owner-svn-src-all@freebsd.org Wed Mar 21 15:37:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8E4DF4E289; Wed, 21 Mar 2018 15:37:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74E3A76444; Wed, 21 Mar 2018 15:37:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f182.google.com with SMTP id d5so7157950iob.9; Wed, 21 Mar 2018 08:37:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Falil5Fyc0DxNhqTH4s+RmZXJ/mxtZ6SH5aY1Vj23Vk=; b=BmeoGgvcFovYc1PU//0Ne467ZfTHdk3HNHuvmzv+upPD99fCLQkWcS7tTTSNhc4cwb lh6frUkbvAgH32h9Y32EEqBpbAKRtWsBPVSWOUhKN60rDeqKIXVNIzA1K1pYU2Y+N/5M aeFkocXvs1jkBgxgNIWdfM5xo8mtVrdjTqmJosOyM6ACZGOtMLZhK1A2YOtSbGy/pA1i 5y0Pxld9fGvlHdqbGVwY+rwGHqk0ZRMkQqYAn2+UbZRxvwUqaNgHEEHYvWwxYPYnIFir fnZBs/qY+w9dQo3xnkU4XTfrqBzQ9b60+4qSTO2K37eAQbvKUSsv6E53OGVJbyh6+H8V XbBA== X-Gm-Message-State: AElRT7FifQmKMA6f8XKHtN07eFdvunkORJRh5vOp83f5SruPLXlFDXyR FkeG7xVo1/E+h7B4JfprwisCtCMa X-Google-Smtp-Source: AG47ELucg8jz2Ma1aVAvWeQJq04FujqInQvAjynXj01KaPkMBKJhNK0FoC5uZ2xEovoRz9fnBVhhbQ== X-Received: by 10.107.47.198 with SMTP id v67mr11793528iov.281.1521646634718; Wed, 21 Mar 2018 08:37:14 -0700 (PDT) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com. [209.85.214.41]) by smtp.gmail.com with ESMTPSA id a129-v6sm3220106itd.34.2018.03.21.08.37.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Mar 2018 08:37:14 -0700 (PDT) Received: by mail-it0-f41.google.com with SMTP id p67-v6so2363037itc.2; Wed, 21 Mar 2018 08:37:14 -0700 (PDT) X-Received: by 2002:a24:c101:: with SMTP id e1-v6mr4744079itg.46.1521646634148; Wed, 21 Mar 2018 08:37:14 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.153.132 with HTTP; Wed, 21 Mar 2018 08:37:13 -0700 (PDT) In-Reply-To: <20180321152335.GL76926@kib.kiev.ua> References: <201803210115.w2L1Fjt9084698@repo.freebsd.org> <20180321103325.GJ76926@kib.kiev.ua> <20180321152335.GL76926@kib.kiev.ua> From: Conrad Meyer Date: Wed, 21 Mar 2018 08:37:13 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r331279 - in head: include lib/libc/gen lib/libc/sys lib/libc/tests/gen sys/compat/freebsd32 sys/conf sys/kern sys/sys tests/sys/kern usr.bin/truss To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Xin LI Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 15:37:22 -0000 On Wed, Mar 21, 2018 at 8:23 AM, Konstantin Belousov wrote: > On Wed, Mar 21, 2018 at 08:03:16AM -0700, Conrad Meyer wrote: >> On Wed, Mar 21, 2018 at 3:33 AM, Konstantin Belousov >> > Libraries must not abort the application. >> > Esp. libc. >> >> What do you propose instead? while (1); ? I don't see that as >> obviously better. > > Return the error to caller, as all, well most, correct library functions > do. The abort() in case of ENOSYS was proposed by delphij@. It is intended for users that getentropy() not fail. Another possible fallback is to use the kern.arandom sysctl. Would this be amenable to you? Thanks, Conrad