Message ID | 20200715230448.229468-1-tuliom@linux.ibm.com |
---|---|
State | Committed |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1B4733840C24; Wed, 15 Jul 2020 23:05:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B4733840C24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1594854300; bh=9ms5UA/UrgdFCcHzy+k4291JiS84ly7LGNn/rjE/mzA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=V1R/3NsCy5yGz829gaFoRITVoLRvnLclEEDtBXIh15vyvKM2bMIF4H1W4tp2sViLW 4rjHGnLZ0wMKvouWfCSt3MzD38HA96vmjsC2hJ3V78oFWH/YaBBI4lMgYymeZ/KSyc jsGWXsxbUOEwz/ii81ZIGC1dTjncN1cAxQHoGDdg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id C7E19384240C for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 23:04:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C7E19384240C Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06FN251J097460 for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 19:04:57 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 329dhxmn7t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 19:04:57 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06FMj7Ri012002 for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 23:04:56 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma05wdc.us.ibm.com with ESMTP id 32752947se-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 23:04:56 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06FN4uSs13894170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 23:04:56 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6DF19AE05C for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 23:04:56 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 11468AE05F for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 23:04:56 +0000 (GMT) Received: from linux.ibm.com (unknown [9.65.207.87]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP for <libc-alpha@sourceware.org>; Wed, 15 Jul 2020 23:04:55 +0000 (GMT) To: libc-alpha@sourceware.org Subject: [PATCH] powerpc: Fix POWER10 selection Date: Wed, 15 Jul 2020 20:04:48 -0300 Message-Id: <20200715230448.229468-1-tuliom@linux.ibm.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-15_12:2020-07-15, 2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 malwarescore=0 mlxscore=0 suspectscore=1 impostorscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=829 clxscore=1015 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150168 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 <libc-alpha.sourceware.org> List-Unsubscribe: <http://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <http://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Tulio Magno Quites Machado Filho via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
powerpc: Fix POWER10 selection
|
|
Commit Message
Tulio Magno Quites Machado Filho
July 15, 2020, 11:04 p.m. UTC
Add a line that was missing from a previous commit. Without increasing str, the null-byte is not validated, and _dl_string_platform returns -1. Fixes: d2ba3677da7a ("powerpc: Add support for POWER10") --- sysdeps/powerpc/dl-procinfo.h | 1 + 1 file changed, 1 insertion(+)
Comments
On 7/15/20 6:04 PM, Tulio Magno Quites Machado Filho via Libc-alpha wrote: > Add a line that was missing from a previous commit. > Without increasing str, the null-byte is not validated, and > _dl_string_platform returns -1. > > Fixes: d2ba3677da7a ("powerpc: Add support for POWER10") > --- > sysdeps/powerpc/dl-procinfo.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h > index 497dc568e9..f07500619a 100644 > --- a/sysdeps/powerpc/dl-procinfo.h > +++ b/sysdeps/powerpc/dl-procinfo.h > @@ -96,6 +96,7 @@ _dl_string_platform (const char *str) > if (str[1] == '0') > { > ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER10; > + str++; > } > else > return -1; > LGTM.
On 7/16/20 9:54 AM, Paul E Murphy via Libc-alpha wrote: > > > On 7/15/20 6:04 PM, Tulio Magno Quites Machado Filho via Libc-alpha wrote: >> Add a line that was missing from a previous commit. >> Without increasing str, the null-byte is not validated, and >> _dl_string_platform returns -1. >> >> Fixes: d2ba3677da7a ("powerpc: Add support for POWER10") >> --- >> sysdeps/powerpc/dl-procinfo.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h >> index 497dc568e9..f07500619a 100644 >> --- a/sysdeps/powerpc/dl-procinfo.h >> +++ b/sysdeps/powerpc/dl-procinfo.h >> @@ -96,6 +96,7 @@ _dl_string_platform (const char *str) >> if (str[1] == '0') >> { >> ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER10; >> + str++; >> } >> else >> return -1; >> > > LGTM. > Agreed, without str++ the subsequent str[1] == '\0' is false and you return -1. OK for 2.32. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Carlos O'Donell via Libc-alpha <libc-alpha@sourceware.org> writes: > OK for 2.32. > > Reviewed-by: Carlos O'Donell <carlos@redhat.com> Pushed as f6add169c89bbdd139a2eb845686127ead5799cd. Thanks!
diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h index 497dc568e9..f07500619a 100644 --- a/sysdeps/powerpc/dl-procinfo.h +++ b/sysdeps/powerpc/dl-procinfo.h @@ -96,6 +96,7 @@ _dl_string_platform (const char *str) if (str[1] == '0') { ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER10; + str++; } else return -1;