From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nXm7b-0004iK-2h for mharc-grub-devel@gnu.org; Fri, 25 Mar 2022 11:45:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXm7Y-0004hd-Fw for grub-devel@gnu.org; Fri, 25 Mar 2022 11:45:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30463) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXm7T-0003Le-6Y for grub-devel@gnu.org; Fri, 25 Mar 2022 11:44:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648223093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V2YWb3lSUwaJcby2gFDs6mU4EAENZQEpj4EMpwU58fM=; b=Jd4jmZsFAM4o9yqcxvH5mcmtypWflcnuQiDI4itXem0NIpOp14cJbKmymfW7chCgna+y/v 0LeAu6OA+VYaxTyVngEyP+kKeHtdm0f2wjd5qu0YgDCpaF9CiEDZ++XjbuVctYoSEEkRt7 DSC9TuO2Xsx1LAt3hNr8DBhFnGYtB8E= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-548-SSx7I_HOPMOVnvg-iGUNaw-1; Fri, 25 Mar 2022 11:44:49 -0400 X-MC-Unique: SSx7I_HOPMOVnvg-iGUNaw-1 Received: by mail-qk1-f199.google.com with SMTP id m23-20020a05620a221700b006809e1fa4fdso3952225qkh.6 for ; Fri, 25 Mar 2022 08:44:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=V2YWb3lSUwaJcby2gFDs6mU4EAENZQEpj4EMpwU58fM=; b=stXAvmk8044UF/0RlNjY+9HNOO4zoNuSba+OaQ2UCSopFLzSgymtcFB1KMX26BGsAd E9+f9kPtc6yw6N+eEg/3+eqOMnFWzRyWLw9yLbHHcZQFdDJeJ6bwlCEQuS1D37PdrYkU katHTSmmKNE5EVpBhoq18NNLxtXbBXTbOkp22yqr8+7tD7M1WR80D+htcnYpgQ1Y6PYK AwtUGb/si8L4J5cphrOkXkqMydytBZiYbRLewcovF0s4IdZcahTB3s066gRlDTqzxbix oTqhstoWqO5/zs1QCDqpnL2Ns9WOr3abgC0x4Cy3TxsuKJ9SkmjDBI96bP4aFdaKGheO eKDw== X-Gm-Message-State: AOAM531lMIeh1UeRwDFvQ86yKgXravSK5LEu+aT2L2Jh1sfr6ex+L7RS mJhCZV8jO0sJCngqfBUUURgs5qKgNOTgwg4iDX2QIm+/9GZDmFFP0/3Dx4+UE20d26C8WAVioiB wRgzScv+GCLE= X-Received: by 2002:ad4:4211:0:b0:440:f7e9:1096 with SMTP id k17-20020ad44211000000b00440f7e91096mr9596063qvp.23.1648223086450; Fri, 25 Mar 2022 08:44:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUAEnOfmzvHFElSaFvdWHaBgyHW573vez/1o1ECRhEfHdEMPUaxOJcP4opcdRN93pVLEl6UQ== X-Received: by 2002:ad4:4211:0:b0:440:f7e9:1096 with SMTP id k17-20020ad44211000000b00440f7e91096mr9595993qvp.23.1648223085407; Fri, 25 Mar 2022 08:44:45 -0700 (PDT) Received: from localhost ([2601:184:4181:74c0:862e:5809:ed9e:e10e]) by smtp.gmail.com with ESMTPSA id y15-20020a05622a004f00b002e1aaa1738dsm5563066qtw.12.2022.03.25.08.44.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 08:44:45 -0700 (PDT) From: Robbie Harwood To: Glenn Washburn , grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: Re: [PATCH] gnulib: Handle aborts in gnulib more gracefully In-Reply-To: <20220325001222.3330852-1-development@efficientek.com> References: <20220325001222.3330852-1-development@efficientek.com> Date: Fri, 25 Mar 2022 11:44:42 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=170.10.133.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2022 15:45:00 -0000 --=-=-= Content-Type: text/plain Glenn Washburn writes: > Gnulib does not define abort(), but expects it to be defined, usually by a > libc implementation. However, GRUB has no libc and does not have an abort() > function. Until recently GRUB had patched out abort() in gnulib, effectively > making it a noop. This changed with a recent update of the version of gnulib > GRUB uses to be a compiler defined trap. While this is fine for user space > code where the kernel can be expected to cleanup after a process when this > happens, the firmware may not be good at doing this. > > GRUB does have a grub_abort(), with the same function signature that can be > used instead. So instead define gnulib's abort() implementation to be > grub_abort(). This provides consistency of behavior regardless of whether > the abort happens in gnulib code or in GRUB code. > > Because we want to avoid patching gnulib again and gnulib expects that > abort(), now grub_abort(), is defined externally, we must provide a > prototype in the config.h. This is complicated by the fact that config.h > is included in many GRUB compilation units as well as grub/misc.h which > already declares grub_abort(). A macro, GNULIB, is provided only to > compilation units using gnulib code, so that the grub_abort() prototype > is only included in those compilation units where it is lacking. This approach is nice. > Also, export grub_abort() so that it can now be used within modules. > > Signed-off-by: Glenn Washburn Reviewed-by: Robbie Harwood Be well, --Robbie --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAmI942oUHHJoYXJ3b29k QHJlZGhhdC5jb20ACgkQJTL5F2qVpEJgtw//eFgwBgAwIHlgM6w6zaahqgfM7lu3 29Sr2KJEKCrR19tkyk8C26kPrqksM0rCzX3HiJJObMLB/1aqv37PLEmf2LU2x2Dh U6VzX4pTDQi5oOWaIbZbPFzrYoeOzoGmgLrxDTDf0Ve6OEdc8IE1bmEW5cRROv20 be+BILd+wnhXTKGXgiLm/OJLvhwz6OGZBvimac7Z7PoVckb2Q2Md/ycEAQAs0ug8 GTnEeZykXuYm7VBNcIenx5aShGiwaHeF0DAoS33FierBDxnO9rOOwZRe+Q057y4F adl0UQ0hd2qAhsC8CCJiMyk91swynOtvbJrjqVuHiQFBfBlTm/fLjWwfpKSbNEil gQpNg3/i5IpamS1RQErgEcqPxW6BDVfUiuaFa4HTSLQWyRaTI73sgZyls0Yy/iM5 yfQEFJQfSYzcP01Ft+QNsfIHfKjRxsGyCtE5SI8XWmeQPALPSK4qxfNoG6q5C+iW 38EBFfPTy+KxMMnvYkYxTofDzY6uZn3vzo8tSeUFMBSp7dFC6h3CVoDA5Eviqca7 KRfPhdLGEOjU2CWFDCPhpTKsJeJM6BnohJF8pyWuntvc2J9Ch/ilFWPSZ/D+sSCQ iQruY8c0bOjNqIt6G4LNzZ9sjJHSrOvzGCTSgOBtVCSIbMjFuv/0sEgjTNnVpWER 3OtR4QW71DbPmjA= =GcKs -----END PGP SIGNATURE----- --=-=-=--