From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753135AbdJMFvJ (ORCPT ); Fri, 13 Oct 2017 01:51:09 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48770 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750872AbdJMFvH (ORCPT ); Fri, 13 Oct 2017 01:51:07 -0400 Subject: Re: [PATCH] objtool: Fix memory leak in decode_instructions() To: Josh Poimboeuf References: <1507798934-18140-1-git-send-email-kamalesh@linux.vnet.ibm.com> <20171012161016.z4ytxmm2rbfiewbl@treble> <1297c97f-844b-0631-311d-8e3742f2f74f@linux.vnet.ibm.com> <20171013050630.cdax2kxj3yqnaton@treble> Cc: linux-kernel@vger.kernel.org, Ingo Molnar From: Kamalesh Babulal Date: Fri, 13 Oct 2017 11:20:58 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20171013050630.cdax2kxj3yqnaton@treble> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17101305-0040-0000-0000-000003E26052 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101305-0041-0000-0000-000025E479A5 Message-Id: <8cec1109-8749-0f77-14ca-4bd8e92ebd9d@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-13_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710130083 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 13 October 2017 10:36 AM, Josh Poimboeuf wrote: > On Fri, Oct 13, 2017 at 10:14:36AM +0530, Kamalesh Babulal wrote: >> On Thursday 12 October 2017 09:40 PM, Josh Poimboeuf wrote: >>> On Thu, Oct 12, 2017 at 02:32:14PM +0530, Kamalesh Babulal wrote: >>>> free the allocated insn before returning, when an error occurs >>>> before adding insn to file->insn_list. >>>> >>>> Signed-off-by: Kamalesh Babulal >>> >>> Any chance you're working on porting objtool to ppc64le? :-) >>> >>> Acked-by: Josh Poimboeuf >>> >> >> Thanks for the review. I have started working on it :) > > Good! Let me know if you have any questions. Thank you, I am sure I will have lots of them. > > I originally wrote objtool with arch-independence in mind, though with > the new "objtool 2.0" rewrite, it unfortunately became more > x86-specific. > > I was hoping to work on making it more arch-independent, and then start > porting it to other arches, but it may be a few months before I have the > time to do so. So any work you want to there would be great. > Sure, will keep that in mind to abstract arch-independent code in to common files and push arch-dependent code into arch/ directory for both ppc64le/x86. -- cheers, Kamalesh.