Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4585300pxb; Tue, 5 Oct 2021 06:18:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrr9kHBGKYW8IokYq5ZqxegtvnRHfvMuTrPxoE6Nu9x0adz3HiFgZ0wIQaWngFSVOnAoU6 X-Received: by 2002:a65:4209:: with SMTP id c9mr15260388pgq.399.1633439893985; Tue, 05 Oct 2021 06:18:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633439893; cv=none; d=google.com; s=arc-20160816; b=CovbFKuCTESBHRjWtNpd3CAEtgIH0IRZOJpv8vKUzl5TEXXkVJ8yp8E+vdE3KCLlFl LBr6mSnatQ6vNAq+ffxoAs/HwWGWLGV0sWrCMzv7klJtsiDwXxsCEr+KHgMMT5ZPBl52 IvK6UmoZ6nsbCIkpU2K3FTKyoCSMtXhQI9f8QApaQXvdmmTl+LY3sFkQeLXTug1oKSMQ lu7CDub4RDpvMuilt939Pa2lOL87qn0bzFI1RohHX+YKS5Ybji9FqYPEqpej+YmLDmgP g8idonADCOjI05POoCE/tlSxFpMta3a6kgkCYyjaz2+aLZocTvWnjIZ9AjD6ERyiyDQB yPGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YcPwMasfwF+F5ahJ5WUiC3dcoljqGw3M/9Y9awIfOA0=; b=M9Vgfnpo2sd0dXHp1YqeIckDsZ36K/TwHf2mAeFyucHTtprperQ4cM0Cn1upNseroQ U/FPeJOUL4d3cNz6u2v8QWE9wHU/zEZaFcx8//kCqH/RTqxfSDNFxh4Wg2C0WqaIoHb6 MStluhocJUUAv/Qo8yQcthzXbCq0wsSh66q9UEaJlolsRr7FvRi5QbRw7bNS1xzpFwE6 SxFsfZEFL3FqbGRdgJxkXe4VbWCEtgDRRDqGNRd2LIF8T0NmbvnhSjitMEa/nItnfD60 UFpWqc5KXev1PsKpMwyPw5f+lBoiIfX12zWW53g2oN0EsEzGiCAo4q9VRJC6FRqylYzp pPcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=hDaYgDrN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si22031236pgk.583.2021.10.05.06.17.59; Tue, 05 Oct 2021 06:18:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=hDaYgDrN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234318AbhJENRB (ORCPT + 99 others); Tue, 5 Oct 2021 09:17:01 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40194 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234919AbhJENQ7 (ORCPT ); Tue, 5 Oct 2021 09:16:59 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 195D2d5B028113; Tue, 5 Oct 2021 09:15:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=YcPwMasfwF+F5ahJ5WUiC3dcoljqGw3M/9Y9awIfOA0=; b=hDaYgDrNnqdOmKN272Yp3HNg5pWFLfFS+Nm32rDLSjr3CT4lRAnshu4mGZr87Xell8sz j/iu1JXdLNF3UmnXKn9lZAnRtXLdBKoPL2bn2UkjuI7bDiX+3vKVyckd2+MezMqDtVS5 AWl5Tqss49hqx4TrKts0acgtZSEwVVF9WmXiD5zbR4FiQNOjpC8hCPLxj8Sm+1Yj3SRL M9CsretfdTI065pc3rv0CHD7sr9NrrVNo+D8dIoHq2Z43h2AaB12oJePAAekVb/D10m6 OrnyoalAYrWrltj9M5GzkLAYxFV5I3bEoAx4NmDaCn5Cu+zl7CVuAJFIp2XtRVloAQJy uw== Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bgpgg1tet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Oct 2021 09:15:04 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 195DCcqg018081; Tue, 5 Oct 2021 13:15:02 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma02fra.de.ibm.com with ESMTP id 3bef29rfyt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Oct 2021 13:15:02 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 195DEw5i6160978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Oct 2021 13:14:58 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0972A4C050; Tue, 5 Oct 2021 13:14:58 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B52934C044; Tue, 5 Oct 2021 13:14:57 +0000 (GMT) Received: from osiris (unknown [9.145.46.219]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 5 Oct 2021 13:14:57 +0000 (GMT) Date: Tue, 5 Oct 2021 15:14:56 +0200 From: Heiko Carstens To: Roberto Sassu Cc: gor@linux.ibm.com, borntraeger@de.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2] s390: Fix strrchr() implementation Message-ID: References: <20211005120836.60630-1-roberto.sassu@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211005120836.60630-1-roberto.sassu@huawei.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: YjunOCijn3D61qhYcCdGlBQ-H9CG-s0b X-Proofpoint-GUID: YjunOCijn3D61qhYcCdGlBQ-H9CG-s0b X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-05_02,2021-10-04_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 clxscore=1011 impostorscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=856 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050078 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 05, 2021 at 02:08:36PM +0200, Roberto Sassu wrote: > Fix two problems found in the strrchr() implementation for s390 > architectures: evaluate empty strings (return the string address instead of > NULL, if '\0' is passed as second argument); evaluate the first character > of non-empty strings (the current implementation stops at the second). > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Cc: stable@vger.kernel.org > Reported-by: Heiko Carstens (incorrect behavior with empty strings) > Signed-off-by: Roberto Sassu > --- > arch/s390/lib/string.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) Applied, thanks!