Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4604966pxb; Tue, 5 Oct 2021 06:41:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmu5ngB9ERehf4HclLEiU2VMPzTS7el7/qR/0FQ6fuJjCg0K3Ao2yDcllywkfsA5irrG23 X-Received: by 2002:a17:906:d975:: with SMTP id rp21mr8851167ejb.104.1633441269445; Tue, 05 Oct 2021 06:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633441269; cv=none; d=google.com; s=arc-20160816; b=TOQFJoV2aBmbCmus7EZwDzUN+5KcBTJTz54k07v7uuFNLZuuY0kBdNRw/pBNIdOCvG sgKYfpmEFeMEp6jXtSXgpQ1I8l/+Fbh1q1+H6oZ53IeSMufklNpmSAz7cHEpO+TLh8si kToHd7kNhkBizEGVNvOi5ZeGsM1VIca16k+gS9eCyWGNooKpPpFOqPOc7Q6Dj2n0LTWQ tobhTSjL27G5QwAuI8uJqTmlYhlr4lIxBW95W47g8woNu3zmGanRykCsbcQ/xQvSBzKH XkzCBuDhxPRICQq9prE7mQshjnUMd897sHUoFrXPR7xegClvWDllDlMmd+cFqeX50O/x HhUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ektqZ/mfyb7dAOJNyP0mSMY39E6jfqwsUuut/kZQ/C4=; b=wUwxfjjG4hiN/bQ87E5G09NzHPdO/jBlINsypKIRe+Zm1DvLQQbRfDZU4tJ5H1eHAC 5yAJPDkxMYuCHp3aH1mpZzCbFlYwqlX8OPX6y3G5K+tl1GPrt+0ytAKuEjGO4mCJEacR QA4oaAghuyCoSEcthX4X3ONaFJz9luK7vgzijmsmQCNFZzeparXlbKVoxgD1pUZED061 pl/N5bNriU9SN6+NTLJvlPKfGrH8oLCW0Kb+DQ1uFckKOV5OzgGjIpXgXvFRjE0VGp00 NTSSW/12S+2M6zJCFOfovctL3Sooh4DXWAeyMTqzxIxZN9kU7X8AZEn6gVDYqgev97LO 0+xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rtaPLdNi; 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 24si29464454edv.548.2021.10.05.06.40.45; Tue, 05 Oct 2021 06:41:09 -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=rtaPLdNi; 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 S235056AbhJENiq (ORCPT + 99 others); Tue, 5 Oct 2021 09:38:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44340 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234694AbhJENim (ORCPT ); Tue, 5 Oct 2021 09:38:42 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 195DXtm5019131; Tue, 5 Oct 2021 09:36:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=ektqZ/mfyb7dAOJNyP0mSMY39E6jfqwsUuut/kZQ/C4=; b=rtaPLdNiOoA7CYBFJXvMHcYiL5pV09stDD7fjYmjaXbwvvG/IW9khIAf16M2r66e1WEr C5RBbNVUrq+Xg6mGcGAl2XTAEMnnSQimDDniNZVYt5EKMji3gKPgn13xZLFlP/TtvdMB bev2vli7tCvr35ZUlVbiIX7A9kHJLlKO56aN8e+hqiKAJTJlvibDj/y7A0nCP0i0Khd/ pwJDJvSD8t0uTDDKvoLqrr9xY3af9pJCl6C+WgEO6KVyrONRr2CsysxDA3Cgp7Hk0vnD Uv+Gq9kzd9tTcPUum+pvoAc59h/aM+a9titm47a7yAmMXVxW+MH8da40jPetsZQg+jBw Qg== Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bgnm9bef6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Oct 2021 09:36:45 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 195DWj7W022778; Tue, 5 Oct 2021 13:36:43 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03fra.de.ibm.com with ESMTP id 3bef29gsxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Oct 2021 13:36:43 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 195DadM83867170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Oct 2021 13:36:39 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 216CE52069; Tue, 5 Oct 2021 13:36:39 +0000 (GMT) Received: from osiris (unknown [9.145.46.219]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id CEF5A5207E; Tue, 5 Oct 2021 13:36:38 +0000 (GMT) Date: Tue, 5 Oct 2021 15:36:37 +0200 From: Heiko Carstens To: Roberto Sassu Cc: Juergen Gross , "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> <4eb4c1ea-d392-62fd-201f-472f24496f46@suse.com> <923ea0761d4d45158acbd1347d9bb6b5@huawei.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <923ea0761d4d45158acbd1347d9bb6b5@huawei.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 67M2sR0VWEH4Q98q3R6yU8XdcCyxG-A- X-Proofpoint-ORIG-GUID: 67M2sR0VWEH4Q98q3R6yU8XdcCyxG-A- X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 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 priorityscore=1501 clxscore=1011 impostorscore=0 mlxlogscore=936 bulkscore=0 phishscore=0 suspectscore=0 mlxscore=0 spamscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050080 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 05, 2021 at 01:30:45PM +0000, Roberto Sassu wrote: > > From: Juergen Gross [mailto:jgross@suse.com] > > Sent: Tuesday, October 5, 2021 3:25 PM > > On 05.10.21 15:14, Heiko Carstens wrote: > > > 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! > > > > > > > Really? I just wanted to write a response: len is unsigned (size_t) > > and compared to be >= 0, which sounds like always true. > > Thanks for catching this. Will fix it. I'll fix it. No need to resend.