From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 6F6F93894C3B for ; Thu, 11 Feb 2021 00:38:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6F6F93894C3B Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-_SD0f92zNUWic6OCmSMAfg-1; Wed, 10 Feb 2021 19:38:26 -0500 X-MC-Unique: _SD0f92zNUWic6OCmSMAfg-1 Received: by mail-qv1-f71.google.com with SMTP id t18so2787111qva.6 for ; Wed, 10 Feb 2021 16:38:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=hOoT7lVxi6BDJq6WI2CKFTuTR2OY40PnwBVXetriYHc=; b=VfVHFtbQstRCwW9aoEdt0vvK4RYrywKF08+FgaVYfsQOD5MxO+BvRvuP/++a0rptIS ggPCKcgnkZMEPtBdF5b+mqrX2dFq6WauoZYcOWQUo52h5R0NKt6Q1dxLq7IqC9jVgUVr v5+hzcLcUYi1sgKZIgtpKxo5rooZ6WsvhVmPs0ws+xl1gTMScDFf5k2l4OIhF6zpgUDr WlyjNov34vCjgbgewG86jgZkAfFxieIoRLjlMtMBoN9qc8sUWCh/+ceR1vxR0QCGRqvU hQ7V5ovAfhuwtPwS4EEOB7ufayTXsL0ODaz63OClhuU0RBT5NwsgP9Est1wqHCVf2FSw AcEA== X-Gm-Message-State: AOAM533J1AIQzfPPscBtPITZtvk3jvJIvvecFTT6/Sk19PAT+NVguzxH S0ZlazNXul2pf2189RCai83fMBomGWcg6eOZZwKnb/4SeXi4Rm1eivppCZs1woWV+/s1hHzXMU8 oL5Dt4HcVmbc0Lvz2dFwE3hie5zDkH5+JZ2QF2S4AZEzEzjZiJ/kKDcuiMEFvzx6BPfPufg== X-Received: by 2002:a37:a452:: with SMTP id n79mr6142238qke.60.1613003905922; Wed, 10 Feb 2021 16:38:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/mIlZetws1yBPoe0NHxkFYVHVgKZ2LTYDdMZGso0Q58MZUes6YpO1TP0ek8seGooa95Irlg== X-Received: by 2002:a37:a452:: with SMTP id n79mr6142222qke.60.1613003905675; Wed, 10 Feb 2021 16:38:25 -0800 (PST) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id p10sm2717480qke.92.2021.02.10.16.38.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Feb 2021 16:38:25 -0800 (PST) Subject: Re: [PATCH 09/10] linux: Remove overflow.h To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20210208214936.1502047-1-adhemerval.zanella@linaro.org> <20210208214936.1502047-10-adhemerval.zanella@linaro.org> From: Carlos O'Donell Organization: Red Hat Message-ID: Date: Wed, 10 Feb 2021 19:38:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210208214936.1502047-10-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2021 00:38:30 -0000 On 2/8/21 4:49 PM, Adhemerval Zanella via Libc-alpha wrote: > The header is not used anywhere, the required functions are provided > by other implementations. LGTM. Reviewed-by: Carlos O'Donell > --- > .../sysv/linux/generic/wordsize-32/overflow.h | 69 ------------------- > 1 file changed, 69 deletions(-) > delete mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h > > diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h > deleted file mode 100644 > index f2a58d654f..0000000000 > --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h > +++ /dev/null > @@ -1,69 +0,0 @@ > -/* Overflow tests for stat, statfs, and lseek functions. > - Copyright (C) 2011-2021 Free Software Foundation, Inc. > - This file is part of the GNU C Library. > - Contributed by Chris Metcalf , 2011. > - > - The GNU C Library is free software; you can redistribute it and/or > - modify it under the terms of the GNU Lesser General Public > - License as published by the Free Software Foundation; either > - version 2.1 of the License, or (at your option) any later version. > - > - The GNU C Library is distributed in the hope that it will be useful, > - but WITHOUT ANY WARRANTY; without even the implied warranty of > - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - Lesser General Public License for more details. > - > - You should have received a copy of the GNU Lesser General Public > - License along with the GNU C Library. If not, see > - . */ > - > -#include > -#include > -#include > - > -/* Test for overflows of structures where we ask the kernel to fill them > - in with standard 64-bit syscalls but return them through APIs that > - only expose the low 32 bits of some fields. */ > - > -static inline off_t lseek_overflow (loff_t res) > -{ > - off_t retval = (off_t) res; > - if (retval == res) > - return retval; > - > - __set_errno (EOVERFLOW); > - return (off_t) -1; > -} > - > -static inline int stat_overflow (struct stat *buf) > -{ > -#if defined __INO_T_MATCHES_INO64_T > - return 0; > -#else > - if (buf->__st_ino_pad == 0 && buf->__st_size_pad == 0 > - && buf->__st_blocks_pad == 0) > - return 0; > - > - __set_errno (EOVERFLOW); > - return -1; > -#endif > -} > - > -/* Note that f_files and f_ffree may validly be a sign-extended -1. */ > -static inline int statfs_overflow (struct statfs *buf) > -{ > -#if __STATFS_MATCHES_STATFS64 > - return 0; > -#else > - if (buf->__f_blocks_pad == 0 && buf->__f_bfree_pad == 0 > - && buf->__f_bavail_pad == 0 > - && (buf->__f_files_pad == 0 > - || (buf->f_files == -1U && buf->__f_files_pad == -1)) > - && (buf->__f_ffree_pad == 0 > - || (buf->f_ffree == -1U && buf->__f_ffree_pad == -1))) > - return 0; > - > - __set_errno (EOVERFLOW); > - return -1; > -#endif > -} > -- Cheers, Carlos.